/* ==========================================================================
   PlayConnect / Southern Sharks — LimeSurvey survey theme
   Aligned to Design2 (the shipped app palette), 2026-08-29.

   Loads LAST in the theme cascade (config.xml <replace>css/custom.css</replace>,
   bundle order: base -> variations/sea_green -> animate -> theme -> custom), so
   it can override the Bootswatch variation without !important on structure.
   Colour and font declarations still carry !important because the variation
   sets them at equal specificity and would otherwise win on source order.

   Palette is the SHIPPED app's (frontend/src/index.css), not the Figma export:
   background #0D1B2A / card #1A2535. See skills/playconnect-design — the two
   differ, and the shipped values are the source of truth.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

:root {
    --pc-bg:            #0D1B2A;   /* app background */
    --pc-surface:       #1A2535;   /* cards, elevated containers */
    --pc-surface-2:     #223047;   /* inputs, hover states */
    --pc-border:        rgba(255, 255, 255, 0.10);
    --pc-border-strong: rgba(255, 255, 255, 0.20);

    --pc-green:  #00C853;
    --pc-cyan:   #66D9FF;
    --pc-navy:   #003D7A;
    --pc-orange: #FF9800;
    --pc-red:    #FF5252;

    --pc-text:       #F2F6FA;
    --pc-text-muted: #A8B6C8;   /* 7.0:1 on --pc-bg */
    --pc-on-green:   #062512;   /* dark text for the green->cyan gradient */

    --pc-grad-primary: linear-gradient(135deg, #00C853 0%, #66D9FF 100%);

    --pc-radius:    16px;
    --pc-radius-sm: 12px;
    --pc-shadow:    0 4px 20px -8px rgba(0, 0, 0, 0.6);

    --pc-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --pc-display: 'Montserrat', 'Inter', sans-serif;
}

/* --------------------------------------------------------------- ground -- */

html, body {
    background: var(--pc-bg) !important;
    color: var(--pc-text) !important;
    font-family: var(--pc-sans) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    -webkit-font-smoothing: antialiased;
}

/* The variation paints several wrappers white; none of them should be. */
.ls-wrapper, .container-md, .container-fluid, #surveyContainer,
.outerframe, .body-content, main, .ls-flex-column {
    background: transparent !important;
    color: inherit !important;
}

/* ---------------------------------------------------------------- header -- */

.navbar, .navbar-light, .top-container {
    background: var(--pc-surface) !important;
    border-bottom: 1px solid var(--pc-border) !important;
    box-shadow: none !important;
}
.navbar-brand, .navbar-brand a, .navbar .nav-link, .navbar-action-link {
    color: var(--pc-text) !important;
    font-family: var(--pc-display) !important;
    font-weight: 700 !important;
}
/* The club mark is the branding — give it room to read as a logo. */
.navbar-brand img.logo, img[alt="SSPC Logo"] {
    height: 44px !important;
    width: auto !important;
    margin-right: 12px !important;
}

/* -------------------------------------------------------------- progress -- */

.progress {
    background: var(--pc-surface-2) !important;
    border-radius: 999px !important;
    height: 8px !important;
    overflow: hidden;
}
.progress-bar {
    background: var(--pc-grad-primary) !important;
    border-radius: 999px !important;
}

/* ------------------------------------------------------------ the "card" -- */

.survey-form-container,
.question-container {
    background: var(--pc-surface) !important;
    border: 1px solid var(--pc-border) !important;
    border-radius: var(--pc-radius) !important;
    box-shadow: var(--pc-shadow) !important;
    padding: 28px 26px !important;
    margin-bottom: 20px !important;
    color: var(--pc-text) !important;
}

/* These three containers NEST. Styling each as a padded card stacks four levels
   of padding, which on a 390px phone left the answer rows 268px wide inside a
   370px form -- 102px lost to gutters, and every long option wrapping to three
   lines. Only the innermost is a card; the outer two are layout wrappers.
   On the welcome page there are no question cards, so the form is the card --
   hence :has() rather than a blanket rule. */
