/* Single course page — side enrol card + mobile sticky enrol bar. */

.tc-side,
.tc-mbar {
    --tc-primary: #273C66;
    --tc-primary-dark: #1F3052;
    --tc-accent: #FF9C14;
    --tc-accent-ink: #9A4D00;
    --tc-accent-soft: #FFF5E6;
    --tc-text: #1F3052;
    --tc-muted: #64748B;
    --tc-border: #E2E8F0;
    --tc-line: #EDF0F5;
    --tc-soft: #F1F4F9;
    font-family: "Rubik", sans-serif;
    color: var(--tc-text);
}

.tc-side *,
.tc-mbar * {
    box-sizing: border-box;
}

.tc-side svg,
.tc-mbar svg {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tc-side {
    position: relative;
    z-index: 999;
    container-type: inline-size;
}

/* ---------- Card ---------- */
.tc-scard {
    background: #fff;
    border: 1px solid var(--tc-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(31, 48, 82, 0.08);
    overflow: hidden;
}

.tc-scard__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.tc-scard__body {
    padding: 20px;
    min-width: 0;
}

/* Tabs */
.tc-scard__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    background: var(--tc-soft);
    border-radius: 12px;
}

.tc-scard__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--tc-muted);
    font: 500 15px/1.2 "Rubik", sans-serif;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}

.tc-scard__tab:hover {
    color: var(--tc-text);
}

.tc-scard__tab.is-active {
    background: #fff;
    color: var(--tc-text);
    box-shadow: 0 1px 3px rgba(31, 48, 82, 0.12);
}

.tc-scard__tab.is-active svg {
    color: var(--tc-accent);
}

.tc-scard__tab:focus-visible,
.tc-scard__cta:focus-visible,
.tc-scard__foot:focus-visible,
.tc-qty button:focus-visible,
.tc-mbar__cta:focus-visible {
    outline: 2px solid var(--tc-accent);
    outline-offset: 2px;
}

.tc-scard__panel[hidden] {
    display: none !important;
}

/* Price */
.tc-scard__price-row,
.tc-scard__team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.tc-scard__price {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tc-scard__now {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--tc-text);
}

.tc-scard__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.tc-scard__meta del {
    font-size: 17px;
    font-weight: 500;
    color: var(--tc-muted);
    text-decoration-thickness: 1.5px;
}

.tc-scard__meta b {
    font-size: 15px;
    font-weight: 600;
    color: var(--tc-text);
}

.tc-scard__meta small {
    font-size: 13px;
    color: var(--tc-muted);
}

.tc-scard__off {
    flex: none;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--tc-accent-soft);
    color: var(--tc-accent-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* CTA */
.tc-scard__cta-wrap.has-timer {
    border: 1px solid var(--tc-accent);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(39, 60, 102, 0.18);
}

.tc-scard__timer,
.tc-mbar__timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--tc-accent-ink);
    font-weight: 500;
}

.tc-scard__timer {
    border-radius: 11px 11px 0 0;
    background: #fff;
}

.tc-scard__timer svg,
.tc-mbar__timer svg {
    color: var(--tc-accent);
}

.tc-scard__timer strong,
.tc-mbar__timer strong {
    color: var(--tc-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 4px;
}

.tc-scard__cta,
.tc-scard__alt .course_button,
.tc-scard__alt .button,
.tc-scard__alt button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--tc-primary) !important;
    color: #fff !important;
    font: 600 19px/1.2 "Rubik", sans-serif !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s;
}

.tc-scard__cta:hover,
.tc-scard__alt .course_button:hover,
.tc-scard__alt .button:hover,
.tc-scard__alt button:hover {
    background: var(--tc-primary-dark) !important;
    color: #fff !important;
}

.tc-scard__cta-wrap.has-timer .tc-scard__cta {
    border-radius: 0 0 11px 11px !important;
}

.tc-scard__cta--solo,
.tc-scard__alt .course_button,
.tc-scard__alt .button,
.tc-scard__alt button {
    box-shadow: 0 10px 20px rgba(39, 60, 102, 0.18);
}

.tc-scard__cta svg {
    width: 18px;
    height: 18px;
}

