﻿/* Authenticated learning portal — shared visual system under MemberLayout (.bs-shell) */

.bs-shell {
    --mp-ink: #1a222c;
    --mp-muted: #5f6b76;
    --mp-line: #e4e8ec;
    --mp-canvas: #f3f5f6;
    --mp-panel: #ffffff;
    --mp-brand: #023835;
    --mp-brand-deep: #012b29;
    --mp-gold: #B28552;
    --mp-gold-soft: #f6efe6;
    --mp-green: #023835;
    --mp-success: #2f6b3a;
    --mp-success-soft: #eef6ef;
    --mp-radius: 1rem;
    --mp-shadow: 0 8px 20px rgba(2, 56, 53, 0.06);
    --mp-width: min(72rem, 100%);
}

.bs-shell .ep-dashboard,
.bs-shell .ep-assessments,
.bs-shell .ep-certificates,
.bs-shell .ep-membership,
.bs-shell .ep-account,
.bs-shell .ep-settings,
.bs-shell .ep-events,
.bs-shell .ep-my-events,
.bs-shell .ep-calendar,
.bs-shell .ep-event,
.bs-shell .ep-event-details,
.bs-shell .ep-registration,
.bs-shell .ep-my-event-details,
.bs-shell .ep-payment,
.bs-shell .ep-pay,
.bs-shell .ep-register,
.bs-shell .ep-q,
.bs-shell .ep-courses,
.bs-shell .ep-on-demand,
.bs-shell .ep-learning,
.bs-shell .ep-catalogue,
.bs-shell .cpd-questionnaire-page {
    width: var(--mp-width);
    max-width: 100%;
    margin-inline: auto;
    color: var(--mp-ink);
    font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}

/* Shared card / fact / status / accent patterns */
.bs-shell .ep-surface,
.bs-shell .su-card {
    border-color: var(--mp-line);
    box-shadow: var(--mp-shadow);
}

.bs-shell .ep-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--mp-gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bs-shell .ep-fact-grid {
    display: grid;
    gap: 0;
    margin: 0;
}

.bs-shell .ep-fact-grid > div {
    display: grid;
    grid-template-columns: 9.25rem minmax(0, 1fr);
    gap: 0.35rem 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--mp-line);
}

.bs-shell .ep-fact-grid > div:first-child {
    padding-top: 0;
}

.bs-shell .ep-fact-grid > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.bs-shell .ep-fact-grid dt,
.bs-shell .ep-meta dt {
    margin: 0;
    color: var(--mp-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bs-shell .ep-fact-grid dd,
.bs-shell .ep-meta dd {
    margin: 0;
    color: var(--mp-ink);
    font-size: 0.98rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.bs-shell .ep-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: var(--mp-gold-soft);
    color: var(--mp-brand);
    font-size: 0.8rem;
    font-weight: 700;
}

.bs-shell .ep-pill--success {
    background: var(--mp-success-soft);
    color: var(--mp-success);
}

.bs-shell .ep-accent-rail {
    border-left: 4px solid var(--mp-gold);
}

.bs-shell .ep-accent-corner {
    position: relative;
    overflow: hidden;
}

.bs-shell .ep-accent-corner::after {
    content: "";
    position: absolute;
    top: -1.5rem;
    right: -1.75rem;
    width: 5.5rem;
    height: 5.5rem;
    background: linear-gradient(135deg, transparent 42%, rgba(178, 133, 82, 0.55) 42%, rgba(178, 133, 82, 0.18) 68%, transparent 68%);
    pointer-events: none;
}

.bs-shell .ep-hero-banner {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(2, 56, 53, 0.35);
    border-radius: var(--mp-radius);
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.08), transparent 34%),
        linear-gradient(135deg, #023835 0%, #012b29 55%, #023835 100%);
    color: #fff;
    box-shadow: var(--mp-shadow);
}

.bs-shell .ep-hero-banner::after {
    content: "";
    position: absolute;
    top: -1.25rem;
    right: -1.5rem;
    width: 8rem;
    height: 8rem;
    background:
        linear-gradient(135deg, transparent 46%, rgba(178, 133, 82, 0.55) 46%, rgba(255, 255, 255, 0.22) 62%, transparent 62%);
    pointer-events: none;
}

.bs-shell .ep-cool-panel {
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    background: #eef3f6;
    box-shadow: var(--mp-shadow);
}

.bs-shell .ep-dashboard__activities,
.bs-shell .ep-assessments__grid,
.bs-shell .ep-certificates__grid,
.bs-shell .cpd-questionnaire-form,
.bs-shell .cpd-questionnaire-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.9rem;
}

.bs-shell .ep-dashboard__activity,
.bs-shell .ep-assessments__card,
.bs-shell .ep-certificates__card,
.bs-shell .cpd-questionnaire-card {
    width: 100%;
    border-radius: 0.95rem;
    background: var(--mp-panel);
    box-shadow: var(--mp-shadow);
}

.bs-shell .ep-assessments__card,
.bs-shell .ep-certificates__card,
.bs-shell .cpd-questionnaire-card {
    border: 1px solid var(--mp-line);
}

.bs-shell .ep-dashboard__meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bs-shell .ep-dashboard__shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bs-shell .ep-assessments__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Shared control sizing so labels (e.g. Download certificate) stay inside the control */
.bs-shell .learner-button,
.bs-shell .assessments-button,
.bs-shell .certificates-button,
.bs-shell .cpd-questionnaire-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    min-height: 2.55rem;
    padding: 0.65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: none;
    cursor: pointer;
}

.bs-shell .learner-button--primary,
.bs-shell .assessments-button--primary,
.bs-shell .certificates-button--primary,
.bs-shell .cpd-questionnaire-button--primary {
    background: var(--mp-brand);
    color: #fff;
    border-color: var(--mp-brand);
    border-radius: 999px;
}

