/* CCLC Spelling Bee — registration form
 * Scoped to .cclc-sb-form so it composes cleanly with the parent theme.
 */

.cclc-sb-form {
    max-width: 720px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.55;
    color: #2d3748;
    --sb-yellow: #f5c518;
    --sb-yellow-dark: #d9ac0a;
    --sb-ink: #1f2937;
    --sb-muted: #6b7280;
    --sb-border: #e5e7eb;
    --sb-soft-bg: #f9fafb;
    --sb-accent-soft: #fff8dc;
}

/* Header / intro / details ------------------------------------------------ */
.cclc-sb-heading {
    font-size: 2.1rem;
    line-height: 1.1;
    margin: 0 0 .35em;
    color: var(--sb-ink);
}
.cclc-sb-intro,
.cclc-sb-payment-note {
    margin: 0 0 1.25em;
    color: var(--sb-ink);
}
.cclc-sb-flyer {
    margin: .25em 0 1.25em;
}
.cclc-sb-flyer a {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    padding: .5em .9em;
    border-radius: 999px;
    background: var(--sb-accent-soft);
    color: var(--sb-ink);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--sb-yellow);
}
.cclc-sb-flyer a::before {
    content: "📄";
}
.cclc-sb-flyer a:hover {
    background: var(--sb-yellow);
}
.cclc-sb-event-details {
    margin: 0 0 1.25em;
    padding: 1.1em 1.25em;
    background: var(--sb-soft-bg);
    border-left: 4px solid var(--sb-yellow);
    border-radius: 4px 10px 10px 4px;
}
.cclc-sb-event-details p { margin: .15em 0; }

.cclc-sb-divider {
    border: none;
    border-top: 2px solid var(--sb-yellow);
    margin: 1.75em 0 1.5em;
}

/* Form + fieldsets -------------------------------------------------------- */
.cclc-sb-form__form {
    display: grid;
    gap: 1.1em;
}
.cclc-sb-form__form fieldset {
    border: 1px solid var(--sb-border);
    border-radius: 12px;
    padding: 1.15em 1.35em 1.25em;
    margin: 0;
    background: #fff;
}
.cclc-sb-form__form legend {
    padding: 0 .55em;
    font-weight: 700;
    color: var(--sb-ink);
    font-size: .95rem;
    letter-spacing: .01em;
    text-transform: uppercase;
}

