/* Destination Cheekwood registration form.
   Matched to the Cheekwood theme's form styling (scss/elements/_form.scss,
   _button.scss, base/_variables.scss). The theme can't style us directly — its
   rules target .gform_wrapper / .wpcf7-form, not .dcw-form — so we replicate the
   relevant tokens: green 1px square-cornered inputs, Filson/Caledonia type (both
   inherited from the theme's @font-face), and the uppercase green primary button.

   NOTE: the theme sets html{font-size:62.5%} (1rem = 10px). To stay correct here
   AND on any other root size, this file uses em (relative to the inherited text)
   and px, never rem. */

.dcw-form,
.dcw-form *,
.dcw-form *::before,
.dcw-form *::after { box-sizing: border-box; }

/* Conditional fields toggle via [hidden]; keep it authoritative over label{display:block}. */
.dcw-form [hidden] { display: none !important; }

/* Centered block within its Bakery column (place the shortcode in a full-width row). */
.dcw-form,
.dcw-thanks,
.dcw-full { max-width: 640px; margin-left: auto; margin-right: auto; }
/* Event name heading (rendered by the shortcode; inherits the theme's h2/Caledonia). */
.dcw-event-title { margin-top: 0; }
.dcw-intro { margin: 0 0 1.5em; }

/* Sections: Caledonia heading with a brand-green rule (echoes the site's headings). */
.dcw-form > fieldset { border: 0; padding: 0; margin: 0 0 2em; min-width: 0; }
.dcw-form > fieldset > legend {
    display: block;
    width: 100%;
    padding: 0 0 .3em;
    margin: 0 0 1em;
    border-bottom: 2px solid #286140;
    font-family: "Caledonia", serif;
    font-size: 1.3em;
    font-weight: bold;
    color: #286140;
}

/* Fields — mirrors the theme's input mixin: #fff, 1px green border, square, 12/10/9 pad. */
.dcw-form label { display: block; margin: 0 0 1em; font-weight: 500; }
.dcw-form input[type="text"],
.dcw-form input[type="email"],
.dcw-form input[type="tel"],
.dcw-form input[type="number"],
.dcw-form textarea {
    display: block;
    width: 100%;
    margin-top: .3em;
    padding: 12px 10px 9px;
    font: inherit;
    line-height: 1.2;
    color: #000;
    background: #fff;
    border: 1px solid #286140;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}
.dcw-form textarea { resize: vertical; }
/* Theme has no visible focus style; add an accessible one without changing the look. */
.dcw-form input:focus,
.dcw-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 97, 64, .35);
}

/* Read-only live total reads as a result, not an editable field. */
.dcw-form input[name="dcw_total"] { max-width: 8em; background: #f3f5f1; font-weight: bold; }

/* Choice groups: inline radios under a light sub-label. */
.dcw-form fieldset.dcw-radio { border: 0; padding: 0; margin: 0 0 1em; min-width: 0; }
.dcw-form fieldset.dcw-radio legend { padding: 0; margin: 0 0 .35em; font-weight: 600; }
.dcw-form fieldset.dcw-radio label {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    margin: 0 1.25em .35em 0;
    font-weight: 400;
}
.dcw-form fieldset.dcw-radio input { width: auto; margin: 0; accent-color: #286140; }

/* Second-member block: indented to show it belongs to the Yes choice. */
.dcw-form [data-show-second] { margin: .4em 0 0; padding-left: 1em; border-left: 2px solid #D7D2CB; }

.dcw-help { opacity: .75; font-size: .85em; margin: -.5em 0 1em; }
.dcw-maxwarn { color: #d94a40; opacity: 1; font-weight: bold; }

/* Submit: the theme's primary button (green, uppercase, square-ish). */
.dcw-form button[type="submit"] {
    display: inline-block;
    margin-top: 1em;
    padding: 14px 32px;
    font: inherit;
    font-size: .85em;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    background: #286140;
    border: 1px solid #286140;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color .25s ease;
}
.dcw-form button[type="submit"]:hover { background: #215738; border-color: #215738; }
.dcw-form button[type="submit"]:focus-visible { outline: 3px solid rgba(40, 97, 64, .4); outline-offset: 2px; }
.dcw-form button[disabled] { opacity: .5; cursor: not-allowed; }
.dcw-form button[disabled]:hover { background: #286140; border-color: #286140; }

/* Result + error states. */
.dcw-notice { padding: .75em 1em; }
.dcw-error { background: #fbeaea; border: 1px solid #d94a40; color: #a3281f; }
.dcw-full { background: #fff6e2; border: 1px solid #e0ad45; color: #7a5a12; }
.dcw-thanks {
    padding: 1.25em 1.5em;
    background: #eef5ef;
    border: 1px solid #6ECEB2;
    border-left: 4px solid #286140;
}
.dcw-thanks h3 { margin-top: 0; font-family: "Caledonia", serif; color: #286140; }

/* Honeypot off-screen for humans. */
.dcw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
    .dcw-form button[type="submit"] { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .dcw-form button[type="submit"] { transition: none; }
}