.tc-scard__alt h4 {
    font-size: 14px;
    color: var(--tc-muted) !important;
}

/* Regulated course enquiry (from [regulated_enquiry_modal]) */
.tc-scard .regulated-enquiry-wrapper {
    margin-top: 10px;
}

.tc-scard span.or {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--tc-muted);
}

/* Trust row */
.tc-scard__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--tc-muted);
}

.tc-scard__trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tc-scard__trust svg {
    width: 14px;
    height: 14px;
    color: var(--tc-primary);
}

/* Footer link */
.tc-scard__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tc-line);
    font-size: 14px;
    font-weight: 500;
    color: var(--tc-primary) !important;
    text-align: center;
    text-decoration: none !important;
}

.tc-scard__foot:hover {
    color: var(--tc-primary-dark) !important;
    text-decoration: underline !important;
}

.tc-scard__foot svg {
    width: 14px;
    height: 14px;
}

/* Team: quantity stepper + summary */
.tc-qty {
    display: flex;
    align-items: stretch;
    flex: none;
    border: 1px solid var(--tc-border);
    border-radius: 12px;
    overflow: hidden;
}

.tc-qty button {
    width: 40px;
    border: 0;
    background: #fff;
    color: var(--tc-primary);
    font: 600 22px/1 "Rubik", sans-serif;
    cursor: pointer;
}

.tc-qty button:hover {
    background: var(--tc-soft);
}

.tc-qty input {
    width: 52px;
    height: 46px;
    padding: 0;
    margin: 0;
    border: 0;
    border-left: 1px solid var(--tc-border);
    border-right: 1px solid var(--tc-border);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: var(--tc-text);
    font: 600 17px/1 "Rubik", sans-serif;
    text-align: center;
    -moz-appearance: textfield;
}

.tc-qty input::-webkit-outer-spin-button,
.tc-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tc-scard__sum {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--tc-muted);
}

.tc-scard__total strong {
    margin-left: 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--tc-text);
}

/* Narrow card (e.g. 1/3 column on small laptops) */
@container (max-width: 330px) {
    .tc-scard__body {
        padding: 16px;
    }

    .tc-scard__now {
        font-size: 40px;
    }

    .tc-scard__tab {
        font-size: 14px;
        gap: 6px;
    }

    .tc-scard__cta {
        font-size: 17px !important;
    }
}

/* ---------- Mobile sticky bar ---------- */
.tc-mbar {
    display: none;
}

@media (max-width: 767px) {
    .tc-mbar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        background: #fff;
        border-top: 2px solid var(--tc-accent);
        box-shadow: 0 -8px 24px rgba(31, 48, 82, 0.12);
        transform: translateY(110%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }

    .tc-mbar.is-visible {
        transform: none;
        visibility: visible;
        transition: transform .25s ease;
    }

    .tc-mbar__timer {
        padding: 7px 16px;
        border-bottom: 1px solid var(--tc-line);
        font-size: 13px;
    }

    .tc-mbar__row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    .tc-mbar .tc-scard__price {
        gap: 8px;
    }

    .tc-mbar .tc-scard__now {
        font-size: 30px;
    }

    .tc-mbar .tc-scard__meta del {
        font-size: 13px;
    }

    .tc-mbar .tc-scard__meta small {
        font-size: 11px;
    }

    .tc-mbar .tc-scard__off {
        padding: 5px 7px;
        font-size: 12px;
    }

    .tc-mbar__cta,
    .tc-mbar__alt .course_button,
    .tc-mbar__alt .button,
    .tc-mbar__alt button {
        flex: none;
        display: inline-flex !important;
        width: auto;
        min-height: 50px;
        padding: 12px 22px !important;
        border-radius: 12px !important;
        background: var(--tc-primary) !important;
        color: #fff !important;
        font: 600 17px/1.2 "Rubik", sans-serif !important;
        text-decoration: none !important;
        white-space: nowrap;
        box-shadow: 0 8px 16px rgba(39, 60, 102, 0.22);
    }

    .tc-mbar__alt {
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }

    body.tc-has-mbar {
        padding-bottom: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-mbar,
    .tc-mbar.is-visible,
    .tc-scard__tab {
        transition: none;
    }
}
