/* ===== Driver Page Styles ===== */
/* Dark theme with teal accent (#05ebb1) */

:root {
    --driver-primary: #05ebb1;
    --driver-primary-dark: #04c9a0;
    --driver-bg: #0a0a0a;
    --driver-card-bg: #181818;
    --driver-border: #222;
    --driver-text: #fff;
    --driver-text-secondary: #b0b0b0;
    --driver-success: #00e676;
    --driver-warning: #ffa500;
    --driver-danger: #b00020;
    --driver-info: #2196f3;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--driver-bg);
    color: var(--driver-text);
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    display: flex;
    flex-direction: row;
    gap: 48px;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Left Drawer - Pickup Dates */
#allPickupDatesContainer {
    min-width: 320px;
    max-width: 340px;
    background: var(--driver-card-bg);
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    padding: 24px 18px;
    margin-right: 0;
    height: 100%;
    align-self: stretch;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), left 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 3001;
}

#allPickupDatesContainer h2 {
    color: var(--driver-primary);
    font-size: 1.15rem;
    margin-top: 0;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

/* Scroll Buttons */
#scrollUpBtn,
#scrollDownBtn {
    background: #222;
    color: var(--driver-primary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    cursor: pointer;
    margin: 4px 0;
    transition: all 0.2s ease;
}

#scrollUpBtn:hover,
#scrollDownBtn:hover {
    background: var(--driver-primary);
    color: #181818;
}

/* Pickup Dates List */
#allPickupDatesList {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    max-height: 60vh;
}

/* Pickup Date Card */
.pickup-date-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #20232a;
    border-radius: 8px;
    padding: 14px 14px 12px 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.10);
    transition: all 0.2s ease;
}

.pickup-date-item:hover {
    background: #252a33;
    transform: translateY(-2px);
}

.pickup-date-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pickup-date-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--driver-primary);
}

.pickup-date-info {
    flex: 1;
}

.pickup-date-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.08em;
}

.pickup-date-time {
    font-size: 0.97em;
    color: var(--driver-text-secondary);
}

.pickup-date-status {
    font-weight: 600;
    font-size: 1em;
    min-width: 80px;
    text-align: right;
}

.status-pending { color: var(--driver-warning); }
.status-accepted { color: var(--driver-primary); }
.status-pickedup { color: var(--driver-info); }
.status-onway { color: #ffb300; }
.status-delivered { color: var(--driver-success); }
.status-cancelled { color: var(--driver-danger); }

.pickup-detail {
    font-size: 0.98em;
    color: #fff;
    margin: 2px 0;
}

.pickup-detail b {
    color: var(--driver-text-secondary);
}

.pickup-offer {
    font-size: 0.98em;
    color: var(--driver-primary);
}

.pickup-actions {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Buttons */
.status-btn,
.request-btn,
.destination-btn {
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.97em;
    transition: all 0.2s ease;
}

.status-btn {
    background: var(--driver-primary);
    color: #181818;
}

.status-btn:hover {
    background: var(--driver-primary-dark);
}

.request-btn {
    background: var(--driver-danger);
    color: #fff;
}

.request-btn:hover {
    background: #900018;
}

.destination-btn {
    background: var(--driver-info);
    color: #fff;
}

.destination-btn:hover {
    background: #1976d2;
}

/* Accepted By Section */
.accepted-by-section {
    margin-top: 6px;
    padding: 8px 10px;
    background: #181818;
    border-radius: 8px;
    border: 1px solid var(--driver-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.accepted-by-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--driver-primary);
}

.accepted-by-info {
    font-size: 0.95em;
}

.accepted-by-info b {
    color: #fff;
}

.accepted-by-phone {
    color: var(--driver-primary);
}

/* Drawer Overlay */
#drawerOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 3000;
}

/* Drawer Toggle Button */
#drawerToggleBtn {
    display: none;
    position: absolute;
    top: 18px;
    left: 12px;
    background: var(--driver-primary);
    color: #181818;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.5em;
    z-index: 4000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    cursor: pointer;
    transition: all 0.2s ease;
}

#drawerToggleBtn:hover {
    transform: scale(1.1);
}

/* Drawer Close Button */
#drawerCloseBtn {
    display: none;
    position: absolute;
    top: 18px;
    right: 18px;
    background: #222;
    color: var(--driver-primary);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.3em;
    z-index: 4001;
    cursor: pointer;
    transition: all 0.2s ease;
}

