/* Free Business Templates banner — components/legacy/shared/BusinessTemplatesBanner.jsx
   Figma: desktop 36014:774, mobile 36043:829. Used on the OPM and EBA pages. */
.businessTemplate.bizTplHero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 0; /* ebap.css gives .businessTemplate a 4px top border */
    padding: 96px 0 60px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 80px 0 / 80px 100% repeat-x,
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 40px / 100% 80px repeat-y,
        radial-gradient(888.89px 243.57px at 27.78% 50%, rgba(30, 30, 30, 0.95), rgba(9, 9, 9, 0)),
        #090909;
    color: #fff;

    p,
    h2,
    ul {
        margin: 0;
        padding: 0;
    }

    .tplSvg {
        display: block;
        flex-shrink: 0;
    }

    .tplDecor {
        position: absolute;
        z-index: -1;
        max-width: none;
        pointer-events: none;
    }

    .tplGlowLeft { left: -370px; bottom: -378px; }
    .tplGlowRight { right: -200px; bottom: -338px; }
    .tplArc { right: -430px; bottom: -153px; }
    .tplArcGlow { right: -440px; bottom: -168px; }

    .tplInner {
        display: grid;
        grid-template-columns: minmax(0, 430px) 1fr 298px;
        column-gap: 22px;
        align-items: start;
        max-width: 1475px;
        margin: 0 auto;
        padding: 0 40px;
        box-sizing: content-box;
    }

    /* Left copy */
    .tplCopy {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .tplEyebrow {
        display: flex;
        align-items: center;
        gap: 22px;

        p {
            font: 16px/1.2 var(--go-medium);
            color: #fff;
            white-space: nowrap;
        }
    }

    .tplEyebrowLine {
        flex: none;
        width: 120px;
        height: 2px;
        border-radius: 1px;
        background: linear-gradient(90deg, #3fb8af 0%, #f2c230 60%, rgba(242, 140, 40, 0) 100%);
    }

    .tplHeading {
        margin-top: 44px;
        font: 52px/1 var(--go-regular);
        letter-spacing: -0.52px;
        color: #fff;
    }

    .tplTagline {
        margin-top: 14px;
        font: italic 400 32px/normal "Fraunces", serif;
        font-variation-settings: "SOFT" 0, "WONK" 1;
        background: linear-gradient(90deg, #3fb8af 0%, #a9cb6b 38%, #f2c230 68%, #f28c28 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }

    .tplText {
        margin-top: 24px;
        max-width: 430px;
        font: 16px/1.5 var(--go-regular);
        color: #d4d4d4;
    }

    .tplBtn {
        margin-top: 38px;
        width: 286px;
        gap: 8px;
        border-color: #090909;
    }

    /* Centre dashboard */
    .tplDashCol {
        justify-self: end;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 28px;
    }

    .tplDashLabel {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 3px 8px;
        border-radius: 40px;

        img { display: block; flex-shrink: 0; width: 10px; height: 10px; }

        span {
            display: block;
            font: 10px/1 var(--go-regular); /* weight 400 */
            text-box: trim-both cap alphabetic; /* centre on the capitals, as in Figma */
            letter-spacing: 0.5px;
            text-transform: uppercase;
            color: #fff;
            white-space: nowrap;
        }
    }

    .tplDash {
        position: relative;
        width: 667px;
        height: 452px;
        box-sizing: border-box;
        overflow: hidden;
        border: 1.5px solid rgba(255, 255, 255, 0.16);
        border-radius: 14px;
        background: #141414;
        box-shadow: 0 0 40px rgba(242, 153, 51, 0.08), 0 24px 60px rgba(0, 0, 0, 0.6);
        font-family: var(--go-semibold);
        color: #fff;
    }

    .tplDashBar {
        position: absolute;
        top: -1.5px;
        left: -1.5px;
        display: block;
        max-width: none;
    }

    .tplDashBody {
        position: absolute;
        top: 28.5px;
        left: -1.5px;
        width: 667px;
        height: 422px;
        overflow: hidden;
    }

    .tplTile,
    .tplPanel {
        position: absolute;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        background: #1e1e1e;
    }

    .tplTile {
        top: 15px;
        height: 54px;
    }

    .tplTileTotal {
        left: 23px;
        width: 157px;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 4px;
    }

    .tplTileLabel {
        font: 12px/normal var(--go-semibold);
    }

    .tplTileValue {
        font: 26px/28px var(--go-bold);
    }

    .tplTileStatus {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: 147px;

        img { display: block; }

        p { font: 14px/normal var(--go-semibold); white-space: nowrap; }

        &.isOn { left: 189px; background: rgba(63, 184, 175, 0.13); border-color: rgba(63, 184, 175, 0.4); }
        &.isRisk { left: 345px; background: rgba(242, 194, 48, 0.13); border-color: rgba(242, 194, 48, 0.4); }
        &.isOff { left: 501px; width: 148px; background: rgba(239, 91, 76, 0.13); border-color: rgba(239, 91, 76, 0.4); }
    }

    .tplPanelTrend { left: 15px; top: 87px; width: 252px; height: 151px; }
    .tplPanelTable { left: 277px; top: 88px; width: 375px; height: 150px; }
    .tplPanelRevenue { left: 15px; bottom: 15px; width: 330px; height: 154px; }
    .tplPanelTop { left: 357px; bottom: 15px; width: 295px; height: 154px; }

    .tplPanelTitle {
        position: absolute;
        left: 9px;
        top: 7px;
        font: 11.5px/normal var(--go-semibold);
        white-space: nowrap;
    }

    .tplLegend {
        position: absolute;
        top: 9px;
        display: flex;
        align-items: center;
        gap: 10px;

        > span {
            display: flex;
            align-items: center;
            gap: 4px;
            font: 8.5px/normal var(--go-medium);
            color: #d4d4d4;
        }

        img { display: block; }
    }

    .tplSwatch {
        width: 7px;
        height: 7px;
        border-radius: 1.5px;
    }

    .tplAxis {
        position: absolute;
        font: 8.5px/normal var(--go-medium);
        color: #a3a3a3;
        white-space: nowrap;

        &.isUnit { font-size: 8px; }
    }

    .tplGridLine {
        position: absolute;
        height: 1px;
        background: rgba(255, 255, 255, 0.06);

        &.isBase { background: rgba(255, 255, 255, 0.14); }
    }

    .tplTrendLines {
        position: absolute;
        left: -1px;
        top: -1px;
        display: block;
        max-width: none;
    }

    .tplBar {
        position: absolute;
        width: 13px;
        border-radius: 2px 2px 0 0;
    }

    .tplSwatch.isTarget,
    .tplBar.isTarget { background: #5a5a5a; }

    .tplSwatch.isActual,
    .tplBar.isActual { background: linear-gradient(180deg, #f28c28, #f2c230); }

    /* KPI table */
    .tplKpiTable {
        position: absolute;
        left: -1px;
        top: -1px;
        width: 375px;
    }

    .tplKpiRow {
        display: grid;
        grid-template-columns: 70px 125px 45px 42px 47px 46px;
        align-items: center;
        height: 21.6px;
        box-sizing: border-box;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        font: 9.5px/normal var(--go-semibold);
        white-space: nowrap;

        &:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }

        &.isHead {
            height: 20px;
            border-bottom: 0;
            background: #262626;
        }

        > span { display: flex; justify-content: center; overflow: hidden; }
        > span:nth-child(-n + 2) { justify-content: flex-start; padding-left: 8px; }

        .isKpi { font-family: var(--go-regular); color: #d4d4d4; }
    }

    .tplStatus {
        width: 24px;
        height: 9px;
        border-radius: 3px;

        &.is-on { background: #3fb8af; }
        &.is-risk { background: #f2c230; }
        &.is-off { background: #ef5b4c; }
    }

    /* Top 5 table */
    .tplTopTable {
        position: absolute;
        left: 11px;
        top: 27px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 4px;
    }

    .tplTopRow {
        display: grid;
        grid-template-columns: 162px 109px;
        height: 17.4px;
        box-sizing: border-box;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        font: 9.5px/normal var(--go-semibold);
        white-space: nowrap;

        &.isHead {
            height: 17px;
            border-top: 0;
            background: #262626;
        }

        > span { display: flex; align-items: center; justify-content: center; }

        > span:first-child {
            justify-content: flex-start;
            padding-left: 10px;
            border-right: 1px solid rgba(255, 255, 255, 0.08);
        }

        &:not(.isHead) > span:first-child { font-family: var(--go-medium); color: #e5e5e5; }

        .is-neg { color: #ef5b4c; }
        .is-pos { color: #3fb8af; }
    }

    /* Right feature cards */
    .tplCards {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: 42px;
    }

    .tplCard {
        display: flex;
        align-items: center;
        gap: 16px;
        min-height: 94px;
        box-sizing: border-box;
        padding: 12px 14px 12px 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        background: linear-gradient(180deg, rgba(30, 30, 30, 0.92), rgba(22, 22, 22, 0.92));
        filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.45));
    }

    .tplCardIcon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        box-sizing: border-box;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        background: #262626;

        img { display: block; }
    }

    .tplCardText {
        display: flex;
        flex-direction: column;
        gap: 5px;
        min-width: 0;
        line-height: 1.2;
    }

    .tplCardTitle { font: 18px/1.2 var(--go-semibold); color: #fff; }
    .tplCardDesc { font: 14px/1.2 var(--go-regular); color: #a3a3a3; }
}

/* Whole banner rendered smaller: 80% on desktop, 85% on tablet */
@media (min-width: 1024px) {
    .businessTemplate.bizTplHero { zoom: 0.8; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .businessTemplate.bizTplHero { zoom: 0.85; }
}

/* The site zooms pages to 90% between 1024 and 1279px; keep the label at ~10px on screen */
@media (min-width: 1024px) and (max-width: 1279px) {
    .businessTemplate.bizTplHero .tplDashLabel {
        img { width: 11px; height: 11px; }
        span { font-size: 11px; }
    }
}

@media (max-width: 1215px) {
    .businessTemplate.bizTplHero {
        .tplInner { padding: 0 24px; }
        .tplDash { zoom: 0.75; }
    }
}

@media (max-width: 1023px) {
    .businessTemplate.bizTplHero {
        .tplInner {
            grid-template-columns: minmax(0, 1fr) auto;
            row-gap: 40px;
        }

        .tplDash { zoom: 0.8; }

        .tplCards {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            margin-top: 0;
        }
    }
}

@media (max-width: 1023px) {
    .businessTemplate.bizTplHero {
        padding: 64px 0 48px;

        .tplInner { grid-template-columns: minmax(0, 1fr); }
        .tplDashCol { justify-self: center; margin-top: 0; }
        .tplDash { zoom: 1; }
        .tplText { max-width: 560px; }
        .tplCards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
}

/* Mobile-only pieces are hidden above 767px */
.businessTemplate.bizTplHero .tplMDash,
.businessTemplate.bizTplHero .tplDecorM {
    display: none;
}

/* Mobile — Figma 36043:829 (Mobile 390) */
@media (max-width: 767px) {
    .businessTemplate.bizTplHero {
        padding: 36px 0;
        background: #090909;

        .tplDecor,
        .tplDash,
        .tplBrDesk { display: none; }

        .tplDecorM {
            display: block;
            position: absolute;
            z-index: -1;
            max-width: none;
            pointer-events: none;
        }

        .tplMGlow1 { right: -240px; top: -250px; }
        .tplMGlow2 { right: -130px; top: -140px; }
        .tplMGlow3 { left: -270px; top: 410px; }
        .tplMGlow4 { right: -230px; top: 870px; }
        .tplMArc { left: -8.4px; top: 470px; }

        .tplInner { padding: 0 16px; row-gap: 20px; }

        /* Hero copy */
        .tplEyebrow { gap: 12px; }

        .tplEyebrow p {
            font: 10px/1.5 var(--go-semibold);
            letter-spacing: 0.8px;
            text-transform: uppercase;
        }

        .tplEyebrowLine {
            width: 48px;
            background: linear-gradient(124.95deg, #39b5d7 1.8%, #f7d544 50.99%, #e38330 99.75%);
        }

        .tplHeading {
            margin-top: 10px;
            font: 20px/1.2 var(--go-regular);
            letter-spacing: 0;
        }

        .tplTagline {
            margin-top: 4px;
            font-size: 16px;
            line-height: 1.2;
            background-image: linear-gradient(102.22deg, #39b5d7 1.8%, #f7d544 50.99%, #e38330 99.75%);
        }

        .tplText { margin-top: 10px; max-width: none; font-size: 13px; line-height: 1.5; }
        /* padding + font from the site's small mobile button size .btnWhiteSmMObFont (10px 20px, 12px go-medium) */
        .tplBtn {
            margin-top: 16px;
            width: auto;
            max-width: 100%;
            white-space: nowrap;

            svg { width: 16px; height: 18px; }
        }

        /* Dashboard block */
        .tplDashCol {
            justify-self: stretch;
            width: 100%;
            margin-top: 0;
            gap: 10px;
        }

        .tplDashLabel {
            gap: 3px;
            padding: 4px 9px;
            max-width: 100%;

            img { width: 7px; height: 7px; }
            span { font-size: 6px; letter-spacing: 0.2px; }
        }

        .tplMDash {
            display: flex;
            flex-direction: column;
            width: 100%;
            box-sizing: border-box;
            overflow: hidden;
            border: 1px solid #404040;
            border-radius: 12px;
            background: #171717;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
            color: #fff;
        }

        .tplMBar {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 0 6px 10px;
            background: #262626;

            img { display: block; }
        }

        .tplMBody {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 8px 10px 10px;
        }

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

        .tplMTile {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            height: 44px;
            box-sizing: border-box;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 8px;
            background: #1e1e1e;
        }

        .tplMTileTotal { flex-direction: column; gap: 0; }
        .tplMTileLabel { font: 10px/normal var(--go-medium); }
        .tplMTileValue { font: 20px/22px var(--go-semibold); }

        .tplMTileStatus {
            img { width: 18px; height: 18px; }
            p { font: 12px/normal var(--go-semibold); white-space: nowrap; }

            &.isOn { background: rgba(63, 184, 175, 0.13); border-color: rgba(63, 184, 175, 0.4); }
            &.isRisk { background: rgba(242, 194, 48, 0.13); border-color: rgba(242, 194, 48, 0.4); }
            &.isOff { background: rgba(239, 91, 76, 0.13); border-color: rgba(239, 91, 76, 0.4); }
        }

        /* Charts: each panel holds the 161 x 150 Figma canvas */
        .tplMPanel {
            height: 152px;
            box-sizing: border-box;
            overflow: hidden;
            border: 1px solid #404040;
            border-radius: 8px;
            background: #262626;
        }

        .tplMCanvas {
            position: relative;
            width: 161px;
            height: 150px;
            margin: 0 auto;
        }

        .tplMTitle {
            position: absolute;
            left: 9px;
            top: 9px;
            font: 12px/1.2 var(--go-medium);
            white-space: nowrap;
        }

        .tplMText {
            position: absolute;
            font: 10px/1.5 var(--go-regular);
            letter-spacing: 0;
            color: #a3a3a3;
            white-space: nowrap;

            &.isLegend { color: #d4d4d4; }
        }

        .tplMAbs {
            position: absolute;
            display: block;
            max-width: none;
        }

        .tplMGrid {
            position: absolute;
            height: 1px;
            background: #404040;
            opacity: 0.7;

            &.isBase { opacity: 1; }
        }

        .tplMSwatch {
            position: absolute;
            width: 6px;
            height: 6px;
            border-radius: 1.5px;

            &.isTarget { background: #525252; }
            &.isActual { background: linear-gradient(-79.88deg, #f7d344 9.52%, #e38330 104.78%); }
        }

        .tplMBarCol {
            position: absolute;
            width: 7px;
            border-radius: 1.5px 1.5px 0 0;

            &.isTarget { background: #525252; }
            &.isActual { background: linear-gradient(-88deg, #f7d344 9.52%, #e38330 104.78%); }
        }

        /* KPI table */
        .tplMTable {
            overflow: hidden;
            border: 1px solid #404040;
            border-radius: 8px;
            background: #262626;
        }

        .tplMRow {
            display: grid;
            grid-template-columns: 78px minmax(0, 1fr) 36px 38px 50px 38px;
            align-items: center;
            height: 22px;
            box-sizing: border-box;
            border-bottom: 1px solid #404040;
            font: 10px/1.5 var(--go-regular);
            letter-spacing: 0;
            white-space: nowrap;

            &:last-child { border-bottom: 0; }

            &.isHead {
                height: 24px;
                border-bottom: 0;
                background: #404040;
                font: 11px/1.5 var(--go-semibold);
            }

            > span { display: flex; justify-content: center; overflow: hidden; }
            > span:nth-child(-n + 2) { justify-content: flex-start; padding-left: 8px; }

            .isKpi { color: #d4d4d4; }
            .isNeg { color: #e38330; }
        }

        .tplMStatus {
            width: 22px;
            height: 8px;
            border-radius: 3px;

            &.is-risk { background: #f7d344; }
            &.is-on { background: linear-gradient(93.44deg, #39b5d7 1.8%, #f7d544 50.99%, #e38330 99.75%); }
            &.is-off { background: #e38330; }
        }

        /* Top 5 */
        .tplMTop {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 8px;
            border: 1px solid #404040;
            border-radius: 8px;
            background: #262626;
        }

        .tplMTopTitle { font: 12px/1.2 var(--go-medium); }

        .tplMTopTable {
            overflow: hidden;
            border: 1px solid #404040;
            border-radius: 6px;
        }

        .tplMTopRow {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 110px;
            height: 20px;
            box-sizing: border-box;
            border-top: 1px solid #404040;
            font: 11px/1.5 var(--go-semibold);
            letter-spacing: 0;
            white-space: nowrap;

            &.isHead { height: 22px; border-top: 0; background: #404040; }

            > span { display: flex; align-items: center; justify-content: center; }

            > span:first-child {
                justify-content: flex-start;
                padding-left: 10px;
                border-right: 1px solid #404040;
            }

            &:not(.isHead) > span:first-child { font: 10px/1.5 var(--go-regular); color: #d4d4d4; }

            .isNeg { color: #e38330; }
        }

        /* Feature cards */
        .tplCards { grid-template-columns: minmax(0, 1fr); gap: 8px; }

        .tplCard {
            gap: 10px;
            min-height: 0;
            padding: 10px 12px;
            border-radius: 10px;
            border-color: #262626;
            background: #171717;
            filter: none;
        }

        .tplCardIcon {
            width: 34px;
            height: 34px;
            border-color: #404040;
            border-radius: 8px;

            img { width: 20px; height: 20px; }
        }

        .tplCardText { gap: 2px; }
        .tplCardTitle { font-size: 14px; line-height: 1.25; }
        .tplCardDesc { font-size: 12px; line-height: 1.4; }
    }
}
