/**
 * FCC Portal Calendar — Frontend Styles (v1.5.0)
 *
 * Follows the FCC Brand Style Guide, 2026 Edition. Tokens are scoped to
 * .fcc-cal so they never collide with Astra / Elementor globals, and every
 * selector is prefixed with .fcc-cal so theme button / heading / list
 * styles can't leak in.
 */

/* ── Tokens ───────────────────────────────────────────────────── */

.fcc-cal {
    --fcc-navy: #0f1d29;
    --fcc-navy-deep: #08121b;
    --fcc-navy-soft: #1a2d40;
    --fcc-sky: #5391de;
    --fcc-sky-light: #7baeed;
    --fcc-sky-soft: #d3e8f2;
    --fcc-ice: #e8f3f8;
    --fcc-gold: #c9a227;
    --fcc-gold-deep: #a88516;
    --fcc-gold-soft: #d9b647;
    --fcc-cream: #faf8f5;
    --fcc-cream-warm: #f6f1eb;
    --fcc-cream-deep: #ede5d8;
    --fcc-ink: #2a2a2a;
    --fcc-ink-soft: #5a5a5a;
    --fcc-line: rgba(15, 29, 41, .12);

    --fcc-serif: 'Playfair Display', Georgia, serif;
    --fcc-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --fcc-r-sm: 8px;
    --fcc-r: 14px;
    --fcc-r-lg: 22px;
    --fcc-pill: 50px;

    --fcc-shadow-sm: 0 2px 10px rgba(15, 29, 41, .06);
    --fcc-shadow-md: 0 10px 30px rgba(15, 29, 41, .10);
    --fcc-shadow-lg: 0 24px 60px rgba(15, 29, 41, .18);
    --fcc-glow-gold: 0 8px 24px rgba(201, 162, 39, .28);

    --fcc-ease: .25s ease;
}

/* ── Base / resets ────────────────────────────────────────────── */

.fcc-cal,
.fcc-cal *,
.fcc-cal *::before,
.fcc-cal *::after {
    box-sizing: border-box;
}

.fcc-cal {
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--fcc-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--fcc-ink);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

.fcc-cal p,
.fcc-cal h2,
.fcc-cal h3,
.fcc-cal h4,
.fcc-cal ul,
.fcc-cal ol,
.fcc-cal li {
    margin: 0;
    padding: 0;
}

.fcc-cal ul,
.fcc-cal ol {
    list-style: none;
}

.fcc-cal a {
    text-decoration: none;
}

.fcc-cal .fcc-cal-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fcc-cal .fcc-cal-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus: 2.5px sky, offset 3px */
.fcc-cal a:focus-visible,
.fcc-cal button:focus-visible {
    outline: 2.5px solid var(--fcc-sky);
    outline-offset: 3px;
}

/* ── Section header ───────────────────────────────────────────── */

.fcc-cal__header {
    max-width: 680px;
    margin-bottom: clamp(32px, 4.5vw, 52px);
}

/* Eyebrow: gold line + uppercase label. Gold-deep is the guide's
   "gold text on light" colour. */
.fcc-cal .fcc-cal-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-family: var(--fcc-sans);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--fcc-gold-deep);
}

.fcc-cal .fcc-cal-eyebrow::before {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--fcc-gold);
    flex-shrink: 0;
}

.fcc-cal .fcc-cal__title {
    font-family: var(--fcc-serif);
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.015em;
    color: var(--fcc-navy);
    text-transform: none;
}

.fcc-cal .fcc-cal__title em {
    font-style: italic;
    font-weight: 500;
    color: var(--fcc-gold-deep);
}

.fcc-cal .fcc-cal__intro {
    margin-top: 16px;
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--fcc-ink-soft);
}

/* ── Layout grid ──────────────────────────────────────────────── */

.fcc-cal__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(32px, 5vw, 48px);
    align-items: start;
}

@media (min-width: 960px) {
    .fcc-cal__grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: clamp(40px, 6vw, 80px);
    }
    .fcc-cal__grid--single {
        grid-template-columns: minmax(0, 720px);
    }
}

/* ── Featured "Next up" card (navy) ───────────────────────────── */

