/* =========================
   VIEWER LAYOUT
========================= */

.viewer-page {
    position: relative;
    height: calc(100dvh - var(--hpv-header-height));
    min-height: calc(100dvh - var(--hpv-header-height));
    overflow: hidden;
    background: #111;
}

.viewer-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #000;
}

.viewer-canvas,
#panorama {
    width: 100%;
    height: 100%;
    background: #000;
}

/* =========================
   TOPBAR
========================= */

.viewer-topbar {
    position: absolute;
    top: 20px;
    left: 76px;
    right: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.viewer-topbar-card {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.viewer-location-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
}

.viewer-location-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.viewer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.viewer-actions .btn {
    border-radius: 999px;
}

/* =========================
   DEBUG
========================= */

.viewer-debug {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    min-width: 180px;
    font-size: 14px;
    line-height: 1.4;
}

.viewer-debug-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* =========================
   HOTSPOTS LEGACY
========================= */

.hpv-hotspot {
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.85);
    border: 3px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    position: relative;
}

.hpv-hotspot::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    border-top: 4px solid #fff;
    border-right: 4px solid #fff;
    transform: translate(-60%, -50%) rotate(45deg);
}

.hpv-hotspot-label {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

/* =========================
   HOTSPOTS PANNELLUM
========================= */

.pnlm-hotspot-base.hpv-nav-hotspot {
    width: 64px !important;
    height: 64px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.18s ease, filter 0.18s ease !important;
}

.pnlm-hotspot-base.hpv-nav-hotspot:hover {
    transform: scale(1.06);
    filter: brightness(1.04);
}

.pnlm-hotspot-base.hpv-nav-hotspot::before {
    content: "";
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(184, 176, 154, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.98);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.28),
        0 0 0 5px rgba(184, 176, 154, 0.28);
    backdrop-filter: blur(6px);
}

.pnlm-hotspot-base.hpv-nav-hotspot::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-top: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
    transform: rotate(-45deg);
    margin-top: 2px;
}

.pnlm-hotspot-base.hpv-nav-hotspot span {
    position: absolute !important;
    left: 50% !important;
    top: calc(100% + 8px) !important;
    transform: translateX(-50%) !important;
    display: block !important;
    max-width: 180px;
    padding: 6px 12px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #5f5c55 !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    text-align: center;
    white-space: normal !important;
    line-height: 1.3;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
    z-index: 3 !important;
    opacity: 0 !important;
    transition: opacity 0.18s ease !important;
}

.pnlm-hotspot-base.hpv-nav-hotspot:hover span {
    opacity: 1 !important;
}

/* Hotspot recomendado en ruta */

.pnlm-hotspot-base.hpv-nav-hotspot-next::before {
    background: rgba(184, 176, 154, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.28),
        0 0 0 6px rgba(184, 176, 154, 0.28) !important;
}

.pnlm-hotspot-base.hpv-nav-hotspot-next::after {
    border-top-color: #ffffff !important;
    border-right-color: #ffffff !important;
}

.pnlm-hotspot-base.hpv-nav-hotspot-next span {
    background: rgba(184, 176, 154, 0.96) !important;
    color: #ffffff !important;
}

/* Hotspot secundario durante ruta guiada */

.pnlm-hotspot-base.hpv-nav-hotspot-secondary::before {
    opacity: 0.35 !important;
    transform: scale(0.85);
}

.pnlm-hotspot-base.hpv-nav-hotspot-secondary span {
    opacity: 0.5 !important;
}

/* =========================
   ROUTE / ARRIVAL / BOTTOM CARDS
========================= */

.viewer-route-info {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    z-index: 20;
}

.viewer-arrived {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(184, 176, 154, 0.95);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 30;
}

.viewer-arrived-icon {
    font-size: 14px;
    opacity: 0.9;
}

.viewer-bottom-card,
.viewer-route-panel,
.viewer-arrived-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 50;
}

/* =========================
   TURN INDICATOR
========================= */