.group-container, .group-outer-container, .space-col, .col-centered {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.survey-form-container:has(.question-container) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.answer-container { padding-left: 0 !important; padding-right: 0 !important; }

/* ----------------------------------------------------------- title/intro -- */

.survey-name, h1, h2, h3, .group-title, .ls-privacy-head {
    font-family: var(--pc-display) !important;
    font-weight: 800 !important;
    color: var(--pc-text) !important;
    line-height: 1.15 !important;
    text-wrap: balance;
}
.survey-name {
    font-size: clamp(24px, 5.5vw, 32px) !important;
    margin-bottom: 18px !important;
}
/* An accent rule under the title reads as deliberate branding; a lone emoji
   stranded on a wrapped line does not. */
.survey-name::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 999px;
    background: var(--pc-grad-primary);
}

.survey-description, .survey-welcome, .survey-welcome p, .survey-description p {
    color: var(--pc-text) !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
}
.survey-welcome strong, .survey-description strong { color: var(--pc-cyan) !important; }

.number-of-questions, .ls-privacy-body, .ls-privacy-body p, small, .text-muted {
    color: var(--pc-text-muted) !important;
    font-size: 14px !important;
}

/* ------------------------------------------------------------- questions -- */

.question-title-container, .questiontext, .question-text, .ls-label-question {
    font-family: var(--pc-display) !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: var(--pc-text) !important;
    line-height: 1.35 !important;
    margin-bottom: 14px !important;
}
.question-help-container, .questionhelp, .ls-questionhelp, .hint-item {
    color: var(--pc-text-muted) !important;
    font-size: 14px !important;
    font-style: normal !important;
}
/* Mandatory marker: orange is the app's attention colour, red is destructive. */
.asterisk, .asterisk sup, .asterisk .text-danger,
.ls-asterisk, .question-mandatory {
    color: var(--pc-orange) !important;   /* attention, not destructive */
}
.asterisk { margin-right: 6px !important; }

/* ---------------------------------------------------------------- answers -- */
/* LimeSurvey uses awesome-bootstrap-checkbox: the real <input> is
   position:absolute; opacity:0, and the control you SEE is the label's ::before
   pseudo-element. Styling the input therefore does nothing visible, and putting
   flex on the row pulls the absolutely-positioned control out of alignment.
   Anchor the pseudo-control to the <li> (position:relative) and give the label
   room for it. */

.answer-container, .ls-answers { background: transparent !important; }
.ls-answers ul, .answer-container ul {
    list-style: none !important; padding-left: 0 !important; margin: 0 !important;
}

.answer-item, .radio-item, .checkbox-item {
    display: block !important;
    position: relative !important;
    background: var(--pc-surface-2) !important;
    border: 1.5px solid var(--pc-border) !important;
    border-radius: var(--pc-radius-sm) !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    transition: border-color .15s ease, background .15s ease;
}
.answer-item:hover, .radio-item:hover, .checkbox-item:hover {
    border-color: var(--pc-border-strong) !important;
}

/* The whole row is the tap target (48px min), with room for the control. */
.answer-item label, .radio-item label, .checkbox-item label {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px 16px 12px 50px !important;
    cursor: pointer !important;
    color: var(--pc-text) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Keep the real input hidden but still focusable for keyboard users. */
.answer-item input[type="radio"], .answer-item input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 20px !important; height: 20px !important;
    top: 14px !important; left: 16px !important;
    margin: 0 !important;
}

/* The visible control, anchored to the row rather than the label. */
.answer-item label::before, .radio-item label::before, .checkbox-item label::before {
    content: "" !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    background: var(--pc-bg) !important;
    border: 2px solid var(--pc-border-strong) !important;
    transition: border-color .15s ease, background .15s ease;
}
.radio-item label::before  { border-radius: 50% !important; }
.checkbox-item label::before { border-radius: 6px !important; }

/* The mark inside it.
   The radio dot is painted INTO ::before with a radial-gradient rather than as a
   separate ::after: two absolutely-positioned pseudo-elements have to be kept in
   sync by hand, and any padding change slides one out of the other. One element
   cannot drift. */
.radio-item:has(input:checked) label::before {
    background: radial-gradient(circle at 50% 50%,
                var(--pc-green) 0 5px, var(--pc-bg) 5px) !important;
}

