/* ── Karol Map — Leaflet container ── */

.karol-map-wrap {
    position: relative;
    border-radius: 8px;
    border: 1px solid rgba(201, 160, 98, 0.2);
    background: #1a1410;
    transition: border-color 0.3s ease;
}
.karol-map-wrap:hover {
    border-color: rgba(201, 160, 98, 0.4);
}

#karol-map {
    width: 100%;
    height: 320px;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1410;
}

/* Voyager (base clara) invertido → dark mode premium com viés dourado */
.leaflet-tile-pane {
    filter:
        invert(0.92)
        hue-rotate(180deg)
        brightness(1.05)
        saturate(0.55)
        sepia(0.25)
        contrast(0.95);
}

/* Overlay dourado radial com blend */
.karol-map-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(201, 160, 98, 0.06) 0%,
        rgba(201, 160, 98, 0.10) 100%
    );
    pointer-events: none;
    z-index: 400;
    border-radius: 8px;
    mix-blend-mode: overlay;
}

/* Vinheta nas bordas */
.karol-map-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(11, 11, 11, 0.35) 100%
    );
    pointer-events: none;
    z-index: 401;
    border-radius: 8px;
}

/* ── Controles Leaflet ── */
.leaflet-control-zoom { display: none !important; }
.leaflet-control-attribution {
    background: rgba(11, 11, 11, 0.75) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 0.5rem !important;
    padding: 2px 6px !important;
    border-radius: 0 0 8px 0 !important;
}
.leaflet-control-attribution a { color: rgba(255, 255, 255, 0.4) !important; }

/* ── Pin customizado ── */
.karol-custom-pin {
    background: transparent !important;
    border: none !important;
}

.karol-pin {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.karol-pin-logo {
    width: 48px;
    height: 48px;
    background: #0B0B0B;
    border: 2px solid #C9A062;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.karol-pin-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.karol-pin-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    border: 2px solid #C9A062;
    border-radius: 50%;
    animation: karolPulse 2.2s ease-out infinite;
    opacity: 0;
    pointer-events: none;
}

@keyframes karolPulse {
    0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.75; }
    100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

/* ── Popup ── */
.leaflet-popup-content-wrapper {
    background: #0B0B0B !important;
    color: #fff !important;
    border: 1px solid rgba(201, 160, 98, 0.3) !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
    padding: 0 !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    padding: 1rem 1.25rem !important;
    min-width: 200px;
}
.leaflet-popup-tip-container { display: none; }
.leaflet-popup-close-button {
    color: rgba(201, 160, 98, 0.6) !important;
    font-size: 1rem !important;
    top: 6px !important;
    right: 8px !important;
    width: auto !important;
    height: auto !important;
}
.leaflet-popup-close-button:hover { color: #C9A062 !important; }

.karol-popup-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #C9A062;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.karol-popup-divider {
    height: 1px;
    background: rgba(201, 160, 98, 0.25);
    margin-bottom: 0.5rem;
}
.karol-popup-addr {
    font-size: 0.75rem;
    color: #CCC;
    line-height: 1.55;
    margin-bottom: 0.75rem;
}
.karol-popup-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #C9A062;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(201, 160, 98, 0.5);
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
}
.karol-popup-link:hover { background: #C9A062; color: #0B0B0B; }

/* ── Faixa inferior sobre o mapa ── */
.karol-map-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, transparent 100%);
    z-index: 800;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    padding: 0 1rem 0.875rem;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 0 0 8px 8px;
}
.karol-map-bar > * { pointer-events: auto; }

.karol-map-bar-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.karol-map-bar-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.karol-map-bar-addr {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.karol-map-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #C9A062;
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border: 1.5px solid rgba(201, 160, 98, 0.7);
    border-radius: 3px;
    background: rgba(11, 11, 11, 0.6);
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.karol-map-bar-btn:hover {
    background: #C9A062;
    border-color: #C9A062;
    color: #0B0B0B;
}

/* ── Responsivo ── */
@media (max-width: 768px) {
    #karol-map { height: 240px; }
}
