/* Custom Premium Design System for Marrni (مَرّني) */

@font-face {
    font-family: 'Al Jazeera';
    src: url('Al-Jazeera-Arabic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-bg: #ffffff;
    --primary-light: #f8f9fa;
    --primary-dark: #0037ff;
    --accent-color: #10cf7b;
    --accent-hover: #0ea964;
    --text-color: #0b1e4f;
    --text-muted: #718096;
    --danger-color: #e53e3e;
    --success-color: #38a169;
    --card-bg: #f8f9fa;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Al Jazeera', 'Cairo', sans-serif;
    background-color: #f3f4f6;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

/* App Layout */
#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 480px; /* Force mobile-app style view for screenshot accuracy */
    background-color: #ffffff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Header */
.app-header {
    background-color: #ffffff;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-back-btn {
    background: transparent;
    border: none;
    color: #003eff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header-back-btn:hover {
    transform: scale(1.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -1px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}

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

.plus-btn {
    background-color: var(--accent-color);
    color: #ffffff;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 207, 123, 0.25);
    transition: var(--transition);
}

.plus-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.nav-btn-captain {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(0, 55, 255, 0.15);
    background: transparent;
    color: var(--primary-dark);
}

.nav-btn-captain:hover {
    background-color: rgba(0, 55, 255, 0.05);
}

/* Views Control */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    flex-grow: 1;
}

.view.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* Home View */
#home-view {
    width: 100%;
    padding: 12px 20px;
    gap: 16px;
}

/* Services Cards Grid */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.service-card {
    border-radius: var(--border-radius);
    padding: 24px 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    height: 165px;
    border: none;
}

/* Specific Card Backgrounds mimicking the screenshot exactly */
.taxi-card {
    background-color: #003eff;
    box-shadow: 0 6px 20px rgba(0, 62, 255, 0.2);
    padding: 0;
}

.taxi-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    display: block;
}

.taxi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 62, 255, 0.3);
}

.food-card {
    background-color: #efa292;
    box-shadow: 0 6px 20px rgba(239, 162, 146, 0.2);
}

.food-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 162, 146, 0.3);
}

.box-card {
    background-color: #4ecbb4;
    box-shadow: 0 6px 20px rgba(78, 203, 180, 0.2);
    height: 180px; /* slightly taller due to subtitle & info footer */
    padding-bottom: 35px;
}

.box-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(78, 203, 180, 0.3);
}

.card-info {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    color: #ffffff;
}

.card-info h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.card-info .sub-text {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

.card-image-wrapper {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* White sedan inside the taxi card */
.car-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-image {
    width: 105%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.car-brand-text {
    position: absolute;
    bottom: 40px;
    right: 48px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #003eff;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Cairo', sans-serif;
    transform: skewX(-5deg);
}

.food-image {
    width: 125px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.box-image {
    width: 150px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.box-footer-text {
    position: absolute;
    bottom: 8px;
    right: 32px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    opacity: 0.95;
}

/* Map Layout & Sidebar */
#map-view {
    height: calc(100vh - 66px);
}

.map-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
}

.booking-sidebar {
    width: 380px;
    background-color: rgba(11, 30, 79, 0.95);
    position: relative;
    overflow: hidden;
}

/* Floating Overlay Layout */
.map-floating-header {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

.map-circle-btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-dark);
    box-shadow: none;
    cursor: pointer;
    transition: var(--transition);
}

.map-circle-btn:hover {
    transform: scale(1.1);
    background-color: transparent;
}

.kirkuk-pill {
    pointer-events: auto;
    background-color: #ffffff;
    border: 1.5px solid #003eff;
    color: #003eff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 62, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Floating Address Panel */
.floating-address-panel {
    position: absolute;
    top: 76px;
    left: 70px;
    right: 16px;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 94px;
    z-index: 1000;
}

.booking-bottom-sheet .floating-address-panel {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
    height: auto;
    z-index: auto;
}

.address-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    position: relative;
}

.address-input-row:not(:last-child) {
    border-bottom: 1px solid #edf2f7;
}

.address-input-row i {
    font-size: 1.1rem;
}

.address-input-row .pickup-icon {
    color: #003eff; /* Blue circle for pickup as shown in the screenshot */
}

.address-input-row .dest-icon {
    color: #003eff; /* Blue square/marker for destination as shown in the screenshot */
}

.address-input-row input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3748;
    background: transparent;
}

.address-input-row input::placeholder {
    color: #a0aec0;
}

.gps-btn {
    background: transparent;
    border: none;
    color: #003eff;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.gps-btn:hover {
    transform: scale(1.1);
}

.booking-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #1a202c;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 165px;
    overflow: hidden;
}

.booking-bottom-sheet.searching {
    max-height: 85vh;
    height: 85vh;
    overflow-y: auto;
}

.booking-bottom-sheet.booking-active {
    max-height: 480px;
    overflow-y: auto;
}

.booking-bottom-sheet.searching .search-dropdown {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    box-shadow: none;
    border: none;
    max-height: calc(85vh - 180px);
    margin-top: 10px;
}

