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

/* === Custom Properties (CSS Variables) === */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 0.75rem;
    --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;
    overflow: hidden;
}

/* === Custom Scrollbar === */
.bottom-sheet::-webkit-scrollbar {
    width: 6px;
}

.bottom-sheet::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

.bottom-sheet::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.bottom-sheet::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* === Loading Spinner === */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* === Smooth Slide-in Animation === */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.bottom-sheet {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Button Hover Effects === */
button,
.cursor-pointer {
    transition: var(--transition);
}

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

button:hover {
    filter: brightness(0.95);
}

/* === Floating Action Button (FAB) === */
.fab {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* === Toast Notifications === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    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: block;
}

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

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

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

/* === Menu Slide Animation === */
#menu>div {
    animation: slideFromRight 0.3s ease-out;
}

@keyframes slideFromRight {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* === Map Markers Custom Styling === */
.custom-marker {
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
}

/* === Glassmorphism Effect === */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* === Skeleton Loading === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* === Ripple Effect on Buttons === */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* === Responsive Design === */
@media (max-width: 640px) {
    .bottom-sheet {
        max-height: 85vh;
    }

    #menu>div {
        width: 80%;
        max-width: 280px;
    }
}

/* === Dark Mode Support (Future Enhancement) === */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles will be added here */
}

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

    #map,
    .fixed,
    button {
        display: none !important;
    }
}