/* =============================================
   ARC Map Plugin — Estilos v5
   ============================================= */

.arc-map-container {
    width: 100%;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Mapa SVG ── */
.arc-map-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    background: transparent;
}

.arc-map-wrapper svg {
    width: 100%;
    height: auto;
    max-width: 1200px;
    filter: drop-shadow(0 8px 28px rgba(0,0,0,0.22));
    display: block;
}

/* ── Paths ── */
.arc-map-wrapper svg path {
    stroke: rgba(255,255,255,0.3);
    stroke-width: 0.5;
    transition: filter 0.15s ease, stroke-width 0.15s ease;
    cursor: default;
}

.arc-map-wrapper svg path:hover {
    stroke-width: 1;
    stroke: rgba(255,255,255,0.7);
    filter: brightness(1.12);
}

.arc-map-wrapper svg path.arc-interactive {
    cursor: pointer;
}

@keyframes arc-pulse {
    0%,100% { filter: brightness(1)    drop-shadow(0 0 0px  rgba(0,168,232,0)); }
    50%      { filter: brightness(1.15) drop-shadow(0 0 10px rgba(0,168,232,0.7)); }
}

.arc-map-wrapper svg path.arc-interactive {
    animation: arc-pulse 2.6s ease-in-out infinite;
}

.arc-map-wrapper svg path.arc-interactive:hover {
    animation: none;
    filter: brightness(1.25) drop-shadow(0 0 14px rgba(0,168,232,0.9));
    stroke-width: 2;
    stroke: rgba(255,255,255,0.95);
}

/* ── Tooltip ── */
.arc-state-tooltip {
    position: fixed;
    background: rgba(8,8,18,0.93);
    color: #fff;
    padding: 6px 13px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    display: none;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
}

.arc-state-tooltip.show { display: block; }

/* ── Leyenda ── */
.arc-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 28px;
    padding: 16px;
}

.arc-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(0,0,0,0.07);
    border: 1.5px solid rgba(0,0,0,0.12);
    transition: background 0.2s, border-color 0.2s;
    cursor: default;
}

.arc-legend-item:hover {
    background: rgba(0,0,0,0.13);
    border-color: rgba(0,0,0,0.22);
}

.arc-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.arc-legend-text {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ── Modal overlay ── */
.arc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    animation: arc-fadein 0.2s ease;
}

@keyframes arc-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal contenido ── */
.arc-modal-content {
    position: relative;
    display: inline-block;
    animation: arc-scalein 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes arc-scalein {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ── Imagen: tamaño natural, solo limitar si es muy grande ── */
.arc-modal-body {
    display: block;
}

.arc-modal-body img {
    display: block;
    /* Tamaño natural de la imagen — sin forzar width ni height */
    width: auto;
    height: auto;
    /* Solo limitar el máximo para pantallas pequeñas */
    max-width: 500px;
    max-height: 700px;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0,0,0,0.7);
    /* Nunca distorsionar */
    object-fit: unset;
}

/* ── Botón X ── */
.arc-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    z-index: 100001;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.35);
    background: rgba(15,15,25,0.9);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 3px 14px rgba(0,0,0,0.6);
    transition: transform 0.2s, background 0.2s;
}

.arc-close-btn:hover {
    background: rgba(255,60,60,0.85);
    border-color: rgba(255,100,100,0.5);
    transform: scale(1.1) rotate(90deg);
}

/* ── Loader ── */
.arc-info-message {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.4);
}

@keyframes arc-spin { to { transform: rotate(360deg); } }

.arc-loading {
    display: inline-block;
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: #00A8E8;
    border-radius: 50%;
    animation: arc-spin 0.75s linear infinite;
}

/* ── Responsive móvil ── */
@media (max-width: 600px) {
    .arc-modal-body img {
        max-width: 90vw;
        max-height: 75vh;
    }
    .arc-legend { gap: 6px 8px; padding: 10px; }
    .arc-legend-item { padding: 7px 12px; }
    .arc-legend-text { font-size: 11px; }
    .arc-close-btn { top: -12px; right: -12px; width: 30px; height: 30px; font-size: 16px; }
}
