/*
 * Course components.
 *
 * Every value in the booking table below was read off the production
 * stylesheet (gday-theme/library/php/courses/_courses.css) and the computed
 * styles on link-resources.com.au, not designed here:
 *
 *   header  24px/700, -0.05em, white on #0C0B0B, 12px padding
 *   grid    2fr 1fr 1fr 4fr 1fr
 *   pills   42px tall, 2px #ADADAD border, 5px radius, 16px bold #0C0B0B
 *   chosen  #BF2428 fill, white text
 *   spots   12px, -0.2px, #BF2428, fire emoji
 *   button  15px/700, -0.04em, 12px 17px, 40px radius
 */

/* ---- course summary, beside the Course details prose ---- */

.lrc-summary {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    padding: 60px 0 0;
}

.lrc-summary__col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px;
}

.lrc-summary__fact {
    display: grid;
    gap: 16px;
    grid-template-columns: 24px 1fr;
}

.lrc-summary__icon {
    color: #69727d;
    display: block;
    margin-top: 4px;
}

.lrc-summary__body { min-width: 0; }

.lrc-summary__label {
    color: var(--lr-red, #bf2428);
    font-size: 18px;
    font-weight: 700;
    line-height: 27px;
    margin: 0;
}

.lrc-summary__value {
    color: var(--lr-ink, #333);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: normal;
    line-height: 24px;
    margin: 0;
}

@media (max-width: 1024px) {
    .lrc-summary {
        grid-template-columns: 1fr;
        padding-top: 32px;
    }
}

/* ---- shared ---- */

/* Theme independent visually hidden text. The plugin must not depend on the
 * theme shipping a .screen-reader-text rule. */
.lrc-sr {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.lrc-btn {
    align-items: center;
    background: var(--lr-red, #bf2428);
    border: 0;
    border-radius: 40px;
    color: var(--lr-white, #fff);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1;
    padding: 12px 17px;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.lrc-btn:hover,
.lrc-btn:focus {
    background: var(--lr-red-dark, #a3191d);
    color: var(--lr-white, #fff);
}

.lrc-btn:focus-visible {
    outline: 3px solid var(--lr-focus, #0c6ece);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------
 * Booking table
 * ------------------------------------------------------------- */

.lrc-avail__table { overflow-x: auto; }

.lrc-avail__head,
.lrc-avail__row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 4fr 1fr;
}

/* One black cell per column, as the .th cells render on production. */
.lrc-avail__head {
    background: var(--lr-ink-deep, #0c0b0b);
}

.lrc-avail__head span {
    color: var(--lr-white, #fff);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 36px;
    padding: 12px;
    text-align: center;
}

.lrc-avail__head span:first-child { text-align: left; }

/* Rows top-align, as on production (grid default stretch, block cells). */
.lrc-avail__row {
    border: 1px solid var(--lr-ink-deep, #0c0b0b);
    border-top: 0;
}

.lrc-avail__cell {
    min-width: 0;
    padding: 12px;
}

.lrc-avail__label { display: none; }

.lrc-avail__location {
    align-items: flex-start;
    color: var(--lr-ink, #333);
    display: flex;
    font-size: 16px;
    gap: 6px;
    line-height: 24px;
}

/* The pin sits beside the first line and wrapped lines align under the
   text, not under the pin (the old hanging indent left the first line a
   few pixels further in than the second: Jeremy 15/10/2026). */
.lrc-avail__pin {
    color: var(--lr-ink-deep, #0c0b0b);
    flex: 0 0 auto;
    margin-top: 4px;
}

.lrc-avail__cell--cost,
.lrc-avail__cell--duration {
    font-size: 16px;
    text-align: center;
}

.lrc-avail__cost,
.lrc-avail__per { font-size: 16px; }

/* ---- dates ---- */

/* 40px of side padding holds the two arrows, exactly as the flexslider on
 * production reserves it. */
.lrc-avail__cell--dates {
    contain: paint;
    overflow: hidden;
    padding: 12px 0;
}

.lrc-avail__dates {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0 40px;
    position: relative;
}

.lrc-avail__scroller {
    contain: paint;
    display: flex;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}

/*
 * Snapping only where people swipe. On a mouse-driven browser the arrows do
 * the scrolling, and desktop Chrome re-snaps a mandatory container to the
 * date it last snapped to once the arrow's smooth scroll ends, so the row
 * sprang straight back (Jeremy 03/11/2026; Safari and phones were fine).
 */
@media (hover: none) {
    .lrc-avail__scroller {
        scroll-snap-type: x mandatory;
    }
}

.lrc-avail__scroller::-webkit-scrollbar { display: none; }

.lrc-avail__scroller:focus-visible {
    outline: 3px solid var(--lr-focus, #0c6ece);
    outline-offset: 4px;
}

.lrc-avail__date {
    cursor: pointer;
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
}

.lrc-avail__pill {
    border: 2px solid #adadad;
    border-radius: 5px;
    color: var(--lr-ink-deep, #0c0b0b);
    display: block;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 38px;
    min-width: 82px;
    padding: 0 10px;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.lrc-avail__date:hover .lrc-avail__pill { border-color: var(--lr-ink-deep, #0c0b0b); }

/* The chosen date fills brand red, as production's :checked + div does. */
.lrc-avail__radio:checked + .lrc-avail__pill {
    background: var(--lr-red, #bf2428);
    border-color: var(--lr-red, #bf2428);
    color: var(--lr-white, #fff);
}

.lrc-avail__radio:focus-visible + .lrc-avail__pill {
    outline: 3px solid var(--lr-focus, #0c6ece);
    outline-offset: 2px;
}

.lrc-avail__spots {
    color: var(--lr-red, #bf2428);
    display: block;
    font-size: 12px;
    letter-spacing: 0;
    margin-top: 3px;
    white-space: nowrap;
}

.lrc-avail__spots::before { content: "\1F525"; }

/* The scroller arrows, sitting in the 40px gutters like the flexslider's. */
.lrc-avail__nav {
    background: none;
    border: 0;
    color: var(--lr-ink-deep, #0c0b0b);
    cursor: pointer;
    line-height: 0;
    padding: 6px;
    position: absolute;
    top: 9px;
}

.lrc-avail__nav:hover { color: var(--lr-red, #bf2428); }

.lrc-avail__nav[hidden] { display: none; }

.lrc-avail__nav--prev { left: 0; }
.lrc-avail__nav--next { right: 0; }

.lrc-avail__nav:focus-visible {
    outline: 3px solid var(--lr-focus, #0c6ece);
    outline-offset: 2px;
}

/* ---- action ---- */

.lrc-avail__cell--action { text-align: center; }
.lrc-avail__cell--action .lrc-btn { margin: 0 auto; }

.lrc-avail__fallback {
    color: var(--lr-ink, #333);
    margin: 20px 0 0;
}

.lrc-avail__fallback a {
    color: var(--lr-red, #bf2428);
    font-weight: 700;
}

/* ---- request-a-session variant ---- */

.lrc-avail--request .lrc-avail__head,
.lrc-avail--request .lrc-avail__row {
    grid-template-columns: 0.8fr 0.8fr 1.4fr auto;
}

.lrc-avail__date-input {
    background: var(--lr-white, #fff);
    border: 2px solid #adadad;
    border-radius: 5px;
    color: var(--lr-ink-deep, #0c0b0b);
    font-family: inherit;
    font-size: 16px;
    min-height: 42px;
    padding: 8px 10px;
    width: 100%;
}

.lrc-avail__note {
    color: var(--lr-ink-muted, #3a3838);
    font-size: 14px;
    line-height: 1.5;
    margin: 20px 0 0;
    max-width: 70ch;
}

/* Production drops the header row to 18.4px below the tablet edge. */
@media (max-width: 1023px) {
    .lrc-avail__head span {
        font-size: 18.4px;
        letter-spacing: 0;
        line-height: 28px;
    }
}

/* ---- stacked on a phone, as production stacks below 600px ---- */

@media (max-width: 599px) {
    .lrc-avail__table { border-top: 1px solid var(--lr-ink-deep, #0c0b0b); }

    .lrc-avail__head { display: none; }

    .lrc-avail__row,
    .lrc-avail--request .lrc-avail__row {
        display: block;
        padding-bottom: 8px;
    }

    /* Each cell announces itself with the black bar production uses. */
    .lrc-avail__label {
        background: var(--lr-ink-deep, #0c0b0b);
        color: var(--lr-white, #fff);
        display: block;
        font-size: 16px;
        font-weight: 700;
        margin: 0 -8px 12px;
        padding: 4px 8px;
        text-align: center;
    }

    .lrc-avail__cell { padding: 8px 8px 4px; }
    .lrc-avail__cell--dates { padding: 8px 8px 4px; }
    .lrc-avail__cell--cost,
    .lrc-avail__cell--duration { text-align: center; }

    .lrc-avail__cell--action .lrc-btn { width: 100%; }
}

/* ---------------------------------------------------------------
 * Hero decision band
 *
 * Floats across the hero's diagonal bottom edge: white, one soft real
 * shadow, the four live facts separated by hairlines, and the jump to
 * the booking table. The one authored entrance on the page.
 * ------------------------------------------------------------- */

.lrc-band {
    align-items: center;
    background: var(--lr-white, #fff);
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(12, 11, 11, 0.12);
    display: flex;
    gap: 28px;
    padding: 26px 32px;
}

.lrc-band__facts {
    display: flex;
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
}

.lrc-band__fact {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 28px;
}

.lrc-band__fact:first-child { padding-left: 0; }

.lrc-band__fact + .lrc-band__fact { border-left: 1px solid var(--lr-border, #d5d5d5); }

.lrc-band__label {
    color: var(--lr-ink-muted, #5a5858);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin: 0 0 2px;
    text-transform: uppercase;
}

.lrc-band__data { margin: 0; }

.lrc-band__value {
    color: var(--lr-ink-deep, #0c0b0b);
    display: block;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 30px;
    white-space: nowrap;
}

.lrc-band__note {
    color: var(--lr-ink-muted, #5a5858);
    display: block;
    font-size: 13px;
    line-height: 18px;
    margin-top: 2px;
    /* No nowrap: a long note must wrap inside its cell, never leak
       across the neighbouring fact (seen 26/08 with a full address). */
    overflow-wrap: anywhere;
}

.lrc-band__none {
    color: var(--lr-ink, #333);
    flex: 1 1 auto;
    font-size: 18px;
    letter-spacing: 0;
    line-height: 27px;
    margin: 0;
}

.lrc-band__cta {
    flex: 0 0 auto;
    font-size: 16px;
    padding: 15px 26px;
}

/* A band with one or two facts (a request-only course) hugs its content
   instead of stretching the full rail with a lone cell in it (tester
   feedback 19/09/2026). Three or more facts keep the full width. */
@media (min-width: 1025px) {
    .lrc-band:has(.lrc-band__fact:first-child:last-child),
    .lrc-band:has(.lrc-band__fact:nth-child(2):last-child),
    .lrc-band:has(.lrc-band__none) {
        margin-inline: auto;
        min-width: min(100%, 520px);
        width: fit-content;
    }

    .lrc-band:has(.lrc-band__fact:first-child:last-child) .lrc-band__facts,
    .lrc-band:has(.lrc-band__fact:nth-child(2):last-child) .lrc-band__facts { flex: 0 1 auto; }

    .lrc-band:has(.lrc-band__fact:first-child:last-child) .lrc-band__fact,
    .lrc-band:has(.lrc-band__fact:nth-child(2):last-child) .lrc-band__fact { flex: 0 1 auto; padding-right: 36px; }
}

/* The page's single entrance. */
@media (prefers-reduced-motion: no-preference) {
    .lrc-band {
        animation: lrc-band-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    @keyframes lrc-band-in {
        from {
            opacity: 0;
            transform: translateY(14px);
        }
    }

    html { scroll-behavior: smooth; }
}

@media (max-width: 1024px) {
    .lrc-band {
        flex-wrap: wrap;
        gap: 20px;
        padding: 22px 24px;
    }

    .lrc-band__facts {
        display: grid;
        flex: 1 1 100%;
        gap: 18px 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lrc-band__fact { padding: 0 20px; }
    .lrc-band__fact:nth-child(odd) { border-left: 0; padding-left: 0; }

    .lrc-band__cta {
        flex: 1 1 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lrc-band__value { font-size: 22px; line-height: 26px; }
}

.lrc-avail__note--fine {
    color: var(--lr-ink-muted, #5a5858);
    font-size: 14px;
    font-style: italic;
    max-width: 720px;
}

.lrc-enquiry__intro {
    font-size: 18px;
    margin: 0 0 24px;
}

/* The no-dates state brings its own "Schedule a session" heading, so the
   content's "Book a course" heading above it would read as a duplicate.
   The #lr-main prefix is needed to outrank the theme's heading rules,
   which set display:flex for the paperclip icon at #lr-main weight. */
#lr-main .lr-course-section h2:has(+ .lrc-avail--request),
#lr-main .lr-course-section h2:has(+ .wp-block-link-resources-course-availability .lrc-avail--request) {
    display: none;
}

.lrc-band__fine {
    color: var(--lr-ink-muted, #5a5858);
    font-size: 13px;
    font-style: italic;
    line-height: 1.5;
    margin: 14px auto 0;
    max-width: 820px;
    text-align: center;
}

.lrc-avail__getstarted {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 6px 0 0;
}

.lrc-avail__getstarted span {
    color: var(--lr-ink, #333);
    flex: 1 1 300px;
}

/* ---------------------------------------------------------------
 * Location public schedule table
 * ------------------------------------------------------------- */

.lrc-schedule__scroll {
    overflow-x: auto;
}

.lrc-schedule__search {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}

.lrc-schedule__search label {
    align-items: center;
    display: flex;
    font-size: 16px;
    gap: 10px;
}

.lrc-schedule__search input {
    border: 1px solid #767676;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    padding: 7px 10px;
    width: 220px;
}

.lrc-schedule__table {
    border-collapse: collapse;
    min-width: 780px;
    width: 100%;
}

.lrc-schedule__table thead th {
    background: var(--lr-red, #bf2428);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 20px 18px;
    text-align: left;
    white-space: nowrap;
}

.lrc-schedule__table thead th:not(:first-child) {
    text-align: center;
}

.lrc-schedule__table tbody th,
.lrc-schedule__table tbody td {
    border-top: 1px solid #e6e6e6;
    font-size: 16px;
    padding: 22px 18px;
    text-align: center;
    vertical-align: middle;
}

.lrc-schedule__table tbody th {
    font-weight: 700;
    text-align: left;
}

.lrc-schedule__table tbody th a {
    color: var(--lr-red, #bf2428);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lrc-schedule__table tbody th a:hover {
    text-decoration: none;
}

.lrc-schedule__table tbody tr:nth-child(odd) {
    background: #f5f5f5;
}

.lrc-schedule__days {
    font-variant-numeric: tabular-nums;
}

.lrc-schedule__enquire a {
    color: var(--lr-red, #bf2428);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lrc-schedule__enquire a:hover {
    text-decoration: none;
}

/* Below tablet width the schedule becomes stacked cards - production's
   mobile UX, tidied up: course name as the card header, label/value rows
   beneath, no sideways scrolling. */
@media (max-width: 760px) {
    .lrc-schedule__scroll { overflow-x: visible; }

    .lrc-schedule__table,
    .lrc-schedule__table tbody,
    .lrc-schedule__table tr,
    .lrc-schedule__table tbody th,
    .lrc-schedule__table td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .lrc-schedule__table thead { display: none; }

    .lrc-schedule__table tr {
        background: #fff;
        border: 1px solid #e6e6e6;
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
        margin: 0 0 18px;
        overflow: hidden;
    }

    .lrc-schedule__table tbody tr:nth-child(odd) { background: #fff; }

    .lrc-schedule__table tbody th {
        background: #f3f3f3;
        border-top: 0;
        font-size: 17px;
        padding: 16px 18px;
        text-align: left;
    }

    .lrc-schedule__table td {
        align-items: baseline;
        border-top: 1px solid #efefef;
        display: flex;
        gap: 16px;
        justify-content: space-between;
        padding: 13px 18px;
        text-align: right;
    }

    .lrc-schedule__table td::before {
        color: var(--lr-red, #bf2428);
        content: attr(data-label);
        flex: 0 0 auto;
        font-weight: 700;
        text-align: left;
    }

    .lrc-schedule__search { justify-content: flex-start; }
    .lrc-schedule__search input { width: 100%; max-width: 320px; }
}

/* Location pages only: the way back up to the main course page, directly
   under the table so it catches someone the moment none of this facility's
   dates suit. */
.lrc-avail__hub {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 0;
}

.lrc-btn--ghost {
    background: transparent;
    border: 2px solid var(--lr-red, #bf2428);
    color: var(--lr-ink-deep, #0c0b0b);
    padding: 10px 15px; /* 12/17 minus the border, so it lines up with .lrc-btn */
}

.lrc-btn--ghost:hover,
.lrc-btn--ghost:focus {
    background: var(--lr-red, #bf2428);
    color: #fff;
}