.fcc-cal .fcc-cal-feature {
    position: relative;
    padding: clamp(28px, 3.4vw, 40px);
    border-radius: var(--fcc-r-lg);
    color: rgba(255, 255, 255, .92);
    background:
        radial-gradient(ellipse at 90% 0%, rgba(201, 162, 39, .14) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 100%, rgba(83, 145, 222, .18) 0%, transparent 55%),
        linear-gradient(180deg, var(--fcc-navy) 0%, var(--fcc-navy-deep) 100%);
    box-shadow: var(--fcc-shadow-md);
    transition: transform var(--fcc-ease), box-shadow var(--fcc-ease);
}

/* Gold accent line along the top edge */
.fcc-cal .fcc-cal-feature::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 3px;
    opacity: .6;
    background: linear-gradient(90deg, transparent, var(--fcc-gold) 30%, var(--fcc-gold) 70%, transparent);
    pointer-events: none;
}

.fcc-cal .fcc-cal-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--fcc-shadow-lg);
}

.fcc-cal .fcc-cal-feature:has(.fcc-cal-menu.is-open) {
    z-index: 5;
}

.fcc-cal .fcc-cal-feature__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--fcc-gold-soft);
}

.fcc-cal .fcc-cal-feature__eyebrow::before {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--fcc-gold-soft);
}

.fcc-cal .fcc-cal-feature__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

/* Date badge (on dark) */
.fcc-cal .fcc-cal-date-badge {
    display: inline-block;
    padding: 7px 16px;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    border-left: 3px solid var(--fcc-gold);
    border-radius: 3px;
}

.fcc-cal .fcc-cal-feature__title {
    font-family: var(--fcc-serif);
    font-size: clamp(1.65rem, 2.6vw, 2.15rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: #fff;
    text-transform: none;
    margin-bottom: 20px;
}

.fcc-cal .fcc-cal-feature__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fcc-cal .fcc-cal-feature__desc {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .78);
}

.fcc-cal .fcc-cal-feature__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 28px;
}

/* ── Meta pills ───────────────────────────────────────────────── */

.fcc-cal .fcc-cal-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 6px 14px;
    border-radius: var(--fcc-pill);
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.35;
}

.fcc-cal .fcc-cal-pill > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fcc-cal .fcc-cal-pill--dark {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .92);
}

.fcc-cal .fcc-cal-pill--dark .fcc-cal-icon {
    width: 14px;
    height: 14px;
    color: var(--fcc-gold-soft);
}

.fcc-cal .fcc-cal-pill--live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fcc-gold-soft);
    box-shadow: 0 0 0 3px rgba(217, 182, 71, .22);
}

/* ── Buttons ──────────────────────────────────────────────────── */

.fcc-cal .fcc-cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0;
    padding: 14px 30px;
    font-family: var(--fcc-sans);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    border: 1.5px solid transparent;
    border-radius: var(--fcc-pill);
    box-shadow: none;
    cursor: pointer;
    transition: all var(--fcc-ease);
    -webkit-tap-highlight-color: transparent;
}

.fcc-cal .fcc-cal-btn:hover {
    transform: translateY(-2px);
}

.fcc-cal .fcc-cal-btn--sm {
    padding: 9px 20px;
    font-size: .78rem;
    gap: 7px;
}

.fcc-cal .fcc-cal-btn--sm .fcc-cal-icon {
    width: 14px;
    height: 14px;
}

/* Gold (primary) — one per section */
.fcc-cal .fcc-cal-btn--gold {
    background: var(--fcc-gold);
    border-color: var(--fcc-gold);
    color: var(--fcc-navy);
    box-shadow: var(--fcc-glow-gold);
}

.fcc-cal .fcc-cal-btn--gold:hover,
.fcc-cal .fcc-cal-menu.is-open .fcc-cal-btn--gold {
    background: var(--fcc-gold-soft);
    border-color: var(--fcc-gold-soft);
    color: var(--fcc-navy);
    box-shadow: 0 12px 30px rgba(201, 162, 39, .38);
}