/* The checkbox tick stays a separate ::after, centred on the same 16px origin. */
.checkbox-item label::after {
    content: "" !important;
    position: absolute !important;
    left: 23px !important;
    top: 50% !important;
    width: 6px !important;
    height: 11px !important;
    margin-top: -7px !important;
    border: solid var(--pc-green) !important;
    border-width: 0 2.5px 2.5px 0 !important;
    background: none !important;
    transform: rotate(45deg) !important;
    opacity: 0;
    transition: opacity .12s ease;
}
.radio-item label::after { content: none !important; }
.checkbox-item:has(input:checked) label::after { opacity: 1 !important; }
.answer-item:has(input:checked) label::before { border-color: var(--pc-green) !important; }

.answer-item:has(input:checked) label::after { opacity: 1 !important; }
.answer-item:has(input:checked) label::before { border-color: var(--pc-green) !important; }

/* Selected row — the green the app uses for "attending". */
.answer-item:has(input:checked), .radio-item:has(input:checked), .checkbox-item:has(input:checked) {
    border-color: var(--pc-green) !important;
    background: rgba(0, 200, 83, 0.12) !important;
}

/* Keyboard focus must be visible even though the input itself is transparent. */
.answer-item:has(input:focus-visible) {
    outline: 3px solid var(--pc-cyan) !important;
    outline-offset: 2px !important;
}

/* "No answer" is LimeSurvey's default selection on every optional question (its
   class carries an upstream typo: no-anwser-item). Showing it as chosen tells the
   respondent they answered when they did not, so it stays neutral while checked. */
.no-anwser-item, .no-anwser-item:has(input:checked) {
    background: transparent !important;
    border-color: var(--pc-border) !important;
    border-style: dashed !important;
}
.no-anwser-item label { color: var(--pc-text-muted) !important; font-weight: 400 !important; }
.no-anwser-item:has(input:checked) > label::before { border-color: var(--pc-text-muted) !important; }
.no-anwser-item label::after { background: var(--pc-text-muted) !important; border-color: var(--pc-text-muted) !important; }

/* An "Other" row carries a text box beside its control. */
.answer-item input[type="text"] {
    margin: 0 16px 12px 50px !important;
    width: calc(100% - 66px) !important;
}

/* A capped checkbox question disables the rest once the limit is reached; it
   must look unavailable rather than merely unselected. */
.answer-item:has(input:disabled) { opacity: .45 !important; }
.answer-item:has(input:disabled) label { cursor: not-allowed !important; }


/* Checkbox rows and "Other" rows wrap input+label in a Bootstrap grid cell
   (.col-auto / .othertext-label-checkox-container). Those wrappers must stay
   position:static and unpadded, or the pseudo-control anchors to the wrapper
   instead of the row and lands outside the box. */
.answer-item .col-auto,
.answer-item .othertext-label-checkox-container {
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
}
/* The "Other" row also carries Bootstrap .row/.d-flex; keep it a plain block so
   the label's padding-left reserves the control gutter as on every other row. */
.answer-item.row, .answer-item.d-flex, .radio-text-item, .text-item {
    display: block !important;
    margin: 0 0 10px !important;
}
.answer-item.row > *, .answer-item.d-flex > * { max-width: 100% !important; }

/* Rows were rendering at 220px inside a ~330px card on a phone: Bootstrap grid
   cells size to content, so the row never claimed the width available and the
   text wrapped far harder than it needed to. */