#drawerCloseBtn:hover {
    background: var(--driver-primary);
    color: #181818;
}

/* Main Content */
#mainContent {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Map */
#map {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    margin-bottom: 24px;
}

/* Safety Reminder */
#safetyReminder {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #181818;
    border-radius: 10px;
    padding: 18px 18px 16px 18px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#safetyReminder i {
    font-size: 2.1em;
    color: var(--driver-primary);
}

.safety-content {
    flex: 1;
}

.safety-title {
    font-weight: 600;
    font-size: 1.13em;
    color: var(--driver-primary);
}

.safety-text {
    color: #fff;
    font-size: 1em;
    line-height: 1.5;
    margin-top: 2px;
}

/* Driver Section */
#driverSection {
    margin-bottom: 32px;
}

/* Driver Registration Form */
.driver-form {
    background: #181818;
    padding: 24px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 500px;
    margin: auto;
}

.driver-form h2 {
    margin-top: 0;
    color: var(--driver-primary);
    font-size: 2.1em;
}

.driver-form label {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-weight: 500;
}

.driver-form input,
.driver-form select {
    width: 100%;
    background: #181818;
    border: 1.5px solid var(--driver-primary);
    color: #fff;
    caret-color: var(--driver-primary);
    border-radius: 18px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s ease;
}

.driver-form input:focus,
.driver-form select:focus {
    border-color: var(--driver-primary-dark);
}

.driver-form button[type="submit"] {
    background: var(--driver-primary);
    color: #000;
    font-weight: 600;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    width: 100%;
    margin-top: 12px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.driver-form button[type="submit"]:hover {
    background: var(--driver-primary-dark);
}

/* Date Input Styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) hue-rotate(270deg) saturate(2);
}

input[type="date"]::-webkit-input-placeholder {
    color: #b0b0b0;
}

input[type="date"]::-webkit-datetime-edit {
    color: #fff;
}

input[type="date"] {
    background-color: #181818;
    color: #fff;
}

/* Driver Profile */
.driver-profile {
    background: #181818;
    padding: 24px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 500px;
    margin: auto;
}

.driver-profile h2 {
    margin-top: 0;
    color: var(--driver-primary);
}

.driver-profile div {
    margin: 8px 0;
    color: #fff;
}

.driver-profile b {
    color: var(--driver-text-secondary);
}

/* Notification Bell */
#notificationBell {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 3000;
    user-select: none;
    cursor: pointer;
}

#notificationBell .fa-bell {
    font-size: 2rem;
    color: var(--driver-primary);
    transition: color 0.2s;
}

#notificationBell .fa-bell.active {
    color: #ffb300;
}

#notificationBadge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--driver-danger);
    color: #fff;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.9rem;
    font-weight: bold;
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #181818;
    color: #fff;
    padding: 32px 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    position: relative;
}

.modal-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cancel-btn,
.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background: var(--driver-danger);
    color: #fff;
}

.cancel-btn:hover {
    background: #900018;
}

.submit-btn {
    background: var(--driver-primary);
    color: #fff;
}

.submit-btn:hover {
    background: var(--driver-primary-dark);
}

/* Mobile Bottom Menu */
.mobile-bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    border-top: 1px solid #1a1a1a;
}

.bottom-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.bottom-menu-item i {
    font-size: 24px;
    color: #b0b0b0;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.bottom-menu-item:hover {
    color: var(--driver-primary);
}

.bottom-menu-item:hover i {
    color: var(--driver-primary);
}

.bottom-menu-item.active i {
    color: var(--driver-primary);
}

.bottom-menu-item.active {
    color: var(--driver-primary);
}

/* Destination Route Modal */
#destinationRouteModal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background: rgba(0,0,0,0.35);
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

#destinationRouteModalContent {
    position: relative;
    left: 0;
    right: 0;
    bottom: 0;
    background: #181818;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
    width: 100vw;
    animation: slideUpModal 0.3s cubic-bezier(.4,0,.2,1);
}

#destinationRouteModalContent h2 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--driver-primary);
}

#destinationRouteModalContent .modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
}

#destinationRouteMap {
    width: 100vw;
    max-width: 600px;
    height: 340px;
    margin: 18px auto 0 auto;
    border-radius: 12px;
}

