/*
 * واصل توكتوك - تطبيق السائق
 * Professional CSS Styling
 */

/* === Custom Properties === */
:root {
    --driver-primary: #f59e0b;
    --driver-primary-dark: #d97706;
    --driver-primary-light: #fbbf24;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base Overrides === */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Online/Offline Status Indicator  === */
.status-indicator {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .7;
    }
}

/* === Request Modal Animation === */
.request-modal {
    animation: slideUpBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpBounce {
    0% {
        transform: translateY(100%);
    }

    60% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* === Earnings Counter Animation === */
.earning-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.5s ease;
}

/* === Trip Status Badge Colors === */
.badge-accepted {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.badge-arrived {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-in-progress {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-completed {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* === Toggle Switch Custom Style === */
#onlineToggle:checked+div {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* === Map Driver Marker === */
.driver-marker {
    width: 50px;
    height: 50px;
    background: white;
    border: 4px solid var(--driver-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* === Toast Notification === */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.success {
    border-right: 4px solid var(--success-color);
}

.toast.error {
    border-right: 4px solid var(--danger-color);
}

.toast.info {
    border-right: 4px solid var(--info-color);
}

/* === Button States === */
button {
    transition: var(--transition);
}

button:active {
    transform: scale(0.97);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Trip Controls Panel === */
#tripControls {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* === Responsive Design === */
@media (max-width: 640px) {
    .status-bar {
        padding: 0.75rem;
    }

    .request-modal {
        padding: 1.25rem;
    }
}

/* === Print Styles === */
@media print {

    #map,
    button,
    .status-bar {
        display: none !important;
    }
}