/**
 * Hotel Map View Styles
 * 
 * @package VisaInsightTravel
 * @version 2.0.0
 */

/* Map Container */
#hotel-map {
    width: 100%;
    min-height: 500px;
    background: #f0f0f0;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}

#hotel-map.loading {
    opacity: 0.6;
    pointer-events: none;
}

#hotel-map.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #ff6b35;
    border-top-color: transparent;
    border-radius: 50%;
    animation: map-spin 1s linear infinite;
    z-index: 10;
}

@keyframes map-spin {
    to { transform: rotate(360deg); }
}

/* Info Window Styles */
.info-window {
    max-width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.info-window-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #f0f0f0;
}

.info-window-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-window-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.info-window-content {
    padding: 12px;
}

.info-window-content h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #003366;
}

.info-window-rating {
    color: #ffc107;
    font-size: 12px;
    margin-bottom: 8px;
}

.info-window-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 8px;
}

.info-window-price span {
    font-size: 12px;
    font-weight: normal;
    color: #999;
}

.info-window-address {
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
    word-break: break-word;
}

.info-window-address i {
    margin-right: 4px;
    color: #ff6b35;
}

.info-window-actions {
    display: flex;
    gap: 8px;
}

.view-details-btn, .book-now-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-details-btn {
    background: #f0f0f0;
    color: #333;
}

.view-details-btn:hover {
    background: #e0e0e0;
}

.book-now-btn {
    background: #ff6b35;
    color: white;
}

.book-now-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

/* Hotel Detail Modal */
.hotel-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 16px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    z-index: 10;
    background: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.hotel-detail-content {
    padding: 0;
}

.hotel-detail-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.hotel-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hotel-detail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hotel-detail-info {
    padding: 20px;
}

.hotel-detail-info h2 {
    margin: 0 0 8px;
    color: #003366;
    font-size: 24px;
}

.hotel-detail-rating {
    color: #ffc107;
    margin-bottom: 12px;
    font-size: 14px;
}

.hotel-detail-address {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotel-detail-address i {
    color: #ff6b35;
}

.hotel-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 15px;
}

.hotel-detail-price span {
    font-size: 14px;
    font-weight: normal;
    color: #999;
}

.hotel-detail-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.amenity-tag {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

.hotel-detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.book-now-btn-large {
    flex: 1;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.book-now-btn-large:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Map Sidebar List */
.map-hotel-list {
    max-height: 500px;
    overflow-y: auto;
}

.map-hotel-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-hotel-item:hover {
    background: #f8f9fa;
}

.map-hotel-item.active {
    background: #fff3e0;
    border-left: 3px solid #ff6b35;
}

.hotel-item-name {
    font-weight: 700;
    color: #003366;
    margin-bottom: 5px;
}

.hotel-item-rating {
    color: #ffc107;
    font-size: 12px;
    margin-bottom: 5px;
}

.hotel-item-price {
    color: #ff6b35;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 5px;
}

.hotel-item-price span {
    font-size: 11px;
    font-weight: normal;
    color: #999;
}

.hotel-item-address {
    font-size: 11px;
    color: #999;
}

/* No Results Message */
.no-hotels-message, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.error-message {
    color: #dc3232;
}

/* Loading Spinner for List */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #ff6b35;
}

.loading-spinner i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    #hotel-map {
        min-height: 350px;
    }
    
    .info-window {
        max-width: 240px;
    }
    
    .hotel-detail-info h2 {
        font-size: 20px;
    }
    
    .hotel-detail-price {
        font-size: 24px;
    }
    
    .book-now-btn-large {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .hotel-detail-image {
        height: 150px;
    }
    
    .hotel-detail-info {
        padding: 15px;
    }
    
    .hotel-detail-info h2 {
        font-size: 18px;
    }
    
    .hotel-detail-price {
        font-size: 20px;
    }
    
    .amenities-list {
        gap: 6px;
    }
    
    .amenity-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Print Styles */
@media print {
    #hotel-map,
    .map-controls,
    .map-hotel-sidebar,
    .modal-close,
    .hotel-detail-actions {
        display: none !important;
    }
    
    .hotel-detail-modal {
        position: relative;
        background: white;
    }
    
    .modal-content {
        box-shadow: none;
        padding: 0;
    }
}