#destinationRouteModalContent .route-info {
    padding: 18px;
    color: var(--driver-primary);
    font-size: 1.1em;
    margin-top: 10px;
    white-space: pre-line;
}

@keyframes slideUpModal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 918px) {
    .container {
        flex-direction: column;
        gap: 0;
    }
    
    #allPickupDatesContainer {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        min-width: 80vw;
        max-width: 90vw;
        width: 85vw;
        transform: translateX(-100%);
        box-shadow: 2px 0 16px rgba(0,0,0,0.18);
        margin: 0;
        z-index: 3001;
    }
    
    #allPickupDatesContainer.open {
        transform: translateX(0);
    }
    
    #drawerOverlay {
        display: block;
    }
    
    #drawerToggleBtn {
        display: block;
    }
    
    #mainContent {
        width: 100vw;
        transition: filter 0.3s cubic-bezier(.4,0,.2,1);
    }
    
    #mainContent.drawer-open {
        filter: blur(2px) brightness(0.8);
    }
    
    #map {
        height: 38vh !important;
        min-height: 180px;
        max-height: 60vh;
    }
    
    #safetyReminder {
        flex-direction: row !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: -16px !important;
        border-radius: 0 0 10px 10px !important;
        box-sizing: border-box !important;
        left: 0;
        padding: 10px 6px 10px 6px !important;
        gap: 8px !important;
    }
    
    #safetyReminder .fa-shield-heart {
        font-size: 1.3em !important;
    }
    
    #safetyReminder > div > div:first-child {
        font-size: 1em !important;
    }
    
    #safetyReminder > div > div:last-child {
        font-size: 0.93em !important;
    }
}

@media (max-width: 900px) {
    .container {
        gap: 12px;
    }
    
    #allPickupDatesContainer {
        min-width: 220px;
        max-width: 80vw;
        padding: 18px 8px;
    }
}

@media (max-width: 600px) {
    .modal-content {
        max-width: 96vw;
        width: 98vw;
        padding: 16px 6px 18px 6px;
        min-width: unset;
    }
    
    #pickupModal input[type="text"],
    #pickupModal input[type="number"],
    #pickupModal input[type="tel"] {
        font-size: 1em;
        padding: 10px 8px;
        border-radius: 7px;
        margin-bottom: 7px;
    }
    
    #pickupModal label {
        font-size: 0.98em;
    }
}

@media (min-width: 919px) {
    #map {
        height: 480px !important;
        min-height: 280px;
        max-height: 60vh;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #181818;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 5000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 64px;
    color: #444;
    margin-bottom: 20px;
}

.empty-state p {
    color: #888;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #888;
}

.loading-state i {
    font-size: 32px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    min-width: 64px;
}

.nav-item i {
    font-size: 20px;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--driver-primary);
}

.nav-item:hover i {
    color: var(--driver-primary);
}

.nav-item.active {
    color: var(--driver-primary);
}

.nav-item.active i {
    color: var(--driver-primary);
}

/* DopGO Special Nav Item */
.nav-item.dopgo {
    background: linear-gradient(135deg, var(--driver-primary), var(--driver-primary-dark));
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin-top: -20px;
    box-shadow: 0 4px 15px rgba(5,155,161,0.4);
}

.nav-item.dopgo:hover {
    background: linear-gradient(135deg, var(--driver-primary-dark), #04c9a0);
    color: white;
}

.nav-item.dopgo.active {
    color: white;
}

.nav-item.dopgo.active i {
    color: white;
}

.nav-item.dopgo i {
    font-size: 24px;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-bell i {
    font-size: 18px;
    color: var(--driver-primary);
    transition: color 0.2s;
}

.notification-bell i.active {
    color: #ffb300;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--driver-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Header Styles */
.header {
    background: #181818;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--driver-text);
    text-decoration: none;
}

.logo i {
    color: var(--driver-primary);
}

.header-right-mobile {
    margin-left: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--driver-primary);
    color: #181818;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: var(--driver-primary-dark);
    transform: scale(1.1);
}

/* Mobile Responsive Navigation */
@media (max-width: 768px) {
    .bottom-nav {
        padding: 6px 2px;
    }
    
    .nav-item {
        padding: 6px 8px;
        min-width: 56px;
        font-size: 9px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
    
    .nav-item.dopgo {
        width: 48px;
        height: 48px;
        margin-top: -16px;
    }
    
    .nav-item.dopgo i {
        font-size: 20px;
    }
}
