/* ==============================================
   ENHANCED MAP SEARCH WITH GOOGLE MAPS PLACES API
   Desktop & Mobile Autocomplete Search
   ============================================== */

/* ==============================================
   ROUTE DETAILS SECTION
   ============================================== */

#route-details {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(247, 183, 49, 0.1);
    margin-bottom: 2rem;
}

#route-details h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 800;
    text-align: center;
    position: relative;
}

#route-details h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #f7b731, #f97316);
    border-radius: 4px;
}

.route-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ==============================================
   ENHANCED SEARCH CONTAINER
   ============================================== */

.enhanced-search-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .enhanced-search-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ==============================================
   SEARCH INPUT GROUPS
   ============================================== */

.search-input-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.search-input-group label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.pickup-icon {
    color: #f7b731;
    font-size: 1.2rem;
    animation: pulse-pickup 2s infinite;
}

.destination-icon {
    color: #e74c3c;
    font-size: 1.2rem;
    animation: pulse-destination 2s infinite;
}

@keyframes pulse-pickup {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes pulse-destination {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ==============================================
   SEARCH INPUTS
   ============================================== */

.search-input-group input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 3px solid #e1e8ed;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 5;
}

.search-input-group input:focus {
    border-color: #f7b731;
    outline: none;
    box-shadow: 0 6px 20px rgba(247, 183, 49, 0.2);
    transform: translateY(-2px);
}

.search-input-group input::placeholder {
    color: #8d9db6;
    font-weight: 400;
}

/* ==============================================
   GOOGLE MAPS AUTCOMPLETE STYLING
   ============================================== */

/* Override Google Maps autocomplete styling */
.pac-container {
    border-radius: 15px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border: 2px solid #e1e8ed !important;
    margin-top: 5px !important;
    font-family: inherit !important;
    z-index: 10000 !important;
}

.pac-item {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

.pac-item:hover {
    background: rgba(247, 183, 49, 0.05) !important;
    color: #2c3e50 !important;
}

.pac-item-selected {
    background: rgba(247, 183, 49, 0.1) !important;
    color: #f7b731 !important;
    font-weight: 600 !important;
}

.pac-item-query {
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.pac-item-query:hover {
    color: #f7b731 !important;
}

.pac-matched {
    font-weight: 700 !important;
    color: #f7b731 !important;
}

/* Mobile-specific autocomplete styling */
@media (max-width: 768px) {
    .pac-container {
        border-radius: 10px !important;
        margin-top: 2px !important;
        max-height: 200px !important;
    }
    
    .pac-item {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.95rem !important;
    }
}

/* ==============================================
   MAP CONTAINER
   ============================================== */

.map-container {
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border: 3px solid #e1e8ed;
    margin-bottom: 2rem;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

@media (max-width: 768px) {
    .map-container {
        height: 350px;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .map-container {
        height: 300px;
    }
}

/* Map loading state */
.map-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #f7b731;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.map-container.loaded::before {
    display: none;
}

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

/* ==============================================
   ENHANCED PRICE DISPLAY
   ============================================== */

.enhanced-price-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 3px solid #e1e8ed;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.enhanced-price-display.has-price {
    border-color: #f7b731;
    background: linear-gradient(135deg, rgba(247, 183, 49, 0.05) 0%, rgba(249, 115, 22, 0.03) 100%);
    box-shadow: 0 8px 25px rgba(247, 183, 49, 0.2);
}

.price-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6c757d;
}

.price-placeholder i {
    font-size: 3rem;
    color: #f7b731;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.price-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    max-width: 400px;
}

.price-details {
    display: none;
    text-align: center;
}

.price-details.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

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

.route-price {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f7b731 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.route-distance {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.route-duration {
    font-size: 1rem;
    color: #8d9db6;
    font-weight: 500;
}

/* ==============================================
   LOCATION DETAILS DISPLAY
   ============================================== */

.location-details-display {
    background: linear-gradient(135deg, rgba(247, 183, 49, 0.08) 0%, rgba(249, 115, 22, 0.05) 100%);
    border: 3px solid #f7b731;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 8px 25px rgba(247, 183, 49, 0.2);
    animation: slideUp 0.5s ease;
}

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

.selected-location-info h3,
.distance-info h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.location-name,
.distance-details {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
    border-left: 4px solid #f7b731;
    padding-left: 1rem;
}

/* ==============================================
   POPULAR LOCATIONS
   ============================================== */

.popular-locations {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.popular-location-btn {
    background: rgba(247, 183, 49, 0.1);
    border: 1px solid rgba(247, 183, 49, 0.3);
    color: #f7b731;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popular-location-btn:hover {
    background: rgba(247, 183, 49, 0.2);
    border-color: #f7b731;
    transform: translateY(-1px);
}

/* ==============================================
   MOBILE OPTIMIZATIONS
   ============================================== */

@media (max-width: 768px) {
    #route-details {
        padding: 1.5rem;
    }
    
    #route-details h2 {
        font-size: 2rem;
    }
    
    .route-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .search-input-group input {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .enhanced-price-display {
        padding: 1.5rem;
    }
    
    .price-placeholder i {
        font-size: 2.5rem;
    }
    
    .route-price {
        font-size: 2rem;
    }
    
    .location-details-display {
        padding: 1.5rem;
    }
    
    .popular-locations {
        justify-content: center;
    }
    
    .popular-location-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    #route-details {
        padding: 1rem;
    }
    
    #route-details h2 {
        font-size: 1.8rem;
    }
    
    .search-input-group input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .enhanced-price-display {
        padding: 1rem;
    }
    
    .price-placeholder p {
        font-size: 1rem;
    }
    
    .route-price {
        font-size: 1.8rem;
    }
}

/* ==============================================
   ACCESSIBILITY & FOCUS STATES
   ============================================== */

.search-input-group input:focus-visible {
    outline: 3px solid #f7b731;
    outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .search-input-group input {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pickup-icon,
    .destination-icon,
    .price-placeholder i {
        animation: none;
    }
    
    .search-input-group input {
        transition: none;
    }
} 