/* Surge Warning Banner */
.surge-banner {
    background-color: #fff3f0;
    border: 1px solid rgba(255, 99, 71, 0.15);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
}

.surge-text {
    color: #d9422b;
}

.surge-link {
    color: #003eff;
    cursor: pointer;
    text-decoration: underline;
}

/* Category Tabs */
.sheet-tabs {
    display: flex;
    border-bottom: 2px solid #edf2f7;
    margin-bottom: 4px;
}

.tab-item {
    padding: 8px 16px;
    font-weight: 800;
    font-size: 0.95rem;
    color: #718096;
    cursor: pointer;
}

.tab-item.active {
    color: #003eff;
    border-bottom: 3px solid #003eff;
    margin-bottom: -2.5px;
}

/* Ride Options */
.ride-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ride-option-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 14px;
    border: 2px solid #edf2f7;
    cursor: pointer;
    transition: var(--transition);
}

.ride-option-card.active {
    border-color: #003eff;
    background-color: rgba(0, 62, 255, 0.02);
}

.ride-option-details {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ride-icon-container {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blue-car-svg {
    width: 100%;
    height: auto;
}

.bolt-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #ffd54f;
    color: #003eff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    border: 1.5px solid #ffffff;
}

.ride-text-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ride-badge-economy {
    font-size: 0.65rem;
    font-weight: 700;
    color: #718096;
}

.ride-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a202c;
}

.ride-price-meta {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ride-price-val {
    font-size: 1.15rem;
    font-weight: 900;
    color: #003eff;
}

.ride-price-sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: #718096;
}

#booking-request-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary-booking {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background-color: #003eff;
    color: #ffffff;
    width: 100%;
    margin-top: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 62, 255, 0.2);
}

.btn-primary-booking:hover:not(:disabled) {
    background-color: #0031ca;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 62, 255, 0.3);
}

.btn-primary-booking:disabled {
    background-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    box-shadow: none;
}

/* Captains Badge */
.captains-live-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #718096;
}

.pulse-green {
    width: 8px;
    height: 8px;
    background-color: #10cf7b;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 207, 123, 0.7);
    animation: greenPulse 1.6s infinite;
}

@keyframes greenPulse {
    70% { box-shadow: 0 0 0 6px rgba(16, 207, 123, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 207, 123, 0); }
}

.live-status-card {
    background-color: rgba(56, 161, 105, 0.1);
    border: 1px solid rgba(56, 161, 105, 0.2);
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success-color);
}

.pulses {
    box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 8px rgba(56, 161, 105, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 161, 105, 0);
    }
}

/* Map Area */
.map-container-wrapper {
    flex-grow: 1;
    position: relative;
    height: 100%;
}

#map {
    height: 100%;
    width: 100%;
}

/* Customized leafleft dark styling overlay hint */
.leaflet-container {
    background: var(--primary-bg) !important;
}

.leaflet-tile {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.map-overlay-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 30, 79, 0.85);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #0f2761;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 450px;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.captain-status-box {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-weight: 600;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--success-color);
}

.toggle-switch input:checked + label:before {
    transform: translateX(30px);
}

.sim-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Custom Map Marker Branding */
.custom-captain-marker {
    background: none;
    border: none;
}

.marker-pin-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Car Marker Image (Uber/Careem style) */
.car-marker-3d-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

/* Hide Leaflet popup for captain markers */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    display: none !important;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .map-layout {
        flex-direction: column-reverse;
    }
    
    .booking-sidebar {
        width: 100%;
        height: 50%;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    }
    
    .map-container-wrapper {
        height: 50%;
    }
}

/* Custom Premium Route Markers */
.custom-route-marker-pickup, .custom-route-marker-dest {
    background: none !important;
    border: none !important;
}

.route-marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100px;
    height: 80px;
    pointer-events: none;
}

.marker-label-pill {
    background-color: #ffffff;
    color: var(--text-color);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 2px solid;
    white-space: nowrap;
    margin-bottom: 6px;
    font-family: 'Cairo', sans-serif;
    animation: bounce 2s infinite alternate;
}

.pickup-label {
    border-color: var(--primary-dark);
}

.dest-label {
    border-color: var(--accent-color);
}

.route-marker-pin {
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 3px solid #ffffff;
    position: relative;
}

