/* ============================================================
   Modern Gravity Forms Styler
   --------------------------------------------------------------
   Override colours per site under Settings → Modern GF, or
   directly in Customise → Additional CSS:

       .modern-gf {
           --mgf-accent: #1e88e5;
           --mgf-accent-dark: #1565c0;
       }
   ============================================================ */

/* Variables on :root so the datepicker popup (rendered outside .modern-gf
   as #ui-datepicker-div appended to <body>) can also pick them up. */
:root {
    --mgf-accent: #cfb14e;
    --mgf-accent-dark: #b89636;
    --mgf-ink: #2a2a2a;
    --mgf-line: #e5ddd2;
    --mgf-cream: #faf6f0;
    --mgf-white: #ffffff;
    --mgf-radius: 12px;
    --mgf-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.18);
}

/* ---------- Card wrapper ---------- */
.modern-gf .gform_wrapper {
    max-width: 780px;
    margin: 2.5rem auto;
    padding: 2.5rem 2.25rem;
    background: var(--mgf-card-bg, var(--mgf-white));
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--mgf-accent);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 8px 24px -6px rgba(0, 0, 0, 0.08),
        0 24px 56px -12px rgba(0, 0, 0, 0.12);
    font-family: inherit;
    color: var(--mgf-ink);
    counter-reset: mgf-section;
    /* Anchor the form to a fixed 16px base so children sized in `em` render
       at the intended pixel size regardless of the host theme. Many
       restaurant themes set `html { font-size: 13-14px }`, which would
       otherwise shrink every `rem`-sized label and input below readable
       sizes. Pairing this anchor with `em` units (see below) keeps the
       form's internal typography stable across themes. */
    font-size: 16px;
    line-height: 1.5;
}

/* ---------- Title ---------- */
.modern-gf .gform_title {
    font-size: 1.75em;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0 0 0.6rem;
    color: var(--mgf-ink);
    text-align: center;
}
.modern-gf .gform_title::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--mgf-accent);
    margin: 0.9rem auto 0;
    border-radius: 2px;
}
.modern-gf .gform_description,
.modern-gf .gform_required_legend {
    text-align: center;
    font-size: 0.78em;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
    margin: 0 0 1.5rem;
}

/* ---------- Section headings ---------- */
.modern-gf .gsection {
    counter-increment: mgf-section;
    border: none !important;
    padding: 1.2rem 0 0 !important;
    margin: 1.1rem 0 0.1rem !important;
}
.modern-gf h1.gsection_title,
.modern-gf h2.gsection_title,
.modern-gf h3.gsection_title,
.modern-gf h4.gsection_title,
.modern-gf .gsection .gsection_title {
    font-size: 0.92em !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--mgf-heading, var(--mgf-accent-dark)) !important;
    line-height: 1.4 !important;
    margin: 0 0 0.25rem !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.7em !important;
}
/* Numbered prefix (01., 02., …) before each section heading. Subtle
   editorial touch — only renders when the form has section breaks. */
.modern-gf h1.gsection_title::before,
.modern-gf h2.gsection_title::before,
.modern-gf h3.gsection_title::before,
.modern-gf h4.gsection_title::before,
.modern-gf .gsection .gsection_title::before {
    content: counter(mgf-section, decimal-leading-zero);
    color: var(--mgf-accent);
    font-weight: 800;
    font-feature-settings: "tnum";
    letter-spacing: 0;
    opacity: 0.7;
}

/* ---------- Field grid ----------
   Gravity Forms emits `gfield--width-half`, `gfield--width-third`, etc.
   on each field based on the field's width setting in the form editor.
   GF's default stylesheet would normally provide a 12-column grid to make
   these work — but we suppress that stylesheet, so the grid has to be
   redefined here. Without this, half-width fields render full-width
   because their class does nothing. */
