/* Статистика працевлаштувань (агрегатор по роках) - template/statystyka-pratsevlashtuvan.php.
   Один CSS-файл на всю сторінку: чарт/картка primitives (.report-card,
   .chart-bars, .chart-donut, .funnel-*, форма в CTA тощо) + UI табів-по-роках
   (.report-tabs, .report-tab-panel) + "живий" pie (.chart-donut__ring[data-report-pie]). */

/* .premium-section[data-stage-word]::before (css/index-premium.css) paints a
   large decorative background word (font-size up to 210px, white-space:
   nowrap) positioned near the section's right edge. .premium-section itself
   has no overflow containment, so on narrow/mobile viewports that word
   routinely renders wider than the viewport and forces real horizontal
   scroll/overflow on the whole page - not just a clipped decoration. This
   page uses data-stage-word on every section, so clip it at the page root
   instead of touching the shared design-system file (other pages seem to
   avoid this via their own wrapper, e.g. .premium-main{overflow:clip} in
   css/__blog.css). */
#report-all {
    overflow: clip;
}

/* Global .hero-title uses overflow-wrap: anywhere, which can strand a single
   trailing letter (e.g. "ь") on its own line for long uk/ru words. Override
   scoped to this page only, and forbid breaking inside the long word itself -
   if the line is too narrow, the year wraps to its own line instead, the word
   never fractures. Checked against .premium-shell's real mobile width
   (min(100% - 28px, 1180px), i.e. ~14px side padding) at every breakpoint. */
#report-hero .hero-title {
    overflow-wrap: normal;
    word-break: normal;
}

#report-hero .hero-title .report-hero-nobreak {
    white-space: nowrap;
}

@media screen and (max-width: 480px) {
    #report-hero .hero-title {
        font-size: clamp(26px, 8.2vw, 34px);
    }
}

.report-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.report-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(20px);
}

.report-card__title {
    margin: 0 0 20px;
    font-family: 'Unbounded', 'Commissioner', sans-serif;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.25;
    color: #fff;
}

.report-card__note {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .56);
    font-size: 13px;
    line-height: 1.5;
}

.report-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

/* ---- Hero stat panel (total hired / avg salary) ---- */
.report-hero-stat {
    padding: 2.4rem 2.6rem;
    border-radius: 1.6rem;
    background: linear-gradient(135deg, var(--owu-blue-deep, #075fd6), var(--owu-blue, #3490ff) 55%, var(--owu-green, #89e24e));
    box-shadow: 0 32px 80px rgba(7, 95, 214, .28);
}

.report-hero-stat__label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.report-hero-stat__value {
    display: block;
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(48px, 8vw, 92px);
    line-height: 1;
    color: #fff;
}

.report-hero-stat__caption {
    display: block;
    margin-top: 10px;
    max-width: 46ch;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(15px, 1.6vw, 19px);
    line-height: 1.4;
}

/* ---- Horizontal bar chart (values rendered server-side, --bar-pct set inline) ---- */
.chart-bars {
    display: grid;
    gap: 14px;
}

.chart-bars__row {
    display: grid;
    grid-template-columns: minmax(90px, 190px) 1fr auto;
    align-items: center;
    gap: 14px;
}

.chart-bars__label {
    min-width: 0;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}

.chart-bars__track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
}

.chart-bars__fill {
    display: block;
    width: var(--bar-pct, 0%);
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--owu-blue), var(--owu-green));
    transform-origin: left center;
    animation: report-bar-grow .9s cubic-bezier(.16, 1, .3, 1) both;
}

.chart-bars__value {
    min-width: 3.5ch;
    text-align: right;
    color: #fff;
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
}

@keyframes report-bar-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ---- Vertical bar chart ("Розподіл по напрямками") ---- */
.chart-bars-vertical {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    height: 260px;
    padding-top: 30px;
}

