/**
 * Tourism Layer Styles
 * Styling voor toeristische locatie markers en popups
 */

/* Tourism Marker Container */
.tourism-marker-container {
    background: transparent !important;
    border: none !important;
}

/* Tourism Marker */
.tourism-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--marker-color) 0%, color-mix(in srgb, var(--marker-color) 80%, black) 100%);
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 0 2px var(--marker-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: tourismMarkerPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0);
}

.tourism-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 0 3px var(--marker-color);
}

@keyframes tourismMarkerPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tourism Icon */
.tourism-icon {
    font-size: 1.2rem;
    line-height: 1;
}

/* Tourism Rating Badge */
.tourism-rating {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #fff;
    color: #1a1a2e;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Tourism Popup */
.tourism-popup .leaflet-popup-content-wrapper {
    background: rgba(22, 33, 62, 0.98);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    padding: 0;
    overflow: hidden;
}

.tourism-popup .leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.tourism-popup .leaflet-popup-tip {
    background: rgba(22, 33, 62, 0.98);
    border: 1px solid rgba(255,255,255,0.1);
}

.tourism-popup .leaflet-popup-close-button {
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    padding: 8px;
    top: 4px;
    right: 4px;
    z-index: 10;
}

.tourism-popup .leaflet-popup-close-button:hover {
    color: #fff;
}

/* Popup Content */
.tourism-popup-content {
    color: #fff;
}

.tourism-popup-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
}

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

.tourism-popup-image:hover img {
    transform: scale(1.05);
}

.tourism-popup-body {
    padding: 14px;
    min-width: 280px;
}

/* Mobile responsive popup */
@media (max-width: 480px) {
    .tourism-popup .leaflet-popup-content {
        margin: 0 !important;
        width: calc(100vw - 60px) !important;
        max-width: 320px !important;
    }
    
    .tourism-popup-body {
        padding: 12px;
        min-width: auto;
    }
    
    .tourism-popup-image {
        height: 140px;
    }
    
    .tourism-popup-title {
        font-size: 1.1rem;
    }
    
    .tourism-popup-actions {
        flex-direction: column;
    }
    
    .tourism-popup-btn {
        justify-content: center;
    }
    
    .tourism-review-item {
        flex: 0 0 85%;
        min-width: 0;
    }
}

.tourism-popup-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #fff;
    line-height: 1.3;
}

.tourism-popup-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tourism-popup-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
}

.tourism-popup-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fbbf24;
}

.tourism-popup-rating small {
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
}

.tourism-popup-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.tourism-popup-address {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 12px 0;
}

/* Popup Actions */
.tourism-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.tourism-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tourism-popup-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.tourism-popup-btn-primary {
    background: #10b981;
    flex: 1;
    justify-content: center;
}

.tourism-popup-btn-primary:hover {
    background: #059669;
}

.tourism-popup-btn svg {
    flex-shrink: 0;
}

/* Reviews Container */
.tourism-reviews-container {
    margin: 12px 0;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.tourism-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.tourism-reviews-count {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.tourism-reviews-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
    padding-bottom: 8px;
}

.tourism-reviews-slider::-webkit-scrollbar {
    height: 4px;
}

.tourism-reviews-slider::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.tourism-reviews-slider::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.tourism-review-item {
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: rgba(255,255,255,0.08);
    padding: 12px;
    border-radius: 8px;
    position: relative;
}

.tourism-review-translate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.2);
    border: none;
    border-radius: 6px;
    color: #60a5fa;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tourism-review-translate:hover {
    background: rgba(59, 130, 246, 0.3);
}

.tourism-review-translate svg {
    width: 12px;
    height: 12px;
}

.tourism-reviews-loading {
    padding: 12px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

.tourism-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tourism-review-author {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.tourism-review-rating {
    font-size: 0.6rem;
}

.tourism-review-text {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.tourism-review-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.4);
}

/* Tourism Loading */
#tourism-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 20px 28px;
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    min-width: 280px;
}

