/* ============================================================
   Scoped CSS for POV Interactive Chart Component
   Namespace prefix: .pov-
   ============================================================ */

.pov-chartbox {
    --pov-navy:    #061126;
    --pov-purple:  #4b00b5;
    --pov-blue:    #0f66b7;
    --pov-orange:  #e67700;
    --pov-green:   #18a34a;
    --pov-red:     #d92b2b;
    --pov-adverse: rgba(109, 32, 230, 0.11);
    --pov-opport:  rgba(24, 163, 74,  0.12);
    --pov-allowed: rgba(15, 102, 183, 0.09);

    position: relative;
    width: 100%;
    max-width: 100%;
    background: rgba(248, 249, 255, 0.95);
    border: 1px solid rgba(6, 17, 38, 0.08);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(6, 17, 38, 0.13);
    padding: 30px 40px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--pov-navy);
}

svg.pov-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.pov-axis {
    stroke: rgba(6, 17, 38, 0.72);
    stroke-width: 1.4;
}

.pov-grid {
    stroke: rgba(6, 17, 38, 0.17);
    stroke-dasharray: 4 4;
}

.pov-tick,
.pov-label {
    fill: var(--pov-navy);
    font-size: 13px;
    font-weight: 650;
}

.pov-label {
    font-size: 15px;
    font-weight: 760;
}

/* Callout annotation group */
.pov-call text {
    fill: var(--pov-purple);
    font-size: 13px;
    font-weight: 800;
}

.pov-call circle {
    stroke: var(--pov-purple);
    stroke-width: 1.2;
}

.pov-call path,
.pov-call line {
    stroke: var(--pov-purple);
    stroke-width: 1.4;
    fill: none;
}

.pov-call polygon {
    fill: var(--pov-purple);
}

/* Zone window text labels inside zone rectangles */
.pov-zone-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    font-style: italic;
    pointer-events: none;
    user-select: none;
}

/* ---- Legend ---- */
.pov-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 24px 0;
    font-weight: 700;
}

.pov-legend-row1,
.pov-legend-row2 {
    display: flex;
    justify-content: center;
    gap: 20px 28px;
    flex-wrap: wrap;
}

.pov-lg {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--pov-navy);
    white-space: nowrap;
}

/* Solid swatch (filled area) */
.pov-sw {
    width: 24px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Line swatch */
.pov-ln {
    width: 30px;
    border-top: 3px solid currentColor;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.pov-ln::after {
    content: "";
    position: absolute;
    left: 11px;
    top: -7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    border: 2px solid white;
}

/* Dashed-line swatch */
.pov-dash {
    width: 30px;
    border-top: 3px dashed currentColor;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ---- Tooltip ---- */
.pov-tip {
    position: fixed;
    z-index: 1050;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -115%);
    background: rgba(6, 17, 38, 0.94);
    color: white;
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 200px;
    font-size: 13px;
    box-shadow: 0 16px 40px rgba(6, 17, 38, 0.28);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    transition: opacity 0.15s ease;
}

.pov-tip b {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #18a34a;
}

/* ---- Mobile rotate notice ---- */
.pov-mobile-notice {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(75, 0, 181, 0.05);
    border: 1px dashed rgba(75, 0, 181, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--pov-purple);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.pov-mobile-notice svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    fill: currentColor;
    animation: pov-rotate-pulse 2s infinite ease-in-out;
}

@keyframes pov-rotate-pulse {
    0%,
    100% { transform: rotate(0deg); }
    50%   { transform: rotate(90deg); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
    .pov-chartbox {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .pov-tick,
    .pov-label {
        font-size: 11px;
    }

    .pov-legend {
        padding: 15px 10px 0;
        gap: 12px 16px;
    }

    .pov-lg {
        font-size: 12px;
    }
}

/* Portrait mobile: show rotate notice, hide callouts */
@media (max-width: 991px) and (orientation: portrait) {
    .pov-mobile-notice {
        display: flex;
    }

    .pov-call {
        display: none !important;
    }
}

/* Extra-narrow: always hide callouts to prevent overlap */
@media (max-width: 575px) {
    .pov-call {
        display: none !important;
    }
}
