/* The community design on the club's website (2026-11-02, gotcha 322): only what the
   website needs around the app's own parts (member-portal/css/community-standard.css,
   loaded with this file). Every rule starts with html[data-community]. The colours
   are the scheme's roles, and the site's --el-* names follow them
   (lib/community-site-head.js). */

/* The ground, over what the site's own scripts paint inline (its night mode, its
   palette): the scheme's canvas, in both appearances. */
html[data-community],
html[data-community] body { background: var(--cs-canvas) !important; color: var(--cs-text); }

/* The old page's sections stay away from the first paint on the pages the design
   draws itself; what is kept is named by js/community-site.js. */
html[data-community][data-cst-page] body > section:not([data-cst-keep]) { display: none; }
html[data-community][data-cst-page="events"]:not([data-cst-calendar]) body > section[data-cst-keep] { display: none; }

/* The filters above a list */
html[data-community] .cst-site-page { min-height: 50vh; min-height: 50svh; }
html[data-community][data-cst-calendar] .cst-site-page { min-height: 0; padding-bottom: 0; }
/* Three cards a row once each has 280 px (the app's grid stops at two). */
@container cst-page (min-width: 900px) {
    html[data-community] .cst-site-page .cst-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
html[data-community] .cst-site-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--tile-gap) 16px;
    margin: 16px 0;
}
html[data-community] .cst-site-bar:empty { display: none; }
html[data-community] .cst-site-bar .cst-seg { margin: 0; }
html[data-community] .cst-site-bar .cst-seg button { min-width: 88px; }
html[data-community] .cst-site-field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
html[data-community] .cst-site-search { flex: 1 1 240px; }
html[data-community] .cst-site-field label { font-size: 14px; font-weight: 700; color: var(--cs-text); }
html[data-community] .cst-site-field :is(input, select) {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--cs-control-border);
    border-radius: 8px;
    background: var(--cs-input-bg);
    color: var(--cs-input-text);
    font: inherit;
    font-size: 16px;
}
html[data-community] .cst-site-field select option { background: var(--cs-surface); color: var(--cs-text); }
html[data-community] .cst-site-field :is(input, select):focus-visible { outline: 3px solid var(--cs-focus); outline-offset: 1px; }
html[data-community] .cst-empty { margin: 16px 0; color: var(--cs-muted); }

/* A post's page: the description in the reading column; more pictures whole. */
html[data-community] .cst-site-detail .cst-site-reading { margin-top: 16px; }
html[data-community] .cst-site-detail .cst-site-reading .el-container { padding: 0; max-width: none; }
html[data-community] .cst-site-pictures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: var(--tile-gap);
    margin-top: 16px;
}
html[data-community] .cst-site-pictures img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 12px;
    background: var(--cs-surface-inset);
}

/* The calendar stays, in the page's own colours, without its band and heading, its
   second list (List is the list) and its strip of dots. */
html[data-community] body > section[data-cst-keep] { background: transparent; }
html[data-community] body > section[data-cst-keep]::after { display: none; }
/* On the page's one column (.cst-page). */
html[data-community] body > section[data-cst-keep] .el-container {
    max-width: 1120px;
    padding-left: 16px;
    padding-right: 16px;
}
@media (min-width: 768px) {
    html[data-community] body > section[data-cst-keep] .el-container { padding-left: 24px; padding-right: 24px; }
}
html[data-community][data-cst-page="events"] body > section[data-cst-keep] { padding: 0 0 32px; }
html[data-community][data-cst-page="events"] .el-ev-month-wrap,
html[data-community][data-cst-page="events"] .el-ev-day,
html[data-community][data-cst-page="events"] .el-res-rail { margin-top: 0; }
/* A card like the others: the role's surface and line, no glow (it is written for navy). */
html[data-community] .el-ev-cal {
    background: var(--cs-surface);
    border: 1px solid var(--cs-line);
    box-shadow: none;
}
html[data-community][data-cst-page="events"] body > section[data-cst-keep] .el-section-header,
html[data-community][data-cst-page="events"] #el-ev-list,
html[data-community][data-cst-page="events"] .el-ev-day-timeline-host { display: none; }
html[data-community][data-cst-page="events"] .el-ev-cal,
html[data-community][data-cst-page="events"] .el-ev-month-wrap { max-width: 100%; min-width: 0; }

/* The kinds of post on the pages not yet redrawn: nothing sticky, the role's colours. */
html[data-community] .el-detail-titlebar { position: static; }
html[data-community] .el-detail-cta-row { position: static; }

/* The seam between sections is a glow in the old navy. */
html[data-community] .el-section::before,
html[data-community] .el-preview-strip::before,
html[data-community] .el-footer::before { display: none; }

/* Night mode paints the bar, the menu and the footer black, under text that is
   written for the club colour: the design keeps the club colour on them, as the app does. */
html[data-community].night-mode .el-nav,
html[data-community].night-mode .el-nav-drawer { background: var(--cs-nav); }
html[data-community].night-mode .el-footer { background: var(--cs-footer); }
/* On the club colour the accent is the bar's own text: --el-accent is for the page. */
html[data-community] .el-nav,
html[data-community] .el-nav-drawer,
html[data-community] .el-footer {
    --el-accent: var(--cs-nav-text);
    --el-accent-strong: var(--cs-nav-text);
}
html[data-community] .el-nav-links a { color: var(--cs-nav-muted); opacity: 1; }
html[data-community] .el-nav-links a:hover,
html[data-community] .el-nav-links a.is-active { color: var(--cs-nav-text); }
html[data-community] .el-nav-drawer a.is-active {
    background: var(--cs-nav-active);
    color: var(--cs-nav-active-text);
}

/* The club colour as text fails on a light ground (amber on white): inside a section
   it is the scheme's link, with the surface as the text on it (the same checked pair).
   The hero has the club colour behind it, and keeps --el-accent. */
html[data-community] body > section:not(.el-hero) {
    --club-accent: var(--cs-link);
    --club-accent-text: var(--cs-surface);
}
/* A form's button is fixed red on the old pages. */
html[data-community] .el-contact-submit {
    background: var(--cs-primary);
    color: var(--cs-primary-text);
}

/* Home's cards sit on the ground and swipe: the carousel's arrows would cover their text. */
html[data-community] .el-preview-strip--sky { background: transparent; }
html[data-community] #el-preview-events ~ .el-carousel-arrow { display: none !important; }

/* The closed mobile menu sits off the right edge: its shadow shows on a light ground. */
html[data-community] body:not(.el-nav-drawer-open) .el-nav-drawer { box-shadow: none; }

/* Contact buttons on a wide screen (2026-11-04, the design owner's proposal):
   WhatsApp and Ask Ace as two 48 px round buttons, one above the other, in
   the right margin at the middle of the screen — clear of the footer and the
   page's own buttons. A phone keeps them at the bottom right. */
@media (min-width: 1100px) {
    html[data-community] .cs-wa-fab,
    html[data-community] .el-ace-fab {
        width: 48px !important;
        height: 48px !important;
        right: 16px !important;
        left: auto !important;
        bottom: auto !important;
    }
    html[data-community] .el-ace-fab { top: calc(50% - 52px) !important; }
    html[data-community] .cs-wa-fab { top: calc(50% + 4px) !important; font-size: 1.5rem; }
    html[data-community] .el-ace-fab-avatar i { font-size: 1.45rem; }
}