.viewer-turn-indicator {
    position: absolute;
    top: 50%;
    z-index: 35;
    transform: translateY(-50%);
    background: rgba(143, 135, 112, 0.96);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.82rem;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

.viewer-turn-indicator.turn-left,
.viewer-turn-indicator.turn-right {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
}

.viewer-turn-arrow {
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 700;
}

.viewer-turn-indicator.turn-left .viewer-turn-arrow {
    transform: rotate(180deg);
}

.viewer-turn-text {
    white-space: nowrap;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767.98px) {
    .viewer-page {
        height: calc(100dvh - var(--hpv-header-height));
        min-height: calc(100dvh - var(--hpv-header-height));
    }

    .viewer-shell {
        height: 100%;
        min-height: 0;
    }

    .viewer-topbar {
        top: 16x;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .viewer-actions {
        width: 100%;
    }

    .viewer-actions .btn {
        flex: 1 1 auto;
    }

    .viewer-debug {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        font-size: 12px;
        min-width: 150px;
    }

    .pnlm-hotspot-base.hpv-nav-hotspot {
        width: 72px !important;
        height: 72px !important;
    }

    .pnlm-hotspot-base.hpv-nav-hotspot::before {
        width: 60px;
        height: 60px;
    }

    .pnlm-hotspot-base.hpv-nav-hotspot::after {
        width: 17px;
        height: 17px;
    }

    .pnlm-hotspot-base.hpv-nav-hotspot span {
        opacity: 1 !important;
        max-width: 140px;
        font-size: 10px !important;
        padding: 5px 10px !important;
        line-height: 1.25;
    }

    .viewer-bottom-card,
    .viewer-route-panel,
    .viewer-arrived-panel {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .viewer-turn-indicator {
        top: 58%;
        padding: 14px 16px;
    }

    .viewer-turn-text {
        display: none;
    }
}


.viewer-location-path {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(188, 178, 154, 0.22);
    color: #6f6859;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.viewer-location-path i {
    font-size: 1rem;
}


/* ==========================================================================
   krpano viewer
   ========================================================================== */

.krpano-viewer-page {
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: #000;
}

.krpano-viewer-page .krpano-viewer-shell {
    position: fixed;
    top: var(--hpv-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: #000;
}

.krpano-viewer-page .krpano-viewer-shell::before {
    content: "";
    position: fixed;
    top: var(--hpv-header-height);
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(255,255,255,.9);
    z-index: 999999;
    pointer-events: none;
}

.krpano-viewer-page #krpano-container {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.krpano-debug-panel {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 20;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.krpano-debug-panel hr {
    border-color: rgba(255,255,255,.25);
    margin: 6px 0;
}



/* ==========================================================================
   krpano hotspots
   ========================================================================== */

.kr-hotspot-root {
    position: relative;
    width: 64px;
    height: 64px;
}

.kr-hotspot-circle {
    position: absolute;
    left: 5px;
    top: 5px;

    width: 54px;
    height: 54px;

    border-radius: 999px;

    background: rgba(184, 176, 154, 0.92);

    border: 2px solid rgba(255,255,255,.98);

    box-shadow:
        0 12px 28px rgba(0,0,0,.28),
        0 0 0 5px rgba(184,176,154,.28);

    backdrop-filter: blur(6px);
}

.kr-hotspot-arrow {
    position: absolute;
    left: 24px;
    top: 23px;

    width: 16px;
    height: 16px;

    border-top: 3px solid #ffffff;
    border-right: 3px solid #ffffff;

    transform: rotate(-45deg);
}

.kr-hotspot-label {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%);

    min-width: 180px;
    max-width: 260px;

    padding: 8px 16px;

    background: rgba(255,255,255,.96);
    color: #5f5c55;

    border-radius: 14px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;

    text-align: center;
    line-height: 1.3;

    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;

    box-shadow: 0 10px 24px rgba(0,0,0,.18);

    transition: opacity .18s ease;

    pointer-events: none;
}

.kr-hotspot-root:hover .kr-hotspot-label {
    opacity: 1 !important;
}

.kr-hotspot-root:hover {
    transform: scale(1.06);
    filter: brightness(1.04);
}

.kr-hotspot-label {
    opacity: 0;
    transition: opacity .18s ease;
}

.kr-hotspot-root:hover .kr-hotspot-label {
    opacity: 1;
}

.kr-hotspot-label br {
    display: none;
}


/* =========================================================
   Aviso de ruta no disponible
   ========================================================= */

.viewer-route-warning {
    position: absolute;
    z-index: 30;
    top: 128px;
    left: 50%;

    display: flex;
    align-items: flex-start;
    gap: 0.9rem;

    width: min(560px, calc(100% - 2rem));
    padding: 1rem 1.1rem;

    border: 1px solid rgba(184, 176, 154, 0.5);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(54, 51, 45, 0.18);

    backdrop-filter: blur(12px);
    transform: translateX(-50%);
}

.viewer-route-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    flex: 0 0 46px;

    border-radius: 15px;

    background: rgba(184, 176, 154, 0.2);
    color: #8f8368;

    font-size: 1.35rem;
}

.viewer-route-warning-content {
    min-width: 0;
    flex: 1;
}

.viewer-route-warning-title {
    margin-bottom: 0.2rem;

    color: #5f5c55;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.viewer-route-warning-text {
    color: #77736b;
    font-size: 0.88rem;
    line-height: 1.45;
}

.viewer-route-warning-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.viewer-route-warning-primary,
.viewer-route-warning-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 0.55rem 0.95rem;

    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.viewer-route-warning-primary {
    border: 1px solid #9b9077;
    background: #9b9077;
    color: #fff;
}

.viewer-route-warning-primary:hover {
    background: #857a63;
    border-color: #857a63;
    color: #fff;
}

.viewer-route-warning-secondary {
    border: 1px solid rgba(95, 92, 85, 0.22);
    background: rgba(255, 255, 255, 0.75);
    color: #5f5c55;
}

.viewer-route-warning-secondary:hover {
    border-color: rgba(95, 92, 85, 0.4);
    background: #fff;
    color: #403e39;
}

.viewer-route-warning-primary:active,
.viewer-route-warning-secondary:active {
    transform: translateY(1px);
}

@media (max-width: 575.98px) {
    .viewer-route-warning {
        top: 112px;
        gap: 0.75rem;

        width: calc(100% - 1rem);
        padding: 0.9rem;

        border-radius: 18px;
    }

    .viewer-route-warning-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;

        border-radius: 13px;
        font-size: 1.15rem;
    }

    .viewer-route-warning-actions {
        flex-direction: column;
    }

    .viewer-route-warning-primary,
    .viewer-route-warning-secondary {
        width: 100%;
    }
}