/* Navy (strong secondary on light) */
.fcc-cal .fcc-cal-btn--navy {
    background: var(--fcc-navy);
    border-color: var(--fcc-navy);
    color: #fff;
    box-shadow: var(--fcc-shadow-sm);
}

.fcc-cal .fcc-cal-btn--navy:hover {
    background: var(--fcc-navy-soft);
    border-color: var(--fcc-navy-soft);
    color: #fff;
    box-shadow: var(--fcc-shadow-md);
}

/* Outline (tertiary on light) */
.fcc-cal .fcc-cal-btn--outline {
    background: transparent;
    border-color: var(--fcc-navy);
    color: var(--fcc-navy);
}

.fcc-cal .fcc-cal-btn--outline:hover,
.fcc-cal .fcc-cal-menu.is-open .fcc-cal-btn--outline {
    background: var(--fcc-navy);
    border-color: var(--fcc-navy);
    color: #fff;
    box-shadow: var(--fcc-shadow-sm);
}

/* Quiet text link on dark */
.fcc-cal .fcc-cal-textlink--dark {
    font-size: .92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(255, 255, 255, .3);
    padding-bottom: 1px;
    transition: color var(--fcc-ease), border-color var(--fcc-ease);
}

.fcc-cal .fcc-cal-textlink--dark:hover {
    color: var(--fcc-gold-soft);
    border-color: var(--fcc-gold-soft);
}

/* ── Add-to-calendar menu ─────────────────────────────────────── */

.fcc-cal .fcc-cal-menu {
    position: relative;
    display: inline-block;
}

.fcc-cal .fcc-cal-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform var(--fcc-ease);
}

.fcc-cal .fcc-cal-menu.is-open .fcc-cal-chevron {
    transform: rotate(180deg);
}

.fcc-cal .fcc-cal-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    min-width: 230px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--fcc-line);
    border-radius: var(--fcc-r);
    box-shadow: var(--fcc-shadow-lg);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease;
}

.fcc-cal .fcc-cal-menu__panel[hidden] {
    display: none;
}

.fcc-cal .fcc-cal-menu.is-open .fcc-cal-menu__panel {
    opacity: 1;
    transform: translateY(0);
}

.fcc-cal .fcc-cal-menu--row .fcc-cal-menu__panel {
    left: auto;
    right: 0;
}

.fcc-cal .fcc-cal-menu__panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--fcc-r-sm);
    font-family: var(--fcc-sans);
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--fcc-ink);
    transition: background .14s ease, color .14s ease;
}

.fcc-cal .fcc-cal-menu__panel a:hover,
.fcc-cal .fcc-cal-menu__panel a:focus-visible {
    background: var(--fcc-ice);
    color: var(--fcc-navy);
}

.fcc-cal .fcc-cal-menu__panel a:focus-visible {
    outline-offset: -2.5px;
}

.fcc-cal .fcc-cal-menu__hint {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--fcc-ink-soft);
}

/* ── "Coming up" list ─────────────────────────────────────────── */

.fcc-cal .fcc-cal-list__heading {
    font-family: var(--fcc-serif);
    font-size: clamp(1.4rem, 2vw, 1.65rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--fcc-navy);
    text-transform: none;
    margin-bottom: 8px;
}

.fcc-cal .fcc-cal-list__month {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 12px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--fcc-ink-soft);
}

.fcc-cal .fcc-cal-list__month::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--fcc-cream-deep);
}

.fcc-cal .fcc-cal-list__items {
    display: grid;
    gap: 10px;
}

.fcc-cal .fcc-cal-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 20px 16px 16px;
    background: #fff;
    border: 1px solid var(--fcc-line);
    border-radius: var(--fcc-r);
    box-shadow: var(--fcc-shadow-sm);
    transition: transform var(--fcc-ease), box-shadow var(--fcc-ease), border-color var(--fcc-ease);
}

.fcc-cal .fcc-cal-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--fcc-shadow-md);
    border-color: var(--fcc-sky-soft);
}

/* Keep an open menu's row above its neighbours */
.fcc-cal .fcc-cal-row:has(.fcc-cal-menu.is-open) {
    position: relative;
    z-index: 5;
}