.modern-gf .gform_fields {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.95rem 1.1rem;
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.modern-gf .gform_fields > .gfield {
    grid-column: span 12;
    min-width: 0; /* allow inputs to shrink within the grid cell */
}
.modern-gf .gfield--width-half          { grid-column: span 6 !important; }
.modern-gf .gfield--width-third         { grid-column: span 4 !important; }
.modern-gf .gfield--width-two-thirds    { grid-column: span 8 !important; }
.modern-gf .gfield--width-quarter       { grid-column: span 3 !important; }
.modern-gf .gfield--width-three-quarter { grid-column: span 9 !important; }
.modern-gf .gfield--width-full          { grid-column: span 12 !important; }
/* Section breaks and validation summaries always span the full row. */
.modern-gf .gfield--type-section,
.modern-gf .gform_validation_errors {
    grid-column: 1 / -1 !important;
}
.modern-gf .gfield { padding: 0 !important; }

/* The advanced Name (and other multi-input) field is wrapped in a <fieldset>,
   which carries a default browser border + padding — this is the stray grey
   box around First/Last. Strip it so the field matches the plain inputs. */
.modern-gf fieldset.gfield,
.modern-gf .gfield--type-name,
.modern-gf .gfield--type-address,
.modern-gf .gfield fieldset {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0;
}

/* ---------- Advanced "Name" field (First / Last complex) ----------
   GF's advanced Name field wraps its sub-inputs in .ginput_complex with its
   own markup, which our grid doesn't reach. Because we also suppress GF's
   default CSS, the sub-fields stack and a stray container box can show. Lay
   them out side by side (stacking on mobile) and strip any container
   background/border so the field matches the plain text inputs. */
.modern-gf .ginput_complex,
.modern-gf .ginput_container--name {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.95rem 1.1rem;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}
.modern-gf .ginput_complex > span {
    flex: 1 1 calc(50% - 0.6rem);
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}
/* Sub-labels (First / Last) — small and muted, like a field hint. */
.modern-gf .ginput_complex label {
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.45);
    margin: 0.3rem 0 0;
    display: block;
}
@media (max-width: 640px) {
    .modern-gf .ginput_complex > span { flex-basis: 100%; }
}

/* Defensive: themes (Astra, Spectra, etc.) sometimes apply list-style
   bullets to UL/LI inside content areas, which makes Gravity Forms field
   rows render with stray • dots before each label. Kill bullets from
   every possible angle (list-style, pseudo-elements, background image)
   so the form is bullet-free regardless of what the theme does. */
.modern-gf .gform_fields > li,
.modern-gf .gform_fields > .gfield {
    list-style: none !important;
    background-image: none !important;
}
.modern-gf .gform_fields > li::before,
.modern-gf .gform_fields > .gfield::before,
.modern-gf .gform_fields > li::marker,
.modern-gf .gform_fields > .gfield::marker {
    content: none !important;
    display: none !important;
}

/* ---------- Anti-spam honeypot (kept in DOM, invisible to humans) ----------
   GF's built-in anti-spam Honeypot relies on a "decoy" field that bots fill
   in but humans don't see. Default GF CSS positions this off-screen — but
   we suppress GF's default CSS, so we have to recreate the hiding rule
   ourselves. Position absolute / -9000px is the standard pattern; we
   intentionally do NOT use display:none because some bots skip fields that
   are display:none (which would defeat the honeypot). */
.modern-gf .gform_validation_container,
.modern-gf .gfield--type-honeypot,
.modern-gf .gform_fields .gfield--type-honeypot {
    position: absolute !important;
    left: -9000px !important;
    top: -9000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ---------- Labels ---------- */
.modern-gf .gfield_label {
    font-size: 0.82em;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--mgf-ink);
    margin-bottom: 0.35rem;
    display: block;
}
.modern-gf .gfield_required {
    color: var(--mgf-accent-dark);
    margin-left: 0.25rem;
    font-weight: 500;
    opacity: 0.7;
}
.modern-gf .gfield_required_asterisk {
    font-style: normal;
}

