/*
 * Class vouchers on the public site: the banner ad under the main menu (//_shared/_voucherBanner) and My Account >
 * My Vouchers (myAccount/vouchers). The purchase page (voucher/view) is a course-details page, styled by
 * css/course-details.css. Public pages run on Bootstrap 5 + the legacy layer (10px root), so every size here is px.
 * Colour comes from the source's --theme-brand / --theme-brand-strong (generated custom.css), with neutral fallbacks;
 * nothing here names a client.
 */
.voucher-banner,
.my-vouchers,
.voucher-notice {
    --vch-brand: var(--theme-brand, #072c74);
    --vch-brand-strong: var(--theme-brand-strong, #05225a);
    --vch-ink: #1e2740;
    --vch-muted: #5a6377;
    --vch-line: color-mix(in srgb, var(--vch-brand) 18%, #ffffff);
    --vch-display: var(--theme-font-display, 'Montserrat', sans-serif);
    --vch-shadow-1: 0 1px 2px rgba(4, 27, 74, .06), 0 6px 18px rgba(4, 27, 74, .07);
    --vch-shadow-2: 0 2px 4px rgba(4, 27, 74, .08), 0 14px 34px rgba(4, 27, 74, .16);
}
@supports not (color: color-mix(in srgb, red 50%, white)) {
    .voucher-banner,
    .my-vouchers,
    .voucher-notice {
        --vch-line: #dce1ec;
    }
}

/* ---------------------------------------------------------------------------------------------------------------
 * Banner ad: the artwork is laid out for the 1170px container (2340px = 2x), so it sits in the container
 * --------------------------------------------------------------------------------------------------------------- */
/* the image spans the whole container box, the width of the theme's content card under it (.container.maincontent
   is the card itself, so its edges are the container's edges, not the padded content's), with equal room above
   and below */
.container.voucher-banner {
    padding-left: 0;
    padding-right: 0;
    margin-top: 20px;
    margin-bottom: 20px;
}
.voucher-banner-link {
    display: block;
    position: relative;
    border-radius: 6px;
    box-shadow: var(--vch-shadow-1);
}
.voucher-banner-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: var(--vch-shadow-2);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
/* the image never moves (Jason 2026-11-05): hover only deepens the shadow */
.voucher-banner-link:hover::after {
    opacity: 1;
}
.voucher-banner-link:active::after {
    opacity: .4;
}
.voucher-banner-link:focus-visible {
    outline: 3px solid var(--vch-brand);
    outline-offset: 3px;
}
.voucher-banner-link:focus:not(:focus-visible) {
    outline: none;
}
.voucher-banner-link img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
}

/* ---------------------------------------------------------------------------------------------------------------
 * My Account > My Vouchers
 * --------------------------------------------------------------------------------------------------------------- */
.my-vouchers {
    color: var(--vch-ink);
}
.my-vouchers-list {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.my-voucher {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid var(--vch-line);
    border-radius: 10px;
    box-shadow: var(--vch-shadow-1);
}
.my-voucher-name {
    margin: 0 0 4px;
    font-family: var(--vch-display);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--vch-ink);
}
.my-voucher-meta {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--vch-muted);
}
.my-voucher-status {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    vertical-align: 2px;
    background: #eef0f4;
    color: var(--vch-muted);
}
.my-voucher-status--available {
    background: color-mix(in srgb, #1f7a4d 12%, #ffffff);
    color: #1b6b43;
}

/* a dashboard note on My Courses while a voucher is waiting to be used: quiet on purpose (Jason 2026-11-05: the green
   alert was too loud), a white row with a hairline, body-size text, a grey icon, one sentence and its link; only the link carries colour */
.voucher-notice {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 24px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e3e6ec;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--vch-ink);
}
.voucher-notice p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}
.voucher-notice-icon {
    flex: none;
    font-size: 14px;
    color: var(--vch-muted);
}
.voucher-notice a {
    font-weight: 600;
    color: var(--vch-brand);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--vch-brand) 35%, transparent);
    text-underline-offset: 3px;
}
.voucher-notice a:hover {
    color: var(--vch-brand-strong);
    text-decoration-color: currentColor;
}
.voucher-notice a:active {
    opacity: .75;
}
.voucher-notice a:focus-visible {
    outline: 2px solid var(--vch-brand);
    outline-offset: 2px;
    border-radius: 2px;
}
.voucher-notice a:focus:not(:focus-visible) {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .voucher-banner-link::after {
        transition: none;
    }
}