.fcc-cal .fcc-cal-row__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 16px;
    border-right: 1px solid var(--fcc-line);
    text-align: center;
}

.fcc-cal .fcc-cal-row__dow {
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--fcc-ink-soft);
}

.fcc-cal .fcc-cal-row__day {
    font-family: var(--fcc-serif);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.05;
    color: var(--fcc-navy);
}

.fcc-cal .fcc-cal-row__title {
    font-family: var(--fcc-serif);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--fcc-navy);
    text-transform: none;
    letter-spacing: 0;
}

.fcc-cal .fcc-cal-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin-top: 3px;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--fcc-ink-soft);
}

.fcc-cal .fcc-cal-row__meta > span + span::before {
    content: "·";
    margin: 0 8px;
    color: var(--fcc-gold);
}

.fcc-cal .fcc-cal-row__rel {
    font-weight: 700;
    color: var(--fcc-navy);
}

/* ── Empty state ──────────────────────────────────────────────── */

.fcc-cal .fcc-cal-empty {
    max-width: 720px;
    padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 56px);
    text-align: center;
    background: var(--fcc-cream-warm);
    border: 1px solid var(--fcc-cream-deep);
    border-radius: var(--fcc-r-lg);
}

.fcc-cal .fcc-cal-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    color: var(--fcc-gold);
    font-size: 1.1rem;
    line-height: 1;
}

.fcc-cal .fcc-cal-ornament::before,
.fcc-cal .fcc-cal-ornament::after {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--fcc-gold);
}

.fcc-cal .fcc-cal-empty__title {
    font-family: var(--fcc-serif);
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.3;
    color: var(--fcc-navy);
}

.fcc-cal .fcc-cal-empty__detail {
    max-width: 480px;
    margin: 12px auto 0;
    color: var(--fcc-ink-soft);
}

/* ── Footer actions ───────────────────────────────────────────── */

.fcc-cal .fcc-cal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-top: clamp(32px, 4.5vw, 48px);
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 767px) {
    .fcc-cal .fcc-cal-row {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 14px;
        padding: 14px 14px 14px 12px;
    }
    .fcc-cal .fcc-cal-row__date {
        padding-right: 12px;
    }
    .fcc-cal .fcc-cal-row__day {
        font-size: 1.6rem;
    }
    .fcc-cal .fcc-cal-row__title {
        font-size: 1.05rem;
    }
    /* Stack time / place instead of wrapping mid-separator */
    .fcc-cal .fcc-cal-row__meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .fcc-cal .fcc-cal-row__meta > span + span::before {
        content: none;
    }
}

@media (max-width: 560px) {
    .fcc-cal .fcc-cal-feature__actions,
    .fcc-cal .fcc-cal__footer {
        flex-direction: column;
        align-items: stretch;
    }
    .fcc-cal .fcc-cal-feature__actions .fcc-cal-menu,
    .fcc-cal .fcc-cal-feature__actions .fcc-cal-btn,
    .fcc-cal .fcc-cal__footer .fcc-cal-btn {
        width: 100%;
    }
    .fcc-cal .fcc-cal-feature__actions .fcc-cal-textlink--dark {
        align-self: center;
    }
    .fcc-cal .fcc-cal-menu--gold .fcc-cal-menu__panel {
        right: 0;
        min-width: 0;
    }
    /* Row "Add" collapses to an icon; aria-label keeps its name */
    .fcc-cal .fcc-cal-menu--row .fcc-cal-btn {
        padding: 10px 12px;
    }
    .fcc-cal .fcc-cal-menu--row .fcc-cal-btn__label,
    .fcc-cal .fcc-cal-menu--row .fcc-cal-chevron {
        display: none;
    }
    .fcc-cal .fcc-cal-menu--row .fcc-cal-icon {
        width: 16px;
        height: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fcc-cal *,
    .fcc-cal *::before,
    .fcc-cal *::after {
        transition-duration: .01ms !important;
    }
    .fcc-cal .fcc-cal-feature:hover,
    .fcc-cal .fcc-cal-row:hover,
    .fcc-cal .fcc-cal-btn:hover {
        transform: none;
    }
}
