/* location-pins.css - Styles for map markers (region + location + resort level) */
/* Used as custom HTML elements inside Mapbox GL JS markers */

/* ══════════════════════════════════════════════════════════
   LOCATION PIN MARKERS (Region → State/Subregion level)
   ══════════════════════════════════════════════════════════ */

.location-pin-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.location-pin-marker:hover {
    transform: scale(1.1);
    z-index: 10000 !important;
}

.location-pin-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: #111827;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.08);
    transition: all 0.25s;
    position: relative;
}

.location-pin-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.15);
    animation: locPulse 3s ease-in-out infinite;
}

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

.location-pin-marker:hover .location-pin-icon {
    border-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 24px rgba(56, 189, 248, 0.2);
    transform: scale(1.05);
}

.location-pin-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.location-pin-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #e2e8f0;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   RESORT PIN MARKERS (Location → Resort level)
   ══════════════════════════════════════════════════════════ */

.resort-pin-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.resort-pin-marker:hover {
    transform: scale(1.08);
    z-index: 10000 !important;
}

.resort-pin-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: all 0.25s;
}

.resort-pin-marker:hover .resort-pin-logo {
    border-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.2);
}

.resort-pin-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.resort-pin-logo-fallback {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resort-pin-logo-fallback svg {
    width: 100%;
    height: 100%;
}

.resort-pin-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.resort-pin-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #e2e8f0;
    text-overflow: ellipsis;
    overflow: hidden;
}

.resort-pin-outer {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.25s;
}

.resort-pin-marker:hover .resort-pin-outer {
    border-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
}

.resort-pin-score {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
}

/* ══════════════════════════════════════════════════════════
   MAPBOX POPUP OVERRIDES
   ══════════════════════════════════════════════════════════ */

.resort-popup-container .mapboxgl-popup-content {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.resort-popup-container .mapboxgl-popup-tip {
    border-top-color: #0f172a;
}

.resort-popup-container .mapboxgl-popup-close-button {
    color: #94a3b8;
    font-size: 1rem;
}

.resort-popup-container .mapboxgl-popup-close-button:hover {
    color: #e2e8f0;
}

.resort-popup strong {
    font-size: 0.88rem;
    color: #f1f5f9;
}

.popup-stats {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.popup-diff {
    margin-top: 0.2rem;
    font-size: 0.75rem;
}

.popup-rating {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #fbbf24;
}

.popup-desc {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ══════════════════════════════════════════════════════════
   MAPBOX STYLE TOGGLE
   ══════════════════════════════════════════════════════════ */

.mb-style-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    gap: 2px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px;
    backdrop-filter: blur(8px);
}

.mb-style-btn {
    background: none;
    border: none;
    padding: 0.3rem 0.45rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.mb-style-btn.active {
    background: #1f2937;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mb-style-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.03);
}

/* ══════════════════════════════════════════════════════════
   RESORT DETAIL MARKER (3D map view)
   ══════════════════════════════════════════════════════════ */

.mb-detail-marker {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(12, 18, 34, 0.7);
    border: 2px solid #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* ══════════════════════════════════════════════════════════
   TOKEN MISSING FALLBACK
   ══════════════════════════════════════════════════════════ */

.mapbox-token-missing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    gap: 0.5rem;
}

.mapbox-token-missing .token-hint {
    font-size: 0.75rem;
    color: #64748b;
}

.mapbox-token-missing code {
    background: #1a2236;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.72rem;
}

/* ══════════════════════════════════════════════════════════
   DIFFICULTY DOTS
   ══════════════════════════════════════════════════════════ */

.diff-dot { margin-right: 2px; }
.diff-dot.green { color: #22c55e; }
.diff-dot.blue { color: #3b82f6; }
.diff-dot.black { color: #1e293b; text-shadow: 0 0 2px #fff; }
.diff-dot.dblack { color: #1e293b; text-shadow: 0 0 2px #fff; font-size: 0.6em; }