/* Live traffic page (pages/info/info.ad_traffic.php, /info_ad_traffic).
   Loads after info__info.ad_slots.css, which holds the shared .adslots-wrap base. */

.adslots-wrap .as-back{ display: block; width: fit-content; margin: 0 auto 18px; font-size: 13px; }

/* ===== HONESTY NOTICE: the biggest text on the page after the title ===== */
.as-honest{
    border: 2px solid var(--accent); border-radius: 2px;
    background: var(--accent-soft);
    padding: clamp(20px, 3vw, 32px) clamp(18px, 3vw, 36px);
    text-align: center;
}
.adslots-wrap .as-honest-lead{
    font-family: 'Fraunces', serif; font-weight: 500;
    font-size: clamp(22px, 3vw, 32px); line-height: 1.25; letter-spacing: -0.01em;
    color: var(--ink); margin: 0 auto; max-width: 30ch;
}
.as-honest-sub{ font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 12px auto 0; max-width: 60ch; }

/* ===== STATS ===== */
.as-stats{
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px; margin: 28px auto 0; max-width: 820px;
    background: var(--line); border: 1px solid var(--line); border-radius: 2px;
}
@media (min-width: 720px){ .as-stats{ grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.as-stats > div{ background: var(--paper); padding: 14px 12px; }
.as-stats dt{ font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.as-stats dd{ margin: 6px 0 0; font-family: 'Fraunces', serif; font-size: 26px; color: var(--ink); }


.adslots-wrap .as-stats{ margin-top: 0; }

/* ===== NO TRACKING NOTE ===== */
.as-tracking{
    font-size: 14px; line-height: 1.6; color: var(--ink-soft);
    margin: 0; padding-top: 16px; border-top: 1px solid var(--line);
}

/* ===== VOTE TREND CHART ===== */
.as-trend-totals{
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line); border-radius: 2px;
    margin-bottom: 18px;
}
@media (min-width: 640px){ .as-trend-totals{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.as-trend-totals > div{ background: var(--paper); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.as-trend-label{
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.as-key{ width: 10px; height: 10px; background: var(--accent); flex: 0 0 auto; }
.as-key.is-est{
    background: color-mix(in srgb, var(--bmm-accent) 22%, transparent);
    border: 1px dashed var(--accent);
}
.adslots-wrap .as-trend-num{ font-family: 'Fraunces', serif; font-size: clamp(24px, 3vw, 32px); color: var(--ink); line-height: 1.1; }
.as-trend-sub{ font-size: 13px; color: var(--ink-soft); }

.as-chart{ background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 18px 16px 12px 52px; }
.as-chart-plot{ position: relative; height: 240px; touch-action: pan-y; cursor: crosshair; }
@media (max-width: 639px){ .as-chart{ padding-left: 44px; } .as-chart-plot{ height: 190px; } }
.as-chart-plot svg{ position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.as-chart-ylab{
    position: absolute; right: calc(100% + 8px); transform: translateY(50%);
    font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.as-grid-line{ stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.as-base-line{ stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.as-bar{ fill: var(--accent); transition: opacity .12s ease; }
.as-bar.is-est{
    fill: color-mix(in srgb, var(--bmm-accent) 22%, transparent);
    stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke;
}
.as-chart-plot:hover .as-bar{ opacity: .45; }
.as-chart-plot:hover .as-bar.is-on{ opacity: 1; }
.as-trend-line{
    stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; opacity: .55;
}
.as-today-line{ stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }

.as-chart-x{
    position: relative; display: flex; justify-content: space-between;
    margin-top: 8px; font-size: 11px; color: var(--muted);
}
.as-chart-x .is-today{ position: absolute; transform: translateX(-50%); color: var(--ink-soft); font-weight: 600; }

.as-tip{
    position: absolute; top: -8px; transform: translateY(-100%); z-index: 3; pointer-events: none;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--ink); color: #fff; padding: 7px 10px; border-radius: 2px;
    font-size: 12px; white-space: nowrap;
}
.as-tip[hidden]{ display: none; }
.adslots-wrap .as-tip .d{ color: rgba(255,255,255,.7); font-size: 11px; }
.as-tip b{ font-size: 15px; font-variant-numeric: tabular-nums; }

.as-trend-table{ margin-top: 12px; }
.as-trend-table summary{ cursor: pointer; font-size: 13px; color: var(--accent); }
.as-trend-table .as-table-wrap{ margin-top: 10px; max-height: 360px; overflow-y: auto; }
.as-trend-table tr.is-est td{ color: var(--muted); }

/* ===== AUDIENCE (Google Analytics) ===== */
.as-aud-grid{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 860px){
    .as-aud-grid{ grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
    .as-aud-daily{ grid-column: 1 / -1; }
    .as-aud-countries{ grid-row: span 2; }
}
.as-panel{
    background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
    padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.as-panel-head{ display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.as-panel-meta{ font-size: 12px; color: var(--muted); }
.adslots-wrap .as-panel-text{ font-size: 14px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.adslots-wrap .as-panel-foot{
    font-size: 13px; color: var(--ink-soft); margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.as-panel-foot b{ color: var(--ink); font-variant-numeric: tabular-nums; }
.adslots-wrap .as-big{ font-family: 'Fraunces', serif; font-size: clamp(40px, 5vw, 52px); line-height: 1; color: var(--ink); }

/* Visitors per day: line + area */
.as-aud-daily .as-line-plot{ height: 200px; margin: 8px 0 0 36px; }
@media (max-width: 639px){ .as-aud-daily .as-line-plot{ height: 170px; } }
.as-area-top{ stop-color: var(--bmm-accent); stop-opacity: .22; }
.as-area-bottom{ stop-color: var(--bmm-accent); stop-opacity: 0; }
.as-line{ fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.as-cross{
    position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;
    border-left: 1px dashed var(--muted);
}
.as-dot{
    position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none;
    background: var(--accent); box-shadow: 0 0 0 2px var(--paper);
}
.as-cross[hidden], .as-dot[hidden]{ display: none; }
.as-line-x{ margin-left: 36px; }
.as-aud-daily .as-trend-table{ margin-top: 2px; }

/* Top countries: name + value on one line, bar under it */
.as-countries{ list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.as-countries li{
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 8px;
}
.as-c-rank{ font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.as-c-name{ font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-c-val{ font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.as-c-val b{ font-size: 14px; color: var(--ink); font-weight: 600; margin-right: 4px; }
.as-c-bar{ grid-column: 2 / -1; height: 6px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.as-c-bar > span{ display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.as-countries li:first-child .as-c-bar{ height: 8px; }

/* Engagement ring */
.as-ring{ position: relative; width: 132px; height: 132px; margin: 4px 0 2px; }
.as-ring svg{ width: 100%; height: 100%; transform: rotate(-90deg); }
.as-ring-track{ fill: none; stroke: var(--line-soft); stroke-width: 10; }
.as-ring-fill{ fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; }
.adslots-wrap .as-ring-num{
    position: absolute; inset: 0; display: grid; place-items: center;
    font-family: 'Fraunces', serif; font-size: 34px; color: var(--ink);
}

/* New vs returning split bar */
.as-split{ display: flex; gap: 2px; height: 14px; margin-top: 6px; }
.as-split > span{ display: block; min-width: 2px; border-radius: 2px; }
.as-split-new{ background: var(--accent); }
.as-split-ret{ background: var(--bmm-accent-line, #c4b5fd); }
.as-split-keys{ display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-soft); }
.as-split-keys > span{ display: inline-flex; align-items: center; gap: 8px; }
.as-key.is-ret{ background: var(--bmm-accent-line, #c4b5fd); }