.chart-bars-vertical__col {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.chart-bars-vertical__value {
    margin-bottom: 8px;
    color: #fff;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    white-space: nowrap;
}

.chart-bars-vertical__track {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 46px;
    flex: 1 1 auto;
    border-radius: 10px 10px 4px 4px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
}

.chart-bars-vertical__fill {
    display: block;
    width: 100%;
    height: var(--bar-pct, 0%);
    border-radius: 10px 10px 4px 4px;
    background: linear-gradient(180deg, var(--owu-green), var(--owu-blue));
    transform-origin: bottom center;
    animation: report-bar-grow-vertical .9s cubic-bezier(.16, 1, .3, 1) both;
}

.chart-bars-vertical__label {
    margin-top: 10px;
    max-width: 100%;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}

@keyframes report-bar-grow-vertical {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    .chart-bars__fill,
    .chart-bars-vertical__fill {
        animation: none;
    }
}

/* ---- Pie chart (conic-gradient, solid - no donut hole) ----
   Two flavours share this markup/CSS:
   - static (owu_report_render_donut): renders once, plays report-pie-grow on
     first paint only.
   - "live" (owu_report_render_pie_live, marked [data-report-pie]): the angle
     genuinely animates on every tab switch too. That animation is done in JS
     (js/statystyka-pratsevlashtuvan.js, updateReportPie/animatePieRing) by
     rewriting background: conic-gradient(...) every requestAnimationFrame
     tick, NOT via a CSS transition - an @property + transition version was
     tried first and verified NOT to work (Chrome 151: transitionrun never
     fires on a conic-gradient built from var() references to
     @property-registered custom properties, even though the properties
     themselves interpolate fine in the CSSOM). Don't reintroduce that path
     without re-testing in a real browser. */
.chart-donut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.chart-donut__ring {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transform-origin: center;
    /* transform-only: the tab-switch crossfade already animates a panel's
       opacity - animating opacity here too would stack two opacity
       transitions on nested elements and flicker. */
    animation: report-pie-grow .7s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes report-pie-grow {
    from { transform: scale(.5); }
    to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .chart-donut__ring {
        animation: none;
    }
}

.chart-donut__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
}

.chart-donut__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

.chart-donut__legend-item__label {
    display: inline;
}

.chart-donut__legend-item b {
    color: #fff;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
}

.chart-donut__legend-item i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* ---- Stacked single-row bar (work format) ---- */
.chart-stacked__track {
    display: flex;
    width: 100%;
    height: 22px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    margin-bottom: 16px;
}

.chart-stacked__seg {
    display: block;
    height: 100%;
}

/* ---- Insight callout (accent left border) ---- */
.report-insight-card {
    padding: 24px 28px;
    border-left: 3px solid var(--owu-orange);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .04);
}

.report-insight-card h3 {
    margin: 0 0 10px;
    font-family: 'Unbounded', 'Commissioner', sans-serif;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #fff;
}

.report-insight-card p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    line-height: 1.55;
}

/* ---- Job search funnel ---- */
.funnel-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 0;
}

.funnel-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 150px;
}

.funnel-step__circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--owu-blue), var(--owu-blue-deep));
    box-shadow: 0 18px 40px rgba(52, 144, 255, .25);
    font-family: 'Unbounded', sans-serif;
    font-size: 30px;
    color: #fff;
}

.funnel-step--final .funnel-step__circle {
    background: linear-gradient(145deg, var(--owu-green), #4fae1f);
    box-shadow: 0 18px 40px rgba(137, 226, 78, .3);
}

.funnel-step__label {
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    text-align: center;
}

.funnel-arrow {
    flex: 0 0 auto;
    width: 36px;
    height: 2px;
    background: rgba(255, 255, 255, .18);
    margin: 0 4px 34px;
}

/* ---- Employer logo wall (reuses .partner-logo-chip visuals from partner.css) ---- */
.report-logo-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.report-logo-wall .partner-logo-chip {
    min-height: auto;
    padding: 12px 20px;
}

/* ---- Final CTA lead form ---- */
.report-form-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    padding: 1.9rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1.6rem;
    background: linear-gradient(145deg, rgba(13, 24, 43, .96), rgba(6, 16, 30, .98));
    box-shadow: 0 32px 80px rgba(0, 0, 0, .45);
}

.report-form-card__title {
    margin: 0 0 4px;
    font-family: 'Unbounded', 'Commissioner', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #fff;
}

.report-form-card__subtitle {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .6);
    font-size: 13px;
}