/* Registration-type: pill-style choices ---------------------------------- */
.cclc-sb-type {
    background: #fffdf2;
    border-color: var(--sb-yellow) !important;
}
.cclc-sb-type > label {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    margin: .25em 1.5em .25em 0;
    padding: .55em .9em;
    border: 1px solid var(--sb-border);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    background: #fff;
    transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.cclc-sb-type > label:hover { border-color: var(--sb-yellow); }
.cclc-sb-type > label:has(input:checked) {
    background: var(--sb-yellow);
    border-color: var(--sb-yellow-dark);
    color: var(--sb-ink);
    font-weight: 700;
}
.cclc-sb-type input[type="radio"] { accent-color: var(--sb-yellow-dark); }

/* Team-name standalone input --------------------------------------------- */
.cclc-sb-team-name {
    margin: 0;
}
.cclc-sb-team-name > label {
    display: block;
    font-weight: 600;
    margin-bottom: .4em;
}
.cclc-sb-team-name input {
    display: block;
    width: 100%;
    padding: .65em .85em;
    border: 1px solid var(--sb-border);
    border-radius: 10px;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}

/* Inputs + rows ----------------------------------------------------------- */
.cclc-sb-person { background: #fff; }
.cclc-sb-person > label,
.cclc-sb-row > label {
    display: block;
    margin: 0 0 .9em;
    font-weight: 600;
    color: var(--sb-ink);
}
.cclc-sb-form__form input[type="text"],
.cclc-sb-form__form input[type="email"],
.cclc-sb-form__form input[type="tel"] {
    display: block;
    width: 100%;
    margin-top: .3em;
    padding: .65em .85em;
    border: 1px solid var(--sb-border);
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1.4;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cclc-sb-form__form input:focus {
    outline: none;
    border-color: var(--sb-yellow);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, .25);
}
.cclc-sb-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    margin-bottom: .9em;
}
@media (max-width: 560px) {
    .cclc-sb-row { grid-template-columns: 1fr; }
    .cclc-sb-heading { font-size: 1.7rem; }
}

/* Category radios inside a nested fieldset ------------------------------- */
.cclc-sb-category {
    margin-top: .5em;
    padding: .85em 1em;
    background: var(--sb-soft-bg);
    border-radius: 10px;
    border: 1px dashed var(--sb-border);
}
.cclc-sb-category legend {
    text-transform: none;
    font-size: .88rem;
    color: var(--sb-muted);
    letter-spacing: 0;
}
.cclc-sb-category > label {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    margin-right: 1.1em;
    font-weight: 500;
    cursor: pointer;
}
.cclc-sb-category input[type="radio"] { accent-color: var(--sb-yellow-dark); }

/* Honeypot --------------------------------------------------------------- */
.cclc-sb-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* Payment / QR card ------------------------------------------------------ */
.cclc-sb-pay {
    padding: 1.25em 1.5em 1.75em;
    background: linear-gradient(180deg, #fffdf2 0%, #fff 100%);
    border: 1px solid var(--sb-yellow);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(245, 197, 24, .12);
    margin: 1em 0 1.5em;
}
.cclc-sb-pay .cclc-sb-payment-note {
    margin: 0 0 1em;
    text-align: center;
    color: var(--sb-ink);
}
.cclc-sb-pay .cclc-sb-payment-note :first-child { margin-top: 0; }
.cclc-sb-pay .cclc-sb-payment-note :last-child  { margin-bottom: 0; }

.cclc-sb-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.cclc-sb-qr img {
    width: 220px;
    height: auto;
    max-width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--sb-border);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.cclc-sb-qr p {
    margin: .85em 0 0;
    font-size: .9rem;
    word-break: break-all;
    text-align: center;
    max-width: 100%;
}
.cclc-sb-qr p a {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Submit ------------------------------------------------------------------ */
.cclc-sb-actions {
    display: flex;
    justify-content: center;
    margin-top: .25em;
}
.cclc-sb-submit {
    display: inline-block;
    min-width: 220px;
    padding: 1em 2.25em;
    border: none;
    border-radius: 999px;
    background: var(--sb-yellow);
    color: var(--sb-ink);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 197, 24, .35);
    transition: transform .1s ease, filter .1s ease, box-shadow .15s ease;
}
.cclc-sb-submit:hover {
    filter: brightness(.97);
    box-shadow: 0 6px 16px rgba(245, 197, 24, .4);
}
.cclc-sb-submit:active { transform: translateY(1px); }
.cclc-sb-submit[disabled] { opacity: .6; cursor: not-allowed; box-shadow: none; }

/* Errors + success + closed state ---------------------------------------- */
.cclc-sb-errors {
    background: #fdecea;
    color: #8a1b07;
    border-left: 4px solid #c02b0a;
    padding: .85em 1.1em;
    margin: 0;
    border-radius: 8px;
}
.cclc-sb-field-error {
    color: #c02b0a;
    font-size: .88rem;
    display: block;
    margin-top: .3em;
    font-weight: 500;
}
.cclc-sb-closed {
    background: var(--sb-soft-bg);
    border-left: 4px solid var(--sb-yellow);
    padding: 1.2em 1.4em;
    border-radius: 4px 10px 10px 4px;
}
.cclc-sb-success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-left: 4px solid #059669;
    padding: 1.25em 1.4em;
    border-radius: 4px 12px 12px 4px;
    font-size: 1.05rem;
    color: #065f46;
}