/* ---------- Inputs ---------- */
.modern-gf input[type="text"],
.modern-gf input[type="email"],
.modern-gf input[type="tel"],
.modern-gf input[type="number"],
.modern-gf input[type="date"],
.modern-gf input[type="time"],
.modern-gf input[type="url"],
.modern-gf input[type="password"],
.modern-gf select,
.modern-gf textarea {
    width: 100%;
    padding: 0.7rem 0.95rem;
    font-size: 0.95em;
    font-family: inherit;
    color: var(--mgf-ink);
    background: var(--mgf-cream);
    border: 1.5px solid transparent;
    border-radius: var(--mgf-radius);
    box-shadow: none;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    appearance: none;
    -webkit-appearance: none;
}
.modern-gf textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.55;
}
.modern-gf input::placeholder,
.modern-gf textarea::placeholder { color: #a7a097; }

.modern-gf input:focus,
.modern-gf select:focus,
.modern-gf textarea:focus {
    outline: none;
    background: var(--mgf-white);
    border-color: var(--mgf-accent);
    box-shadow: none;
}

/* ---------- Custom select chevron (URL-encoded SVG) ---------- */
.modern-gf select,
.modern-gf select.gfield_select,
.modern-gf select.large {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%233a3a3a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    padding-right: 2.75rem;
    cursor: pointer;
    /* Force a readable colour even when the host theme tries to dim form
       controls or when the browser inherits a faded colour from the
       gf_placeholder option. We use BOTH `color` AND
       `-webkit-text-fill-color` because Chrome/Safari render <select>
       text through the WebKit text-fill pipeline, which ignores `color`
       if anything else (e.g. theme reset or GF default) sets a
       `-webkit-text-fill-color` first. `opacity: 1` defeats theme
       opacity overrides. */
    color: var(--mgf-ink) !important;
    -webkit-text-fill-color: var(--mgf-ink) !important;
    opacity: 1 !important;
    font-weight: 500;
}
.modern-gf select option,
.modern-gf select option.gf_placeholder {
    color: var(--mgf-ink) !important;
    -webkit-text-fill-color: var(--mgf-ink) !important;
    opacity: 1 !important;
    background: var(--mgf-white) !important;
    font-weight: 400;
}

/* ---------- Date / time pickers ---------- */
.modern-gf input[type="date"],
.modern-gf input[type="time"] { cursor: pointer; }
.modern-gf input[type="date"]::-webkit-calendar-picker-indicator,
.modern-gf input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
}

