﻿body {
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.animate-fade-in {
    animation: fade-in 0.25s ease-out forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.map-container {
    background-color: #f0f7ff;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vietnam-map-wrapper {
    position: absolute;
    aspect-ratio: 3546 / 2280;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    /* Tăng thời gian transition lên 0.8s để đồng bộ với logic xử lý ảnh */
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform-origin 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    flex-shrink: 0;
}

.map-image {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.4s ease-in-out;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.marker-visuals {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.map-marker:hover .marker-visuals {
    transform: scale(1.1);
}

.map-marker .label {
    position: absolute;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #0f172a;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 2px 4px rgba(0,0,0,0.1);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 30;
}

.label-bottom {
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
}

.label-top {
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
}

.label-left {
    right: 110%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 6px;
}

.label-right {
    left: 110%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
}

@media (min-width: 768px) {
    .map-marker .label {
        font-size: 14px;
    }
}

.accordion-content {
    transition: max-height 0.35s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

    .accordion-content.open {
        max-height: 2000px;
        opacity: 1;
    }

@keyframes ripple-effect {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(4.5);
        opacity: 0;
    }
}

.marker-ripple, .marker-ripple-2 {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: rgba(239, 68, 68, 0.6);
    border-radius: 50%;
    animation: ripple-effect 2.2s ease-out infinite;
    pointer-events: none;
    z-index: 1;
}

.marker-ripple-2 {
    animation-delay: 1.1s;
    background-color: rgba(239, 68, 68, 0.4);
}

.ring-effect {
    position: relative;
    width: 15px;
    height: 15px;
    background-color: #dc2626;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: background-color 0.3s ease;
}

.map-marker.marker-selected {
    z-index: 50;
    opacity: 1;
}

    .map-marker.marker-selected .marker-visuals {
        transform: scale(1.6);
    }

    .map-marker.marker-selected .ring-effect {
        background-color: #991b1b;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
    }

#hover-card.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