.report-form {
    display: grid;
    gap: 10px;
}

.report-form__field {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: rgba(255, 255, 255, .02);
    transition: border-color .24s ease, background .24s ease;
}

.report-form__field:focus-within {
    border-color: rgba(52, 144, 255, .5);
    background: rgba(255, 255, 255, .04);
}

.report-form__field input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 15px 16px;
    background: transparent;
    color: #fff;
    font-family: 'Commissioner', sans-serif;
    font-size: 15px;
    box-sizing: border-box;
}

.report-form__field input::placeholder {
    color: rgba(255, 255, 255, .48);
}

.report-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .64);
    cursor: pointer;
    user-select: none;
}

.report-form__consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--owu-green);
    cursor: pointer;
}

.report-form__submit {
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--owu-blue), var(--owu-green));
    color: #fff;
    font-family: 'Commissioner', sans-serif;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .24s ease, box-shadow .24s ease, filter .24s ease;
}

.report-form__submit:hover,
.report-form__submit:focus-visible {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 18px 30px rgba(52, 144, 255, .2);
    filter: brightness(1.04);
    outline: 0;
}

.report-cta-grid .premium-title {
    margin: 14px 0 18px;
    font-size: clamp(28px, 4.4vw, 55px);
    line-height: 1.02;
}

@media (max-width: 480px) {
    .report-cta-grid .premium-title {
        font-size: clamp(1.1rem, 10.5vw, 1.6rem);
        line-height: 1.15;
    }
}

/* ---- Year tabs UI ---- */
.report-tabs-group {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.report-tabs {
    display: inline-flex;
    align-self: flex-start;
    max-width: 100%;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.report-tabs::-webkit-scrollbar {
    display: none;
}

.report-tabs__btn {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, .6);
    font-family: 'Unbounded', 'Commissioner', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background .24s ease, color .24s ease, box-shadow .24s ease;
}

.report-tabs__btn:hover {
    color: #fff;
}

.report-tabs__btn.is-active {
    background: linear-gradient(90deg, var(--owu-blue), var(--owu-green));
    color: #fff;
    box-shadow: 0 10px 26px rgba(52, 144, 255, .3);
}

.report-tabs__btn:focus-visible {
    outline: 2px solid var(--owu-blue);
    outline-offset: 2px;
}

/* ---- Tab panel: content for one year within a section ----
   Switching a tab crossfades the outgoing panel into the incoming one (both
   visible and overlapping mid-transition - see js/statystyka-pratsevlashtuvan.js)
   instead of an instant hide/show, so nothing "blinks". .report-tab-panels is
   the positioning root; the incoming panel gets .report-tab-panel--overlay for
   the duration of the fade so it sits exactly on top of the outgoing one
   without collapsing the section's height. */
.report-tab-panels {
    position: relative;
}

.report-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
    transition: opacity .26s ease;
}

.report-tab-panel[hidden] {
    display: none;
}

.report-tab-panel--overlay {
    position: absolute;
    inset: 0;
    width: 100%;
}

.report-tab-panel__lead {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .report-tab-panel {
        transition: none;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Responsive ---- */
@media screen and (max-width: 860px) {
    .report-grid-2 {
        grid-template-columns: 1fr;
    }

    .chart-bars__row {
        grid-template-columns: minmax(80px, 130px) 1fr auto;
        gap: 10px;
    }

    .funnel-row {
        gap: 20px 0;
    }

    .funnel-arrow {
        display: none;
    }

    .report-hero-stat {
        padding: 2rem;
    }

    /* .hero-visual (css/index-premium.css) switches to a 2-column grid at
       this same breakpoint - built for pages that put two items side by side
       in there. The report CTA only ever puts one item (.report-form-card)
       inside it, so that rule squeezes the whole form into the first column
       (~50% width) and leaves the second column empty - the mobile "deformed
       form" bug. Force it back to a single column, scoped to this page only. */
    #report-cta .hero-visual {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .report-tabs__btn {
        min-width: 52px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .chart-bars-vertical {
        height: 210px;
    }

    .chart-bars-vertical__label {
        font-size: 11px;
    }
}
