/**
 * Zamseed Contact Form Widget Styles
 *
 * @package Zamseed
 * @since 1.0.0
 */

/* The form is a white card in the approved frame (Figma 11158:24629) — panel,
   1px hairline, 20px radius, 28px inset. It rendered as bare fields directly on
   the page ground, which is the single biggest difference from the mockup. */
.zs-contact-form-wrap {
    width: 100%;
    padding: 28px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
}

/* 30px over the previous 28px, and the frame's own `color/jewel-darker`
   (#0a2f1a) rather than --zs-primary. 40px clears the heading from the fields,
   matching the frame's 40px panel gap. */
.zs-contact-form__heading {
    margin: 0 0 40px;
    font-family: var(--zs-font-serif, 'Cormorant Garamond', serif);
    font-size: 1.875rem;
    /* 36px on 30px type in the frame; the global heading scale gave 32.4. */
    line-height: 1.2;
    font-weight: 700;
    color: #0a2f1a;
}

.zs-contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Enquiry Routing */
.zs-contact-form__routing {
    margin-bottom: 28px;
}

.zs-contact-form__routing-heading {
    margin: 0 0 16px;
    font-family: var(--zs-font-serif, 'Cormorant Garamond', serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--zs-text, #1c1c1c);
}

.zs-contact-form__routing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.zs-contact-form__routing-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px;
    text-align: left;
    background-color: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.zs-contact-form__routing-card:hover {
    border-color: var(--zs-primary, #2d5a27);
}

.zs-contact-form__routing-card.is-active {
    border-color: var(--zs-primary, #2d5a27);
    background-color: rgba(45, 90, 39, 0.06);
}

.zs-contact-form__routing-card:focus-visible {
    outline: 2px solid var(--zs-primary, #2d5a27);
    outline-offset: 2px;
}

.zs-contact-form__routing-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--zs-green-soft, #eef4df);
    color: var(--zs-primary, #2d5a27);
    font-size: 18px;
}

.zs-contact-form__routing-icon svg { width: 1em; height: 1em; fill: currentColor; }
.zs-contact-form__routing-icon img { display: block; width: 1em; height: 1em; object-fit: contain; }

.zs-contact-form__routing-title {
    font-family: var(--zs-font-serif, 'Cormorant Garamond', serif);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--zs-text, #1c1c1c);
}

.zs-contact-form__routing-description {
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--zs-muted, #555555);
}

@media (max-width: 900px) {
    .zs-contact-form__routing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .zs-contact-form__routing-grid {
        grid-template-columns: 1fr;
    }
}

/* The frame stacks every field full width, including first and last name,
   which were paired in a two-column row here. */
.zs-contact-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.zs-contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 14px semibold at 0.7px tracking in jewel-darker — the frame's label style.
   Was 12px/700/0.96px in --zs-muted grey. */
.zs-contact-form__label {
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.875rem;
    /* The frame's label box is 17px on 14px type. The global 1.6 body
       line-height made it 22.4, adding 5.4px to every field and 32px to the
       panel — the whole of its height error against the frame. */
    line-height: 1.214;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0a2f1a;
}

.zs-contact-form__required {
    color: #c0392b;
}

.zs-contact-form__input,
.zs-contact-form__textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.9375rem;
    color: var(--zs-text, #1c1c1c);
    background-color: #ffffff;
    /* #d0d6cb in the frame, not the generic 15% black. */
    border: 1px solid #d0d6cb;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 40px in the frame; 12px padding made it 45px. */
.zs-contact-form__input {
    height: 40px;
}

.zs-contact-form__input::placeholder,
.zs-contact-form__textarea::placeholder {
    color: #ababab;
    opacity: 1;
}

.zs-contact-form__textarea {
    resize: vertical;
    /* 120px exactly in the frame; min-height alone let the rows attribute
       stretch it to 129. */
    height: 120px;
    min-height: 120px;
    /* The frame insets the message box 16px on all four sides. */
    padding: 16px;
}

.zs-contact-form__input:focus,
.zs-contact-form__textarea:focus {
    outline: none;
    border-color: var(--zs-primary, #2d5a27);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.12);
}

/* Consent Checkbox */
.zs-contact-form__field--consent {
    flex-direction: row;
}

.zs-contact-form__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--zs-muted, #555555);
    cursor: pointer;
}

.zs-contact-form__consent-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--zs-primary, #2d5a27);
}

.zs-contact-form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* The chain is two classes deep to clear .elementor-kit-6 button, which sets
   font-weight: 700 globally at (0,1,1) and would otherwise win. */
.zs-contact-form .zs-contact-form__submit,
.zs-contact-form__submit {
    /* The frame right-aligns the button under the fields (items-end). */
    align-self: flex-end;
    /* The frame leaves 40px between the last field and the button, where the
       fields themselves are 24px apart. The button is a flex sibling of the
       rows, so it picks up the 24px gap and makes up the remaining 16px
       itself rather than the form carrying two different gap values. */
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    /* color/jewel-dark from the frame. Note this is NOT --zs-primary (#2d5a27),
       which every other CTA on the site uses — flagged rather than reconciled,
       because the frame is explicit. */
    background-color: #145f35;
    border: none;
    border-radius: var(--zs-radius-pill, 999px);
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.zs-contact-form__submit:hover {
    background-color: #245020;
}

.zs-contact-form__submit:focus-visible {
    outline: 2px solid var(--zs-primary, #2d5a27);
    outline-offset: 2px;
}

.zs-contact-form__submit.is-busy {
    opacity: 0.7;
    cursor: not-allowed;
}

.zs-contact-form__notice {
    font-family: var(--zs-font-sans, 'Inter', sans-serif);
    font-size: 0.875rem;
}

/* The frame's panel ends 28px below the button — there is no reserved message
   row. Reserving one left a 24px gap plus a blank line inside every idle card.
   The live region stays in the markup and reappears the moment the script
   writes to it, which is what role="status" announces on. */
.zs-contact-form__notice:empty {
    display: none;
}

.zs-contact-form__notice.is-success {
    color: var(--zs-primary, #2d5a27);
}

.zs-contact-form__notice.is-error {
    color: #c0392b;
}

@media (max-width: 600px) {
    .zs-contact-form__row {
        grid-template-columns: 1fr;
    }
}

/* Helper text — rendered only when the field's Helper Text control is set. */
.zs-contact-form__help {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--zs-text-muted, #5b6157);
}