/* =========================================================
   Herramienta de alineación krpano
   ========================================================= */

.viewer-alignment-tool {
    position: absolute;
    inset: 0;
    z-index: 40;
    overflow: hidden;
    pointer-events: none;
}

.viewer-alignment-line {
    position: absolute;
    background-color: rgba(255, 40, 40, 0.95);
    pointer-events: none;
}

.viewer-alignment-line-vertical {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    box-shadow:
        -1px 0 0 rgba(255, 255, 255, 0.7),
        1px 0 0 rgba(0, 0, 0, 0.65);
}

.viewer-alignment-line-horizontal {
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    transform: translateY(-50%);
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.7),
        0 1px 0 rgba(0, 0, 0, 0.65);
}

.viewer-alignment-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 40, 40, 0.98);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.9),
        0 0 6px rgba(0, 0, 0, 0.85);
}

.viewer-alignment-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 40, 40, 1);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.viewer-alignment-values {
    position: absolute;
    top: auto;
    bottom: 18px;
    left: 50%;
    display: flex;
    gap: 16px;
    padding: 7px 12px;
    color: #fff;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transform: translateX(-50%);
    backdrop-filter: blur(3px);
}

.viewer-alignment-values strong {
    font-weight: 600;
}

.viewer-alignment-toggle {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 50;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    padding: 0;

    color: #fff;
    font-size: 25px;

    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;

    cursor: pointer;
    backdrop-filter: blur(3px);
}

.viewer-alignment-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

.viewer-alignment-toggle.is-active {
    background: rgba(210, 35, 35, 0.92);
    border-color: rgba(255, 255, 255, 0.75);
}

.viewer-alignment-toggle:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

@media (max-width: 576px) {
    .viewer-alignment-values {
        top: 10px;
        gap: 8px;
        padding: 6px 8px;
        font-size: 11px;
    }

    .viewer-alignment-toggle {
        right: 12px;
        bottom: 12px;
        width: 42px;
        height: 42px;
        font-size: 23px;
    }
}

.krpano-viewer-shell {
    position: relative;
}

.krpano-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

#krpano-container {
    width: 100%;
    height: 100%;
}

.viewer-map-route {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.viewer-map-route.d-none {
    display: none !important;
}

.viewer-map-route-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.viewer-map-route-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .65;
}

.viewer-map-route-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.viewer-map-route-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    font-size: 1.5rem;
    cursor: pointer;
}

.viewer-map-route-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #eef1f4;
}

.viewer-map-route-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.viewer-map-route-viewport.is-panning {
    cursor: grabbing;
}

.viewer-map-route-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 2000px;
    height: 1415px;
    transform-origin: 0 0;
}

