/* ==========================================================================
   MONOLITH CONTACT — registry forms ([monolith_form])
   Schema-driven IPC16 forms in the Thai Permaculture design system.
   Ported from the original Gravity Forms global styling (style.css ~213-521):
   white card, two-column grid, uppercase labels, grey hints, pill radios /
   checkboxes, gold section headings and gold submit. Compact by design so a
   full form fits on one screen.
   Palette: green #3A5A40 / deep #2D3A26 / gold #C5A065 / cream #F7F9F4.
   ========================================================================== */

/* 1. Card container + two-column field grid */
.mf-form {
    font-family: 'Inter', sans-serif;
    max-width: 680px;
    margin: 0 auto;
    text-align: left;
    background: #ffffff;
    border: 1px solid #E5EADF;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(58, 90, 64, 0.06);
    padding: 31px 40px 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 0;
    align-items: start;
}

/* Fields span the full width by default; --half takes a single column. */
.mf-form > .mf-field,
.mf-form > .mf-section,
.mf-form > .mf-error { grid-column: 1 / -1; }
.mf-form > .mf-field--half { grid-column: auto; }

.mf-field { margin: 0 0 14px 0; }

/* 2. Section heading — gold left bar, Lora */
.mf-section {
    font-family: 'Lora', serif;
    font-size: 18px;
    font-weight: 700;
    color: #3A5A40;
    border-left: 3px solid #C5A065;
    padding-left: 12px;
    margin: 6px 0 14px;
}
.mf-form > .mf-section:first-of-type { margin-top: 0; }

/* 3. Labels + required asterisk */
.mf-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.mf-label span[aria-hidden="true"] { color: var(--tp-gold-ink); }

/* 4. Hint text */
.mf-hint {
    display: block;
    font-size: 11px;
    color: #5F6B59;
    line-height: 1.5;
    margin: 0 0 6px;
}

/* 5. Inputs + textareas */
.mf-input,
.mf-textarea {
    width: 100%;
    box-sizing: border-box;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 10px 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.mf-input:focus,
.mf-textarea:focus {
    outline: none;
    border-color: #C5A065;
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.15);
}
.mf-input::placeholder,
.mf-textarea::placeholder { color: var(--tp-text-soft); }
.mf-textarea { min-height: 100px; resize: vertical; }
.mf-field--short .mf-textarea { min-height: 56px; height: 56px; }

/* 6. Pill radios + checkboxes (native control hidden, label span is the pill) */
.mf-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mf-choice {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}
.mf-choice input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.mf-choice span {
    display: inline-block;
    background: #ffffff;
    color: #3A5A40;
    border: 1px solid #C5A065;
    border-radius: 50px;
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    transition: all 0.2s ease;
}
.mf-choice:hover span,
.mf-choice input:checked + span {
    background: #3A5A40;
    color: #F7F9F4;
    border-color: #3A5A40;
}
.mf-choice input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(197, 160, 101, 0.25);
}

/* 7. Submit — gold primary CTA, centered */
.mf-submit {
    grid-column: 1 / -1;
    appearance: none;
    border: 0;
    cursor: pointer;
    background: var(--tp-cta-bg, #D9B985);
    color: var(--tp-cta-ink, #2D3A26);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 16px 52px;
    border-radius: 8px;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    margin: 20px auto 0;
    box-shadow: 0 6px 18px rgba(197, 160, 101, 0.35);
    transition: all 0.3s ease;
}
.mf-submit:hover {
    background: #3A5A40; color: var(--tp-cream, #F7F9F4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58, 90, 64, 0.25);
}
.mf-submit:active { transform: translateY(0); }

/* 8. Error + success states */
.mf-error {
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    color: #c0392b;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 18px;
    font-size: 14px;
}

.mf-form--success {
    display: block;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 32px;
}
.mf-success-msg {
    font-family: 'Lora', serif;
    font-size: 19px;
    line-height: 1.5;
    color: #3A5A40;
    margin: 14px 0 0;
}

/* 9. Honeypot — visually hidden, present for bots */
.mf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* 10. Mobile — single column, full-width submit */
@media (max-width: 768px) {
    .mf-form {
        grid-template-columns: 1fr;
        padding: 24px 20px;
    }
    .mf-form > .mf-field--half { grid-column: 1 / -1; }
    .mf-submit {
        width: 100%;
        max-width: 100%;
        padding: 16px 24px;
    }
}