.answer-container, .ls-answers, .ls-answers ul, .answer-container ul,
.answer-item, .radio-item, .checkbox-item, .subquestion-list {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.answer-container .row, .ls-answers .row { width: 100% !important; margin: 0 !important; }

/* LimeSurvey's base CSS sets hyphens:auto, which breaks "attend" as "at-tend"
   and "current" as "cur-rent" mid-question. Wrap on whole words instead. */
.answer-item label, .question-title-container, .questiontext, .question-text,
.survey-name, .survey-welcome, .survey-description, .group-title, td, th, p, li {
    hyphens: manual !important;
    -webkit-hyphens: manual !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/* ------------------------------------------------------------------ text -- */

input[type="text"], input[type="email"], input[type="number"], textarea, select {
    background: var(--pc-surface-2) !important;
    border: 1.5px solid var(--pc-border) !important;
    border-radius: var(--pc-radius-sm) !important;
    color: var(--pc-text) !important;
    font-family: var(--pc-sans) !important;
    font-size: 15px !important;
    padding: 12px 14px !important;
    min-height: 48px !important;
    width: 100% !important;
}
textarea { min-height: 120px !important; line-height: 1.6 !important; }
input::placeholder, textarea::placeholder { color: var(--pc-text-muted) !important; opacity: 1 !important; }
input:focus, textarea:focus, select:focus {
    border-color: var(--pc-green) !important;
    outline: 2px solid var(--pc-green) !important;
    outline-offset: 1px !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------- buttons -- */

.btn-primary, .ls-move-btn, .ls-move-next-btn, .ls-move-submit-btn, button[type="submit"] {
    background: var(--pc-grad-primary) !important;
    background-color: transparent !important;
    color: var(--pc-on-green) !important;
    border: none !important;
    border-radius: 999px !important;
    font-family: var(--pc-display) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    letter-spacing: .01em !important;
    padding: 14px 32px !important;
    min-height: 48px !important;
    box-shadow: 0 6px 18px -8px rgba(0, 200, 83, .8) !important;
    transition: filter .15s ease, transform .15s ease;
}
.btn-primary:hover, .ls-move-btn:hover, .ls-move-next-btn:hover, .ls-move-submit-btn:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-1px);
}
.btn-primary:active, .ls-move-btn:active { transform: scale(.985); }

/* Back / secondary actions stay quiet so the forward action reads first. */
.ls-move-previous-btn, .btn-outline-secondary, .btn-secondary {
    background: transparent !important;
    color: var(--pc-text-muted) !important;
    border: 1.5px solid var(--pc-border-strong) !important;
    border-radius: 999px !important;
    font-family: var(--pc-display) !important;
    font-weight: 700 !important;
    min-height: 48px !important;
    padding: 12px 24px !important;
}
.ls-move-previous-btn:hover, .btn-outline-secondary:hover {
    background: var(--pc-surface-2) !important;
    color: var(--pc-text) !important;
}

.navigator, .navigator-container {
    background: transparent !important;
    border: none !important;
    margin-top: 24px !important;
}

/* Visible focus on every interactive element (WCAG AA). */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, label:focus-visible {
    outline: 3px solid var(--pc-cyan) !important;
    outline-offset: 2px !important;
}

/* ------------------------------------------------------------- messaging -- */

.alert, .ls-alert {
    background: var(--pc-surface-2) !important;
    border: 1px solid var(--pc-border) !important;
    border-radius: var(--pc-radius-sm) !important;
    color: var(--pc-text) !important;
}
.alert-danger, .ls-alert-danger, .error, .text-danger {
    border-color: var(--pc-red) !important;
    color: var(--pc-red) !important;
}
.alert-success, .text-success { border-color: var(--pc-green) !important; color: var(--pc-green) !important; }
a { color: var(--pc-cyan) !important; }
a:hover { color: var(--pc-green) !important; }

/* ------------------------------------------------------- LimeSurvey chrome -- */

footer, .footer, [class*="poweredby"], img[src*="poweredby"],
a[href*="limesurvey.org"], .ls-ba .navbar-nav .nav-item:has(a[href*="limesurvey"]) {
    display: none !important;
}

/* ----------------------------------------------------------------- mobile -- */

@media (max-width: 640px) {
    .survey-form-container, .question-container, .group-container {
        padding: 20px 16px !important;
        border-radius: var(--pc-radius-sm) !important;
    }
    .survey-name { font-size: 22px !important; }
    /* Narrower control gutter and tighter side padding buys ~20px of text width
       per row, which is the difference between two lines and three. */
    .answer-item label, .radio-item label, .checkbox-item label {
        padding: 12px 12px 12px 44px !important;
        font-size: 14.5px !important;
    }
    .answer-item label::before, .radio-item label::before, .checkbox-item label::before { left: 13px !important; }
    .checkbox-item label::after { left: 20px !important; }
    .answer-item input[type="radio"], .answer-item input[type="checkbox"] { left: 13px !important; }
    .answer-item input[type="text"] { margin-left: 44px !important; width: calc(100% - 56px) !important; }
    .question-title-container, .questiontext { font-size: 17px !important; }
    .btn-primary, .ls-move-btn { width: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