.route-marker-pin::after {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.pickup-pin {
    background-color: var(--primary-dark);
}

.dest-pin {
    background-color: var(--accent-color);
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

/* Search Results Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-height: 220px;
    overflow-y: auto;
    z-index: 2000;
    margin-top: 4px;
    display: none;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown .search-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #edf2f7;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    direction: rtl;
    text-align: right;
}

.search-dropdown .search-item:last-child {
    border-bottom: none;
}

.search-dropdown .search-item:hover {
    background-color: #f7fafc;
}

.search-dropdown .search-item i {
    color: #003eff;
    font-size: 0.9rem;
}

/* Route Line Style */
.route-line {
    stroke: #003eff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Radar Searching Overlay */
.radar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 30, 79, 0.92);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.radar-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(16, 207, 123, 0.5);
    animation: radarPulse 2s ease-out infinite;
}

.radar-circle.c1 {
    width: 60px;
    height: 60px;
    animation-delay: 0s;
}

.radar-circle.c2 {
    width: 100px;
    height: 100px;
    animation-delay: 0.6s;
}

.radar-circle.c3 {
    width: 140px;
    height: 140px;
    animation-delay: 1.2s;
}

@keyframes radarPulse {
    0% {
        transform: scale(0.3);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.radar-icon {
    width: 50px;
    height: 50px;
    background: #003eff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(0, 62, 255, 0.5);
    z-index: 1;
}

.radar-text {
    margin-top: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Accepted Checkmark Overlay */
.accepted-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 30, 79, 0.92);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.checkmark-container {
    text-align: center;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.checkmark-svg {
    width: 100%;
    height: 100%;
}

.checkmark-circle-bg {
    stroke: #10cf7b;
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circleDraw 0.6s ease-out forwards;
}

.checkmark-check {
    stroke: #10cf7b;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkDraw 0.4s 0.6s ease-out forwards;
}

@keyframes circleDraw {
    100% { stroke-dashoffset: 0; }
}

@keyframes checkDraw {
    100% { stroke-dashoffset: 0; }
}

.accepted-title {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeUp 0.5s 0.8s ease-out forwards;
}

.accepted-captain {
    color: #10cf7b;
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0;
    animation: fadeUp 0.5s 1s ease-out forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Dropdown */
.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background-color: #ffffff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 220px;
    overflow-y: auto;
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: none;
}

.search-dropdown.active {
    display: block;
    animation: dropdownSlide 0.25s ease-out;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    direction: rtl;
    text-align: right;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: rgba(0, 62, 255, 0.04);
}

.search-item i {
    color: #003eff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Premium Leaflet Controls Style */
.leaflet-top.leaflet-left {
    top: 20px !important;
    left: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.leaflet-top.leaflet-left .leaflet-control {
    margin: 0 !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    border-radius: 14px !important;
    overflow: hidden;
    height: 94px !important;
}

.leaflet-bar {
    border: none !important;
    height: 100% !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color) !important;
    border: none !important;
    width: 38px !important;
    height: 47px !important;
    line-height: 47px !important;
    font-size: 1.15rem !important;
    font-weight: bold;
    transition: var(--transition) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaflet-bar a:hover {
    background-color: var(--primary-dark) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

.leaflet-bar a:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}

.leaflet-bar a:last-child {
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
}

/* Captain Assigned Card Styling */
.captain-assigned-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 0;
    animation: slideUp 0.3s ease-out;
}

.assigned-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #edf2f7;
    padding-bottom: 10px;
}

.status-pill {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--success-color);
    background-color: rgba(56, 161, 105, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-green-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--success-color);
    box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7);
    animation: pulse 1.6s infinite;
}

.assigned-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'Cairo', sans-serif;
}

.captain-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captain-avatar-container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f7fafc;
    border: 2px solid var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.captain-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captain-profile-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.captain-profile-info h3 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.captain-car-desc {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.captain-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-call-captain {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(16, 207, 123, 0.2);
}

.btn-call-captain:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    color: #ffffff;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cancel Search Button (on radar overlay) */
.btn-cancel-search {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 28px;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-cancel-search:hover {
    background: rgba(229, 62, 62, 0.7);
    border-color: rgba(229, 62, 62, 0.9);
}

/* Cancel Trip Button (on captain card) */
.btn-cancel-trip {
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--danger-color);
    color: var(--danger-color);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.btn-cancel-trip:hover {
    background: var(--danger-color);
    color: #ffffff;
}

/* Cancel Modal Overlay */
.cancel-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.cancel-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: slideUp 0.3s ease-out;
}

.cancel-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cancel-modal-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cancel-modal-header h3 i {
    color: #e9a100;
    font-size: 1.1rem;
}

.cancel-modal-close {
    background: #f7fafc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.cancel-modal-close:hover {
    background: #edf2f7;
    color: var(--text-color);
}

.cancel-warning-text {
    background: rgba(229, 62, 62, 0.06);
    color: var(--danger-color);
    border: 1px solid rgba(229, 62, 62, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
}

.cancel-reasons-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cancel-reason-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid #edf2f7;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
}

.cancel-reason-item:hover {
    border-color: var(--primary-dark);
    background: rgba(0, 62, 255, 0.02);
}

.cancel-reason-item input[type="radio"] {
    accent-color: var(--primary-dark);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cancel-reason-item input[type="radio"]:checked ~ span {
    color: var(--primary-dark);
    font-weight: 700;
}

.btn-confirm-cancel {
    width: 100%;
    background: var(--danger-color);
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 12px 0;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm-cancel:hover {
    background: #c53030;
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-blue {
    70% {
        box-shadow: 0 0 0 8px rgba(49, 130, 206, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(49, 130, 206, 0);
    }
}