#tourism-loading.visible {
    opacity: 1;
    visibility: visible;
}

.tourism-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tourism-loading-text {
    text-align: center;
}

.tourism-loading-status {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.tourism-loading-detail {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.tourism-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.tourism-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.tourism-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: tourismSpin 0.8s linear infinite;
}

@keyframes tourismSpin {
    to { transform: rotate(360deg); }
}

/* Tourism Zoom Message */
#tourism-zoom-message {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

#tourism-zoom-message.visible {
    opacity: 1;
    visibility: visible;
}

/* Tourism Controls */
#tourism-controls {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateX(100px);
    z-index: 1000;
    display: flex;
    gap: 8px;
    align-items: center;
}

#tourism-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 14px;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

#tourism-search-btn .btn-text-short {
    display: none;
    opacity: 0;
}

#tourism-search-btn.compact .btn-text-full {
    animation: textFadeOut 0.8s ease forwards;
}

#tourism-search-btn.compact .btn-text-short {
    display: inline;
    animation: textFadeIn 0.8s ease forwards;
    animation-delay: 0.4s;
}

#tourism-search-btn:hover {
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

#tourism-search-btn .icon {
    display: flex;
    align-items: center;
}

#tourism-search-btn .icon svg {
    width: 18px;
    height: 18px;
    color: #10b981;
}

#tourism-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 12px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: all 0.25s ease;
    position: relative;
}

#tourism-filter-btn:hover {
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

#tourism-filter-btn svg {
    width: 18px;
    height: 18px;
}

#tourism-filter-btn .filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #10b981;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tourism-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    transition: all 0.25s ease;
}

#tourism-clear-btn.visible {
    display: flex;
}

#tourism-clear-btn:hover {
    background: #ef4444;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
}

#tourism-clear-btn svg {
    width: 18px;
    height: 18px;
}

/* Tourism Filter Panel */
#tourism-filter-panel {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%) translateX(100px);
    z-index: 1001;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: 240px;
    overflow: hidden;
}

#tourism-filter-panel.hidden {
    display: none;
}

.tourism-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.tourism-filter-header button {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    display: flex;
}

.tourism-filter-header button:hover {
    color: #333;
}

.tourism-filter-header svg {
    width: 18px;
    height: 18px;
}

.tourism-filter-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.tourism-filter-actions button {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tourism-filter-actions button:hover {
    background: #f3f4f6;
    border-color: #10b981;
}

.tourism-filter-list {
    padding: 12px 16px;
    max-height: 300px;
    overflow-y: auto;
}

.tourism-filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.85rem;
    color: #333;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.tourism-filter-list label:last-child {
    border-bottom: none;
}

.tourism-filter-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    #tourism-controls {
        top: 40px;
        transform: translateX(-50%) translateX(85px);
    }
    
    #tourism-search-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    #tourism-filter-btn,
    #tourism-clear-btn {
        width: 36px;
        height: 36px;
    }
    
    #tourism-filter-panel {
        top: 85px;
        transform: translateX(-50%) translateX(85px);
        width: 220px;
    }
    
    .tourism-marker {
        width: 38px;
        height: 38px;
    }
    
    .tourism-icon {
        font-size: 1rem;
    }
    
    .tourism-popup .leaflet-popup-content {
        width: 250px !important;
    }
    
    .tourism-popup-image {
        height: 120px;
    }
    
    .tourism-popup-body {
        padding: 12px;
    }
    
    .tourism-popup-body h3 {
        font-size: 0.9rem;
    }
    
    #tourism-zoom-message {
        bottom: 160px;
        font-size: 0.8rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    #tourism-toggle {
        top: 45px;
        transform: translateX(-50%) translateX(50px);
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    #tourism-toggle .toggle-text {
        display: none;
    }
    
    .tourism-marker {
        width: 34px;
        height: 34px;
    }
}