/* ---------- Validation ---------- */
.modern-gf .gfield_error input,
.modern-gf .gfield_error select,
.modern-gf .gfield_error textarea {
    border-color: #d64545 !important;
    background: #fff5f5 !important;
}
.modern-gf .gfield_validation_message,
.modern-gf .validation_message {
    font-size: 0.82em;
    color: #c0392b;
    margin-top: 0.4rem;
    background: transparent;
    border: none;
    padding: 0;
}
.modern-gf .gform_validation_errors {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-radius: var(--mgf-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* ---------- Submit button ---------- */
.modern-gf .gform_footer {
    padding: 1.5rem 0 0 !important;
    margin: 1rem 0 0 !important;
    border-top: 1px solid var(--mgf-line);
    text-align: center;
}
.modern-gf .gform_button {
    display: inline-block;
    min-width: 220px;
    padding: 0.95rem 2.5rem;
    font-size: 0.95em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mgf-button-text, #fff) !important;
    background: var(--mgf-button-bg, var(--mgf-accent)) !important;
    border: none !important;
    border-radius: var(--mgf-radius);
    cursor: pointer;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.25);
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.modern-gf .gform_button:hover,
.modern-gf .gform_button:focus {
    /* Falls back to accent-dark when no custom button colour is set; when one
       IS set, brightness() darkens that custom colour on hover instead. */
    background: var(--mgf-button-bg, var(--mgf-accent-dark)) !important;
    filter: brightness(0.94);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.3);
}
.modern-gf .gform_button:active { transform: translateY(0); }

/* ---------- Button style variants ----------
   The `Button style` setting in Settings → GF Design adds a modifier class
   to the form wrapper (modern-gf--button-outlined, modern-gf--button-pill-filled,
   or modern-gf--button-pill-outlined). Filled is the default and needs no
   override. Variants below match the most common restaurant-site button
   patterns we see in the wild (outlined hero CTAs, pill CTAs, etc.) so the
   form's SEND button blends with the rest of the site.
   ============================================================ */

/* Outlined: transparent fill, accent (or custom button) border + text,
   inverts to filled on hover. Respects the dedicated button colour when set. */
.modern-gf--button-outlined .gform_button,
.modern-gf--button-pill-outlined .gform_button {
    background: transparent !important;
    color: var(--mgf-button-bg, var(--mgf-accent)) !important;
    border: 2px solid var(--mgf-button-bg, var(--mgf-accent)) !important;
    box-shadow: none !important;
}
.modern-gf--button-outlined .gform_button:hover,
.modern-gf--button-outlined .gform_button:focus,
.modern-gf--button-pill-outlined .gform_button:hover,
.modern-gf--button-pill-outlined .gform_button:focus {
    background: var(--mgf-button-bg, var(--mgf-accent)) !important;
    color: var(--mgf-button-text, #fff) !important;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.25) !important;
}

/* Pill variants: fully rounded ends. */
.modern-gf--button-pill-filled .gform_button,
.modern-gf--button-pill-outlined .gform_button {
    border-radius: 999px !important;
}

/* ============================================================
   Design presets
   --------------------------------------------------------------
   The `Design preset` setting in Settings → GF Design adds a
   modifier class to the wrapper: modern-gf--design-minimal,
   --design-bold, or --design-elegant. "Card" is the default look
   (the base rules above) and adds no class. Each preset below only
   overrides what it needs to; brand colours, radius, button shape
   and button colour all still apply on top.
   ============================================================ */

/* ---------- 2. Minimal / Flat ---------- */
.modern-gf--design-minimal .gform_wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 1rem 0.25rem;
    max-width: 640px;
}
.modern-gf--design-minimal .gform_title { text-align: left; }
.modern-gf--design-minimal .gform_title::after { display: none; }
.modern-gf--design-minimal .gform_description,
.modern-gf--design-minimal .gform_required_legend { text-align: left; }
.modern-gf--design-minimal .gfield_label {
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7f70;
}
.modern-gf--design-minimal input[type="text"],
.modern-gf--design-minimal input[type="email"],
.modern-gf--design-minimal input[type="tel"],
.modern-gf--design-minimal input[type="number"],
.modern-gf--design-minimal input[type="date"],
.modern-gf--design-minimal input[type="time"],
.modern-gf--design-minimal input[type="url"],
.modern-gf--design-minimal input[type="password"],
.modern-gf--design-minimal select,
.modern-gf--design-minimal textarea {
    background: transparent;
    border: none;
    border-bottom: 1.5px solid #cbc2b3;
    border-radius: 0;
    padding: 0.55rem 0.1rem;
}
.modern-gf--design-minimal input:focus,
.modern-gf--design-minimal select:focus,
.modern-gf--design-minimal textarea:focus {
    background: transparent;
    border-bottom-color: var(--mgf-accent);
}
.modern-gf--design-minimal .gform_footer {
    border-top: none;
    text-align: left;
    padding-top: 0.5rem !important;
}

/* ---------- 3. Bold / High-contrast ---------- */
.modern-gf--design-bold .gform_wrapper {
    background: var(--mgf-card-bg, #1d1b16);
    border: 1px solid #38332a;
    border-top: 4px solid var(--mgf-accent);
    border-radius: 14px;
    color: #f4efe4;
}
.modern-gf--design-bold .gform_title { color: #fff; }
.modern-gf--design-bold .gform_description,
.modern-gf--design-bold .gform_required_legend { color: #b8ac96; }
.modern-gf--design-bold .gfield_label {
    color: var(--mgf-accent);
    text-transform: uppercase;
    font-size: 0.74em;
    letter-spacing: 0.08em;
}
.modern-gf--design-bold .gfield_required { color: #fff; opacity: 0.5; }
.modern-gf--design-bold input[type="text"],
.modern-gf--design-bold input[type="email"],
.modern-gf--design-bold input[type="tel"],
.modern-gf--design-bold input[type="number"],
.modern-gf--design-bold input[type="date"],
.modern-gf--design-bold input[type="time"],
.modern-gf--design-bold input[type="url"],
.modern-gf--design-bold input[type="password"],
.modern-gf--design-bold select,
.modern-gf--design-bold textarea {
    background: #2a2720;
    border: 1.5px solid #443e32;
    color: #fff;
}
.modern-gf--design-bold input::placeholder,
.modern-gf--design-bold textarea::placeholder { color: #8a8170; }
.modern-gf--design-bold input:focus,
.modern-gf--design-bold select:focus,
.modern-gf--design-bold textarea:focus {
    background: #2f2b22;
    border-color: var(--mgf-accent);
}
/* Light select text + chevron on the dark fill */
.modern-gf--design-bold select,
.modern-gf--design-bold select.gfield_select,
.modern-gf--design-bold select.large {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23f4efe4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}
.modern-gf--design-bold select option {
    background: #2a2720 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.modern-gf--design-bold .gform_footer { border-top-color: #38332a; }

/* ---------- 4. Elegant / Editorial ---------- */
.modern-gf--design-elegant .gform_wrapper {
    background: var(--mgf-card-bg, #fffdf9);
    border: 1px solid #e7decd;
    border-top: 1px solid #e7decd;
    border-radius: 4px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 10px 30px -14px rgba(0, 0, 0, 0.10);
}
.modern-gf--design-elegant .gform_title {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #26221a;
}
.modern-gf--design-elegant .gform_title::after { width: 56px; opacity: 0.7; }
.modern-gf--design-elegant .gform_description,
.modern-gf--design-elegant .gform_required_legend {
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.7em;
    color: #a99873;
}
.modern-gf--design-elegant .gfield_label {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    color: #4a4334;
}
.modern-gf--design-elegant input[type="text"],
.modern-gf--design-elegant input[type="email"],
.modern-gf--design-elegant input[type="tel"],
.modern-gf--design-elegant input[type="number"],
.modern-gf--design-elegant input[type="date"],
.modern-gf--design-elegant input[type="time"],
.modern-gf--design-elegant input[type="url"],
.modern-gf--design-elegant input[type="password"],
.modern-gf--design-elegant select,
.modern-gf--design-elegant textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid #d8cdb6;
    border-radius: 0;
    padding: 0.6rem 0.2rem;
}
.modern-gf--design-elegant input:focus,
.modern-gf--design-elegant select:focus,
.modern-gf--design-elegant textarea:focus {
    background: transparent;
    border-bottom-color: var(--mgf-accent-dark);
}
.modern-gf--design-elegant h1.gsection_title,
.modern-gf--design-elegant h2.gsection_title,
.modern-gf--design-elegant h3.gsection_title,
.modern-gf--design-elegant h4.gsection_title,
.modern-gf--design-elegant .gsection .gsection_title {
    font-family: Georgia, "Times New Roman", serif !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
}
.modern-gf--design-elegant .gform_footer { text-align: center; }
.modern-gf--design-elegant .gform_button {
    font-family: Georgia, "Times New Roman", serif;
    border-radius: 2px;
    letter-spacing: 0.18em;
}

/* ---------- 5. Soft / Warm cream ---------- */
.modern-gf--design-soft .gform_wrapper {
    background: var(--mgf-card-bg, #f6efd9);
    border: 1px solid #e8dfc6;
    border-top: 1px solid #e8dfc6;
    border-radius: 10px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 10px 30px -16px rgba(0, 0, 0, 0.10);
}
.modern-gf--design-soft .gform_title { text-align: left; }
.modern-gf--design-soft .gform_title::after { display: none; }
.modern-gf--design-soft .gform_description,
.modern-gf--design-soft .gform_required_legend { text-align: left; }
.modern-gf--design-soft .gfield_label {
    text-transform: none;
    font-weight: 600;
    letter-spacing: normal;
    color: #3a352a;
}
.modern-gf--design-soft input[type="text"],
.modern-gf--design-soft input[type="email"],
.modern-gf--design-soft input[type="tel"],
.modern-gf--design-soft input[type="number"],
.modern-gf--design-soft input[type="date"],
.modern-gf--design-soft input[type="time"],
.modern-gf--design-soft input[type="url"],
.modern-gf--design-soft input[type="password"],
.modern-gf--design-soft select,
.modern-gf--design-soft textarea {
    background: #fffdf7;
    border: 1px solid #d8cfbc;
    border-radius: 6px;
}
.modern-gf--design-soft input:focus,
.modern-gf--design-soft select:focus,
.modern-gf--design-soft textarea:focus {
    background: #ffffff;
    border-color: var(--mgf-accent);
}
.modern-gf--design-soft .gform_footer {
    border-top: none;
    text-align: left;
    padding-top: 0.5rem !important;
}

/* ---------- No-shadow modifier ----------
   Added to the wrapper when "Card shadow" is unticked in Settings → GF Design.
   Flattens the card on every preset that uses a shadow. */
.modern-gf--no-shadow .gform_wrapper,
.modern-gf--no-shadow .gform_confirmation_message {
    box-shadow: none !important;
}

/* ---------- Confirmation message ---------- */
.modern-gf .gform_confirmation_message {
    max-width: 780px;
    margin: 2.5rem auto;
    padding: 2.5rem 2.25rem;
    background: var(--mgf-white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--mgf-accent);
    border-radius: 18px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 8px 24px -6px rgba(0, 0, 0, 0.08);
    color: var(--mgf-ink);
    font-size: 1em;
    line-height: 1.65;
    text-align: center;
    position: relative;
}
.modern-gf .gform_confirmation_message::before {
    content: "";
    display: block;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background-color: var(--mgf-accent);
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M7 14.5l4.5 4.5L21 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 4px 14px -4px var(--mgf-accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .modern-gf .gform_wrapper {
        padding: 2rem 1.25rem;
        margin: 1rem;
        border-radius: 16px;
    }
    .modern-gf .gform_title { font-size: 1.6em; }
    .modern-gf .gform_button { width: 100%; min-width: 0; }
    /* On mobile, force every field back to full-row so half-widths
       stack instead of squeezing into a too-narrow 50%. */
    .modern-gf .gform_fields > .gfield,
    .modern-gf .gfield--width-half,
    .modern-gf .gfield--width-third,
    .modern-gf .gfield--width-two-thirds,
    .modern-gf .gfield--width-quarter,
    .modern-gf .gfield--width-three-quarter {
        grid-column: 1 / -1 !important;
    }
}

/* ============================================================
   jQuery UI Datepicker popup — refined
   --------------------------------------------------------------
   The picker is appended to <body> as #ui-datepicker-div, so it
   sits OUTSIDE .modern-gf — selectors here are intentionally
   global and target jQuery UI's own classes.
   ============================================================ */

@keyframes mgf-dp-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ui-datepicker {
    position: absolute;
    z-index: 99999;
    display: none;
    width: 21em;
    padding: 1.1rem 0.9rem 0.9rem;
    background: var(--mgf-white, #fff);
    border: none;
    border-top: 3px solid var(--mgf-accent, #cfb14e);
    border-radius: 14px;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.04),
        0 14px 44px -14px rgba(0, 0, 0, 0.28);
    font-family: inherit;
    font-size: 0.9em;
    color: var(--mgf-ink, #2a2a2a);
    animation: mgf-dp-fadein 200ms ease-out;
}

/* Header — month / year title with arrow controls on either side */
.ui-datepicker-header {
    position: relative;
    padding: 0 0 0.85rem;
    margin: 0 0 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ui-datepicker-title {
    font-size: 0.95em;
    font-weight: 600;
    line-height: 2em;
    letter-spacing: 0.005em;
    color: var(--mgf-ink, #2a2a2a);
}

/* Hide month/year dropdowns if any plugin re-enables them — we use arrows */
.ui-datepicker-title select.ui-datepicker-month,
.ui-datepicker-title select.ui-datepicker-year {
    border: none;
    background: transparent;
    font-weight: 600;
    font-family: inherit;
    color: var(--mgf-ink, #2a2a2a);
    margin: 0 0.2em;
    padding: 0.1em 0.3em;
    cursor: pointer;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    position: absolute;
    top: 0;
    width: 2em;
    height: 2em;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease, color 200ms ease;
    color: var(--mgf-ink, #2a2a2a);
}
.ui-datepicker-prev { left: 0; }
.ui-datepicker-next { right: 0; }

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: var(--mgf-cream, #faf6f0);
    color: var(--mgf-accent-dark, #b89636);
}

/* Hide jQuery UI's default text labels; draw clean chevrons via CSS */
.ui-datepicker-prev span,
.ui-datepicker-next span {
    display: none;
}
.ui-datepicker-prev::before,
.ui-datepicker-next::before {
    content: "";
    width: 0.5em;
    height: 0.5em;
    border-top: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    display: block;
}
.ui-datepicker-prev::before {
    transform: rotate(-45deg);
    margin-left: 0.25em;
}
.ui-datepicker-next::before {
    transform: rotate(135deg);
    margin-right: 0.25em;
}

/* Disabled nav at min/max bounds */
.ui-datepicker-prev.ui-state-disabled,
.ui-datepicker-next.ui-state-disabled {
    opacity: 0.25;
    cursor: not-allowed;
}
.ui-datepicker-prev.ui-state-disabled:hover,
.ui-datepicker-next.ui-state-disabled:hover {
    background: transparent;
    color: var(--mgf-ink, #2a2a2a);
}

/* Calendar grid */
.ui-datepicker-calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px;
    margin: 0;
}

/* Day-of-week labels — small caps, gold tracking */
.ui-datepicker-calendar th {
    padding: 0.5rem 0 0.6rem;
    font-size: 0.65em;
    font-weight: 700;
    color: var(--mgf-accent-dark, #b89636);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-align: center;
    border: none;
}

.ui-datepicker-calendar td {
    padding: 1px;
    text-align: center;
    border: none;
}

/* Day cells — circular, generous touch target, tabular numerals */
.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto;
    border-radius: 50%;
    text-decoration: none;
    color: var(--mgf-ink, #2a2a2a);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.ui-datepicker-calendar td a:hover {
    background: var(--mgf-cream, #faf6f0);
    color: var(--mgf-accent-dark, #b89636);
}

/* Today — subtle gold ring, no fill */
.ui-datepicker-today a,
.ui-datepicker-today .ui-state-default {
    color: var(--mgf-accent-dark, #b89636);
    font-weight: 700;
    box-shadow: inset 0 0 0 1.5px var(--mgf-accent, #cfb14e);
}

/* Selected — solid gold circle with soft drop shadow */
.ui-state-active,
.ui-datepicker-calendar td a.ui-state-active {
    background: var(--mgf-accent, #cfb14e) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px -3px rgba(207, 177, 78, 0.55) !important;
}

/* Days from prev/next month — barely there */
.ui-datepicker-other-month a,
.ui-datepicker-other-month span {
    color: rgba(0, 0, 0, 0.18);
    font-weight: 400;
}

/* Unselectable / disabled (past dates via minDate, etc.) */
.ui-datepicker-unselectable span,
.ui-state-disabled span {
    color: rgba(0, 0, 0, 0.22);
    cursor: default;
    background: transparent;
}
