/**
 * Hotel Map Locator Module - Styles
 * For use with mod_articles/hotel-map.php layout
 * Joomla 6 - Articles Module (Dynamic Mode)
 * @version 1.0
 */

/* ==========================================================================
   Hotel Map Wrapper
   ========================================================================== */

.hotel-map-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 0.75rem;
}

/* ==========================================================================
   Map Header
   ========================================================================== */

.hotel-map-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    text-align: center;
}

.hotel-map-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.hotel-map-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.4;
}

/* ==========================================================================
   Map Container
   ========================================================================== */

.hotel-map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    background: #f5f7fa;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 8px;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.map-popup-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.map-popup-content h4 {
    color: #1a202c;
}

.map-popup-content a {
    transition: all 0.2s ease;
}

.map-popup-content a:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Custom marker styles */
.map-center-marker,
.map-hotel-marker {
    cursor: pointer;
}

/* ==========================================================================
   Hotel List Below Map
   ========================================================================== */

.hotel-map-list {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hotel-map-list-title {
    margin: 0 0 1.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.hotel-map-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ==========================================================================
   Hotel Map Item Cards
   ========================================================================== */

.hotel-map-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.hotel-map-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.hotel-map-item.highlighted {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.hotel-map-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hotel-map-item-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Item Image
   ========================================================================== */

.hotel-map-item-image {
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hotel-map-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hotel-map-item:hover .hotel-map-item-image img {
    transform: scale(1.08);
}

/* ==========================================================================
   Item Content
   ========================================================================== */

.hotel-map-item-content {
    padding: 1rem;
}

.hotel-map-item-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.3;
}

.hotel-map-item-distance {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hotel-map-item-distance svg {
    flex-shrink: 0;
    color: #667eea;
}

.hotel-map-item-address {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.4;
}

/* ==========================================================================
   Item Tags
   ========================================================================== */

.hotel-map-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.hotel-map-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.hotel-map-no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #718096;
}

.hotel-map-no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.hotel-map-no-results p {
    color: #718096;
    font-size: 1rem;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
    .hotel-map-wrapper {
        padding: 1.25rem 0.5rem;
    }
    
    .hotel-map-header {
        padding: 1.25rem;
    }
    
    .hotel-map-header h2 {
        font-size: 1.5rem;
    }
    
    .hotel-map-subtitle {
        font-size: 0.9rem;
    }
    
    .hotel-map-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 0.875rem;
    }
}

@media (max-width: 768px) {
    .hotel-map-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .hotel-map-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .hotel-map-header h2 {
        font-size: 1.35rem;
    }
    
    .hotel-map-subtitle {
        font-size: 0.85rem;
    }
    
    .hotel-map-container {
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .hotel-map-list {
        padding: 1.25rem;
        border-radius: 8px;
    }
    
    .hotel-map-list-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .hotel-map-items {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.75rem;
    }
    
    .hotel-map-item-image {
        height: 120px;
    }
    
    .hotel-map-item-content {
        padding: 0.875rem;
    }
    
    .hotel-map-item-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hotel-map-wrapper {
        padding: 0.75rem 0.375rem;
    }
    
    .hotel-map-header {
        padding: 0.875rem;
        border-radius: 8px;
    }
    
    .hotel-map-header h2 {
        font-size: 1.2rem;
    }
    
    .hotel-map-subtitle {
        font-size: 0.8rem;
    }
    
    .hotel-map-container {
        border-radius: 6px;
    }
    
    .hotel-map-list {
        padding: 1rem;
        border-radius: 6px;
    }
    
    .hotel-map-list-title {
        font-size: 1.2rem;
    }
    
    .hotel-map-items {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .hotel-map-item-image {
        height: 160px;
    }
    
    .hotel-map-item-content {
        padding: 0.75rem;
    }
    
    .hotel-map-item-title {
        font-size: 0.95rem;
    }
    
    .hotel-map-item-distance {
        font-size: 0.85rem;
    }
    
    .hotel-map-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .hotel-map-container {
        height: 400px !important;
        break-inside: avoid;
    }
    
    .hotel-map-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hotel-map-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

.hotel-map-item:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.hotel-map-item-link:focus {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .hotel-map-item,
    .hotel-map-item-image img,
    .map-popup-content a {
        transition: none;
    }
    
    .hotel-map-item:hover {
        transform: none;
    }
    
    .hotel-map-item:hover .hotel-map-item-image img {
        transform: none;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .hotel-map-list {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .hotel-map-list-title {
        color: #f7fafc;
    }
    
    .hotel-map-item {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .hotel-map-item-title {
        color: #f7fafc;
    }
    
    .hotel-map-item-distance {
        color: #cbd5e0;
    }
    
    .hotel-map-tag {
        background: rgba(102, 126, 234, 0.2);
        color: #a0aec0;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.hotel-map-container.loading {
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

/* ==========================================================================
   Leaflet Control Customization
   ========================================================================== */

.leaflet-control-zoom a {
    color: #667eea !important;
}

.leaflet-control-zoom a:hover {
    color: #5568d3 !important;
}

.leaflet-bar {
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}