.viewer-map-route-canvas img {
    display: block;
    width: 2000px;
    height: 1415px;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.viewer-map-route-canvas svg {
    position: absolute;
    inset: 0;
    width: 2000px;
    height: 1415px;
    pointer-events: none;
}

.viewer-map-route-line {
    fill: none;
    stroke: #206bc4;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.viewer-map-route-start {
    fill: #fff;
    stroke: #206bc4;
    stroke-width: 4;
    vector-effect: non-scaling-stroke;
}

.viewer-map-route-end {
    fill: #206bc4;
    stroke: #fff;
    stroke-width: 4;
    vector-effect: non-scaling-stroke;
}

@media (max-width: 767.98px) {
    .viewer-map-route-header {
        padding: .75rem 1rem;
    }

    .viewer-map-route-title {
        font-size: 1rem;
    }

    .viewer-map-route-footer {
        padding: .65rem .75rem;
        padding-bottom: calc(.65rem + env(safe-area-inset-bottom));
    }

    .viewer-map-route-back {
        min-height: 52px;
        font-size: 1rem;
    }

    .viewer-map-route-line {
        stroke-width: 6;
    }

    .viewer-map-route-start,
    .viewer-map-route-end {
        stroke-width: 4;
    }
}

.viewer-route-label {
    margin-bottom: .15rem;
}

.viewer-route-destination {
    line-height: 1.1;
}

.viewer-route-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .6rem;
}


@media (max-width: 767.98px) {
    .viewer-route-change {
        grid-area: change;
        justify-self: end;
    }
}

.viewer-map-route-footer {
    flex: 0 0 auto;
    padding: .75rem 1rem;
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid rgba(95, 92, 85, .12);
}

.viewer-map-route-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;

    width: 100%;
    min-height: 52px;

    border: 0;
    border-radius: 999px;

    background: #bdb59f;
    color: #fff;

    font: inherit;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;

    cursor: pointer;
}

.viewer-map-route-back:hover,
.viewer-map-route-back:focus-visible {
    background: #aaa189;
}

.viewer-map-route-help {
    margin-top: .15rem;
    font-size: .75rem;
    color: #8c887f;
}

.viewer-map-route-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding: .8rem 1rem;

    background: #fff;
    border-bottom: 1px solid rgba(95, 92, 85, .12);
}

.viewer-map-route-label {
    color: #928d82;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.viewer-map-route-title {
    color: #4f4b45;
    font-size: 1.05rem;
    font-weight: 700;
}


/* =========================================================
   Ruta activa + acceso al plano
   ========================================================= */

.viewer-route-panel.viewer-route-panel-map {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;

    width: fit-content;
    max-width: calc(100% - 2rem);

    box-sizing: border-box;

    margin-left: 1rem;
    margin-right: 1rem;
}

.viewer-route-panel.viewer-route-panel-map .viewer-route-info {
    flex: 1 1 auto;
    min-width: 0;

    display: block;
    position: static;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    box-shadow: none;
    transform: none;
}

.viewer-route-panel.viewer-route-panel-map .viewer-route-label,
.viewer-route-panel.viewer-route-panel-map .viewer-route-destination {
    position: static;

    margin-left: 0;
    margin-right: 0;

    transform: none;
}

.viewer-route-panel.viewer-route-panel-map .viewer-route-label {
    margin-top: 0;
    margin-bottom: .15rem;
}

.viewer-route-panel.viewer-route-panel-map .viewer-route-destination {
    margin-top: 0;
    margin-bottom: 0;
}


.viewer-route-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;

    min-height: 42px;
    padding: .55rem 1rem;

    border: 2px solid #bdb59f;
    border-radius: 999px;

    background: #fff;
    color: #615d55;

    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;

    white-space: nowrap;

    cursor: pointer;
}

.viewer-route-map i {
    flex: 0 0 auto;
    font-size: 1.15rem;
}

.viewer-route-map:hover,
.viewer-route-map:focus-visible {
    background: rgba(189, 181, 159, .10);
}


.viewer-route-panel.viewer-route-panel-map .viewer-route-map,
.viewer-route-panel.viewer-route-panel-map .viewer-route-change {
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {

    .viewer-route-panel.viewer-route-panel-map {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .65rem .5rem;
    }

    .viewer-route-panel.viewer-route-panel-map .viewer-route-info {
        flex: 0 0 100%;
        width: 100%;
    }

    .viewer-route-panel.viewer-route-panel-map .viewer-route-map,
    .viewer-route-panel.viewer-route-panel-map .viewer-route-change {
        flex: 1 1 calc(50% - .25rem);
        min-width: 0;
    }

    .viewer-route-panel.viewer-route-panel-map .viewer-route-map {
        width: auto;
    }

    .viewer-route-panel.viewer-route-panel-map .viewer-route-change {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}