.bs-shell .learner-button--primary:hover,
.bs-shell .assessments-button--primary:hover,
.bs-shell .certificates-button--primary:hover,
.bs-shell .cpd-questionnaire-button--primary:hover {
    background: var(--mp-brand-deep);
    border-color: var(--mp-brand-deep);
    color: #fff;
}

.bs-shell .learner-button--secondary,
.bs-shell .assessments-button--secondary,
.bs-shell .certificates-button--secondary,
.bs-shell .cpd-questionnaire-button--secondary {
    border: 1px solid var(--mp-line);
    border-radius: 999px;
    background: #fff;
    color: var(--mp-ink);
}

.bs-shell .learner-button--secondary:hover,
.bs-shell .assessments-button--secondary:hover,
.bs-shell .certificates-button--secondary:hover,
.bs-shell .cpd-questionnaire-button--secondary:hover {
    border-color: rgba(178, 133, 82, 0.55);
    color: var(--mp-brand);
}

.bs-shell .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Activity / assessment / certificate cards: status + download on the right */
.bs-shell .ep-dashboard__activity-body,
.bs-shell .ep-assessments__card,
.bs-shell .ep-certificates__card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.bs-shell .ep-assessments__card,
.bs-shell .ep-certificates__card {
    padding: 1.1rem 1.15rem;
}

.bs-shell .ep-dashboard__activity-main,
.bs-shell .ep-assessments__main,
.bs-shell .ep-certificates__main { min-width: 0; }

.bs-shell .ep-dashboard__activity-aside,
.bs-shell .ep-assessments__aside,
.bs-shell .ep-certificates__aside {
    display: grid;
    gap: 0.65rem;
    justify-items: stretch;
    align-content: start;
    min-width: 0;
    width: min(100%, 15.5rem);
}

.bs-shell .su-page-header__title {
    color: var(--mp-brand);
}

@media (max-width: 900px) {
    .bs-shell .ep-assessments__stats,
    .bs-shell .ep-dashboard__meters,
    .bs-shell .ep-dashboard__shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .bs-shell .ep-fact-grid > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        align-items: start;
    }
}

@media (max-width: 720px) {
    .bs-shell .ep-dashboard__activity-body,
    .bs-shell .ep-assessments__card,
    .bs-shell .ep-certificates__card {
        grid-template-columns: 1fr !important;
    }

    .bs-shell .ep-dashboard__activity-aside,
    .bs-shell .ep-assessments__aside,
    .bs-shell .ep-certificates__aside {
        justify-items: stretch;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 620px) {
    .bs-shell .ep-assessments__stats,
    .bs-shell .ep-dashboard__meters,
    .bs-shell .ep-dashboard__shortcuts { grid-template-columns: 1fr; }
}

/* Mobile: full-bleed green top scrolls away with the page; body is the second section. */
@media (max-width: 760px) {
    .bs-shell .ep-split-scroll {
        display: block;
        width: 100%;
        max-width: none;
        margin-inline: 0;
        gap: 0;
    }

    .bs-shell .ep-split-scroll__top {
        width: 100%;
        box-sizing: border-box;
        background: var(--bs-brand, #023835);
        color: #fff;
        padding: 0.85rem 0.85rem 1.35rem;
        border-radius: 0 0 1.5rem 1.5rem;
    }

    .bs-shell .ep-split-scroll__top .su-page-header {
        margin-bottom: 0.85rem;
    }

        .bs-shell .ep-split-scroll__top .su-page-header__title,
        h1.su-page-header__title {
            color: #fff;
        }

    .bs-shell .ep-split-scroll__top .su-page-header__subtitle {
        color: rgba(255, 255, 255, 0.78);
    }

    .bs-shell .ep-split-scroll__body {
        display: grid;
        gap: 0.85rem;
        align-content: start;
        box-sizing: border-box;
        padding: 0.85rem;
        background: var(--bs-canvas, #f3f5f6);
        margin-bottom: 70px;
    }
}

/* Mobile: basic search (no panel card chrome). Desktop search stays as-is. */
@media (max-width: 760px) {
    .bs-shell .su-table-search-panel__toolbar-inner,
    .bs-shell .tc-table-search-panel__toolbar-inner,
    .bs-shell .tc-bu-all__toolbar-inner {
        gap: 0.75rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .bs-shell .su-table-search-panel__divider,
    .bs-shell .tc-table-search-panel__divider {
        display: none;
    }

    .bs-shell .su-table-search-panel__icon,
    .bs-shell .tc-table-search-panel__icon,
    .bs-shell .su-table-search-panel__heading,
    .bs-shell .tc-table-search-panel__heading {
        display: none;
    }

    .bs-shell .su-table-search-panel__actions .su-table-search-panel__section-header,
    .bs-shell .tc-table-search-panel__actions .tc-table-search-panel__section-header {
        display: none;
    }

    .bs-shell .su-table-search-panel__filters .su-table-search-panel__section-header,
    .bs-shell .tc-table-search-panel__filters .tc-table-search-panel__section-header {
        justify-content: flex-end;
        min-height: 0;
        margin: 0;
    }

    .bs-shell .su-table-search-panel__section,
    .bs-shell .tc-table-search-panel__section {
        gap: 0.55rem;
    }
}

.ep-list-shell.su-card {
    background-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Card layout: drop outer list shell so event/activity cards stand alone. Desktop table shell stays. */
@media (max-width: 1200px) {
    .bs-shell .ep-list-shell .su-card__header {
        padding: 0 0 0.65rem;
        border-bottom: 0;
    }

    .bs-shell .ep-list-shell .su-card__content {
        padding: 0;
    }
}
