/* Booking Form Styles */
.booking-form {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    /* margin-top: 30px; */
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.map-instruction {
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 14px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

/* Form row for side-by-side fields */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
}

/* Input with clear button wrapper */
.input-with-clear {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-clear .input100 {
    flex: 1;
    padding-right: 45px; /* Make room for clear button */
}

/* Clear button styling */
.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 14px;
    padding: 0;
    z-index: 10;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-50%) scale(1.1);
}

.clear-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.clear-btn i {
    pointer-events: none;
}

.input100 {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    background: white;
}

.input100:focus {
    outline: none;
    border-color: #ffe151;
}

.input100[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.input100:disabled {
    background-color: #f5f5f5;
    cursor: wait;
    opacity: 0.7;
}

/* Fare Estimate */
.fare-estimate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    text-align: center;
}

.fare-estimate h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

.fare-amount {
    font-size: 42px;
    font-weight: 800;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.distance-info {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 10px;
}

/* Submit Button */
.submit-button {
    width: 100%;
    background: linear-gradient(135deg, #ffe151 0%, #ffc107 100%);
    color: #333;
    border: none;
    padding: 16px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 225, 81, 0.4);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 225, 81, 0.6);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status Messages */
.status-message {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

.status-pending {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.status-accepted {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.status-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.status-message p {
    font-size: 16px;
    opacity: 0.95;
}

/* Spinner Animation */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Driver Info */
.driver-info {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.driver-details {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.driver-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffe151;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.driver-text h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #333;
}

.driver-text p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

/* Error Message */
.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.error a {
    color: #f39c12;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}

.error a:hover {
    color: #e67e22;
    text-decoration: none;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Unavailable Banner */
.unavailable-banner {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.unavailable-icon {
    font-size: 36px;
    opacity: 0.9;
}

.unavailable-content h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
}

.unavailable-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

/* Driver Count Indicator */
.driver-count {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    display: inline-block;
}

/* Disabled form state */
#booking-section input:disabled,
#booking-section .stepper-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

#booking-section .stepper-btn:disabled:hover {
    transform: none;
    background: #ffe151;
}

/* Map Panel */
.map-panel {
    flex: 1;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

#map {
    height: 100%;
    width: 100%;
    min-height: 500px;
}

/* Loading state for inputs */
.input100.loading {
    background: linear-gradient(90deg, #f5f5f5 25%, #e0e0e0 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Visual feedback for active input field */
.input100:focus {
    outline: none;
    border-color: #ffe151;
    box-shadow: 0 0 0 3px rgba(255, 225, 81, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-form {
        padding: 20px;
    }

    .section-title {
        font-size: 22px;
    }

    .fare-amount {
        font-size: 32px;
    }

    .submit-button {
        font-size: 16px;
        padding: 14px 25px;
    }

    .driver-details {
        flex-direction: column;
        text-align: center;
    }

    #map {
        min-height: 300px;
    }

    .clear-btn {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .input-with-clear .input100 {
        padding-right: 40px;
    }

    /* Responsive: stack fields on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    /* Mobile: Stack layout vertically and show map below form */
    .flex-w.flex-str.size1 {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
    }

    /* Left side (form) takes full width on mobile */
    .flex-w.flex-str.size1 > .wsize1,
    .flex-w.flex-str.size1 > .bg0 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        height: auto !important;
        min-height: auto !important;
    }

    /* Mobile: Show map below form */
    .map-panel {
        display: block !important;
        width: 100% !important;
        height: 450px !important;
        min-height: 450px !important;
        margin-top: 20px;
        flex: none !important;
        position: relative !important;
        order: 2; /* Ensure map comes after form */
    }

    #map {
        height: 100% !important;
        min-height: 450px !important;
    }
}

/* Autocomplete dropdown */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ffe151;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-suggestions.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.autocomplete-item:hover {
    background: #fff8dc;
}

.autocomplete-item.highlighted {
    background: #ffe151;
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item .place-name {
    font-weight: 600;
    color: #333;
    /* No margin needed since category is hidden */
}

/* Category display removed for cleaner UI */
/*
.autocomplete-item .place-category {
    font-size: 12px;
    color: #666;
}
*/

/* Badge styles removed - no longer showing LOCAL badge */
/* 
.autocomplete-item .place-badge {
    display: inline-block;
    background: #ffe151;
    color: #333;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.autocomplete-item.highlighted .place-badge {
    background: #ffc107;
}
*/

/* No results message */
.autocomplete-no-results {
    padding: 30px 15px;
    text-align: center;
    color: #999;
}

.autocomplete-no-results i {
    display: block;
    font-size: 32px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #ccc;
}

.autocomplete-no-results p {
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.autocomplete-no-results small {
    font-size: 12px;
    color: #999;
}

.autocomplete-no-results strong {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Passenger stepper styles */
.passenger-stepper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.passenger-stepper input[type="number"] {
    width: 80px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.stepper-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffe151;
    background: #ffe151;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.stepper-btn:hover {
    background: #ffd700;
    border-color: #ffd700;
    transform: scale(1.1);
}

.stepper-btn:active {
    transform: scale(0.95);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Tuktuk breakdown styles */
.tuktuk-breakdown {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ffe151;
}

.breakdown-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 15px;
}

.breakdown-header i {
    color: #ffe151;
    margin-right: 8px;
}

.breakdown-item {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
    font-size: 14px;
}

.breakdown-item:last-child {
    border-bottom: none;
}

/* Mobile Scroll Button */
.mobile-scroll-button {
    display: none; /* Hidden by default */
    position: fixed;
    right: 20px;
    bottom: 80px; /* Above back-to-top button */
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffe151 0%, #ffc107 100%);
    color: #333;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9999;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-scroll-button:active {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

/* Show only on mobile/tablet */
@media (max-width: 768px) {
    .mobile-scroll-button {
        display: flex;
    }
}

/* Visual feedback when scrolling is enabled */
.mobile-scroll-button.scrolling {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

/* Disable map interaction when scrolling */
.map-panel.scroll-mode {
    pointer-events: none;
    opacity: 0.7;
}

/* Offline Message on Map */
.offline-message-icon {
    background: transparent;
    border: none;
}

.offline-message-content {
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 280px;
    backdrop-filter: blur(5px);
}

.offline-message-content i {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.offline-message-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
}

.offline-message-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

/* Disabled Request Button */
.submit-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: none;
}

.submit-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive offline message */
@media (max-width: 768px) {
    .offline-message-content {
        min-width: 240px;
        padding: 15px;
    }
    
    .offline-message-content h3 {
        font-size: 18px;
    }
    
    .offline-message-content p {
        font-size: 13px;
    }
}

