/*
 * Observatorul National
 * Componenta grafice interactive
 *
 * Folosita initial pentru istoricul carburantilor.
 * Pregatita pentru reutilizare la curs valutar si energie.
 */
.on-history-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
}

.on-history-head h2{
    margin:0;
    color:#101828;
    font-size:22px;
}

.on-history-head p{
    margin:8px 0 0;
    color:#667085;
    line-height:1.6;
}

.on-history-periods{
    display:flex;
    gap:5px;
    padding:4px;
    background:#f2f4f7;
    border-radius:10px;
    flex-shrink:0;
}

.on-history-periods button{
    border:0;
    background:transparent;
    padding:8px 12px;
    border-radius:7px;
    cursor:pointer;
    color:#475467;
    font-size:13px;
    font-weight:700;
}

.on-history-periods button.active{
    background:#101828;
    color:#fff;
}

.on-history-status{
    margin-top:20px;
    padding:18px;
    border:1px dashed #d0d5dd;
    border-radius:12px;
    background:#f9fafb;
    color:#667085;
}

.on-history-card{
    margin-top:20px;
    padding:18px;
    border:1px solid #eaecf0;
    border-radius:14px;
    background:#fff;
}

.on-history-title{
    font-size:16px;
    font-weight:800;
    color:#101828;
}

.on-history-product{
    margin-top:3px;
    margin-bottom:15px;
    font-size:12px;
    color:#667085;
}

.on-history-svg{
    display:block;
    width:100%;
    height:270px;
}

.on-history-grid{
    stroke:#eaecf0;
    stroke-width:1;
}

.on-history-line{
    fill:none;
    stroke:#d92d20;
    stroke-width:3;
    stroke-linejoin:round;
    stroke-linecap:round;
}

/*
 * Interactivitate grafic
 */
.on-history-svg{
    cursor:crosshair;
    touch-action:pan-y;
}

.on-history-crosshair{
    stroke:#667085;
    stroke-width:1;
    stroke-dasharray:4 4;
    pointer-events:none;
}

.on-history-hover-point{
    fill:#fff;
    stroke:#d92d20;
    stroke-width:3;
    pointer-events:none;
}

.on-history-tooltip-bg{
    fill:#101828;
    opacity:.96;
    pointer-events:none;
}

.on-history-tooltip-text{
    fill:#fff;
    font-size:12px;
    font-weight:700;
    pointer-events:none;
}

.on-history-tooltip-sub{
    fill:#d0d5dd;
    font-size:11px;
    pointer-events:none;
}

.on-history-hitarea{
    fill:transparent;
    pointer-events:all;
}

/*
 * Navigator cronologic
 */
.on-history-navigator{
    position:relative;
    height:82px;
    margin:12px 0 6px;
    border:1px solid #d0d5dd;
    border-radius:10px;
    background:#f9fafb;
    overflow:hidden;
    user-select:none;
    touch-action:none;
}

.on-history-navigator-svg{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    pointer-events:none;
}

.on-history-navigator-line{
    fill:none;
    stroke:#98a2b3;
    stroke-width:2;
    vector-effect:non-scaling-stroke;
}

.on-history-nav-shade{
    position:absolute;
    top:0;
    bottom:0;
    background:rgba(16,24,40,.13);
    pointer-events:none;
}

.on-history-nav-selection{
    position:absolute;
    top:0;
    bottom:0;
    border-top:2px solid #d92d20;
    border-bottom:2px solid #d92d20;
    background:rgba(217,45,32,.06);
    cursor:grab;
}

.on-history-nav-selection.dragging{
    cursor:grabbing;
}

.on-history-nav-handle{
    position:absolute;
    top:0;
    bottom:0;
    width:12px;
    background:#d92d20;
    cursor:ew-resize;
    z-index:3;
}

.on-history-nav-handle::after{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    width:2px;
    height:24px;
    border-left:1px solid rgba(255,255,255,.9);
    border-right:1px solid rgba(255,255,255,.9);
    transform:translate(-50%,-50%);
}

.on-history-nav-handle-left{
    transform:translateX(-50%);
}

.on-history-nav-handle-right{
    transform:translateX(-50%);
}

.on-history-nav-dates{
    display:flex;
    justify-content:space-between;
    gap:12px;
    margin:4px 2px 14px;
    color:#667085;
    font-size:11px;
}

.on-history-nav-label{
    margin-top:12px;
    color:#475467;
    font-size:12px;
    font-weight:700;
}

.on-history-point{
    fill:#fff;
    stroke:#d92d20;
    stroke-width:3;
}

.on-history-verified{
    fill:#d92d20;
    stroke:#fff;
    stroke-width:2;
}

.on-history-label{
    fill:#667085;
    font-size:11px;
}

.on-history-date{
    fill:#667085;
    font-size:11px;
}

.on-history-current{
    display:flex;
    justify-content:space-between;
    gap:10px;
    margin-top:10px;
    color:#667085;
    font-size:12px;
}

.on-history-current strong{
    color:#101828;
}

/*
 * Statistici pentru intervalul selectat
 */
.on-history-range-stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
    margin:14px 0 10px;
}

.on-history-range-stat{
    padding:12px 14px;
    border:1px solid #e4e7ec;
    border-radius:10px;
    background:#f9fafb;
}

.on-history-range-stat span{
    display:block;
    margin-bottom:5px;
    color:#667085;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.on-history-range-stat strong{
    display:block;
    color:#101828;
    font-size:18px;
    line-height:1.2;
}

.on-history-range-stat small{
    display:block;
    margin-top:4px;
    color:#98a2b3;
    font-size:10px;
}

@media(max-width:640px){
    .on-history-range-stats{
        grid-template-columns:1fr;
        gap:7px;
    }

    .on-history-range-stat{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
    }

    .on-history-range-stat span{
        margin:0;
    }

    .on-history-range-stat small{
        display:none;
    }
}

.on-history-legend{
    margin-top:5px;
    color:#98a2b3;
    font-size:11px;
}

@media(max-width:640px){
    .on-history-head{
        display:block;
    }

    .on-history-periods{
        margin-top:15px;
        width:max-content;
    }

    .on-history-card{
        padding:12px;
    }

    .on-history-svg{
        height:230px;
    }
}

/*
 * Curs BNR inceput -> sfarsit
 */
.on-exchange-range-values{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    margin:8px 0 3px;
    color:#475467;
    font-size:12px;
    font-weight:600;
    text-align:center;
}

.on-exchange-range-values strong{
    color:#98a2b3;
    font-size:16px;
    font-weight:700;
}

@media(max-width:640px){

    .on-exchange-range-values{
        gap:6px;
        font-size:10px;
    }

    .on-exchange-range-values strong{
        font-size:14px;
    }
}
