/**
 * IMP MCP Theme — Forms frontend styling (theme 0.24.0+).
 *
 * Pairs with the Renderer's output. Inherits theme.json colour /
 * typography tokens so each site picks up its own palette without
 * needing a re-skin.
 */

.imp-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 640px;
}
.imp-form__success,
.imp-form__error {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.95rem;
    line-height: 1.5;
}
.imp-form__success {
    background: #e6f4ea;
    border: 1px solid #94d3a2;
    color: #137333;
}
.imp-form__error {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}
.imp-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.imp-form__label {
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary, #1f2330);
    letter-spacing: 0.01em;
}
.imp-form__required {
    color: var(--wp--preset--color--accent-1, #e2632a);
}
.imp-form__field input[type="text"],
.imp-form__field input[type="email"],
.imp-form__field input[type="url"],
.imp-form__field input[type="tel"],
.imp-form__field select,
.imp-form__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 1rem;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    color: var(--wp--preset--color--primary, #1f2330);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.imp-form__field input:focus,
.imp-form__field select:focus,
.imp-form__field textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--accent-1, #e2632a);
    box-shadow: 0 0 0 3px rgba(226, 99, 42, 0.16);
}
.imp-form__field textarea {
    min-height: 7rem;
    resize: vertical;
}
.imp-form__radio-group,
.imp-form__checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.imp-form__radio-label,
.imp-form__checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.95rem;
    color: var(--wp--preset--color--primary, #1f2330);
    cursor: pointer;
}
.imp-form__help {
    margin: 0;
    font-size: 0.8rem;
    color: #646970;
}
.imp-form__field-error {
    margin: 0;
    font-size: 0.85rem;
    color: #b32d2e;
}
.imp-form__protection {
    margin-top: 0.5rem;
}
.imp-form__submit {
    margin-top: 0.5rem;
}
.imp-form__submit-button {
    appearance: none;
    border: 0;
    padding: 0.75rem 1.5rem;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    background: var(--wp--preset--color--accent-1, #e2632a);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}
.imp-form__submit-button:hover,
.imp-form__submit-button:focus-visible {
    background: var(--wp--preset--color--primary, #1f2330);
}
.imp-form__submit-button:active {
    transform: translateY(1px);
}

/* ----- Multi-step (theme 0.25.0+) ----- */

.imp-form--multistep .imp-form__step[hidden] {
    display: none !important;
}
.imp-form__step {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.imp-form__step-indicator {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.imp-form__step-pip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.9rem;
    color: #646970;
    cursor: default;
}
.imp-form__step-pip + .imp-form__step-pip::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    background: #d9d9d9;
    margin: 0 0.25rem;
}
.imp-form__step-pip-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d9d9d9;
    font-weight: 600;
    color: #646970;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.imp-form__step-pip.is-active {
    color: var(--wp--preset--color--accent-1, #e2632a);
    font-weight: 600;
    cursor: pointer;
}
.imp-form__step-pip.is-active .imp-form__step-pip-num {
    background: var(--wp--preset--color--accent-1, #e2632a);
    border-color: var(--wp--preset--color--accent-1, #e2632a);
    color: #fff;
}
.imp-form__step-pip.is-complete {
    color: var(--wp--preset--color--primary, #1f2330);
    cursor: pointer;
}
.imp-form__step-pip.is-complete .imp-form__step-pip-num {
    background: var(--wp--preset--color--primary, #1f2330);
    border-color: var(--wp--preset--color--primary, #1f2330);
    color: #fff;
}
.imp-form__step-pip-label {
    /* Visible on wider screens; collapsed on small ones to keep the
       pip strip from wrapping ugly. */
}
@media (max-width: 540px) {
    .imp-form__step-pip:not(.is-active) .imp-form__step-pip-label {
        display: none;
    }
}
.imp-form__heading {
    margin: 0;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    color: var(--wp--preset--color--primary, #1f2330);
    line-height: 1.2;
}
.imp-form__heading--h2 { font-size: 1.5rem; font-weight: 700; }
.imp-form__heading--h3 { font-size: 1.25rem; font-weight: 600; }
.imp-form__heading--h4 { font-size: 1.05rem; font-weight: 600; }
.imp-form__text {
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4b4f57;
}
.imp-form__text p:first-child { margin-top: 0; }
.imp-form__text p:last-child { margin-bottom: 0; }
.imp-form__divider {
    border: 0;
    border-top: 1px solid #e5e6e8;
    margin: 0.5rem 0;
}
.imp-form__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e6e8;
}
.imp-form__nav-spacer { flex: 0 0 auto; }
.imp-form__nav-primary {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.imp-form__nav-btn {
    appearance: none;
    border: 0;
    padding: 0.75rem 1.5rem;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}
.imp-form__nav-btn--prev {
    background: transparent;
    color: var(--wp--preset--color--primary, #1f2330);
    padding-left: 0;
}
.imp-form__nav-btn--prev:hover { text-decoration: underline; }
.imp-form__nav-btn--early {
    background: transparent;
    color: var(--wp--preset--color--primary, #1f2330);
    text-decoration: underline;
    padding: 0.75rem 0.5rem;
}
.imp-form__nav-btn--early:hover { color: var(--wp--preset--color--accent-1, #e2632a); }
.imp-form__nav-btn--next {
    background: var(--wp--preset--color--accent-1, #e2632a);
    color: #fff;
}
.imp-form__nav-btn--next:hover,
.imp-form__nav-btn--next:focus-visible {
    background: var(--wp--preset--color--primary, #1f2330);
}
.imp-form__nav-btn:active { transform: translateY(1px); }
.imp-form__step-error {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-family: var(--wp--preset--font-family--global, "Inter", sans-serif);
    font-size: 0.9rem;
}

/* §514 — consent / privacy-notice field.
   Notice mode: a small legitimate-interest privacy line by the submit button.
   Consent mode: a checkbox whose label is the consent text (with link). */
.imp-form__consent--notice {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.85;
}

.imp-form__consent--notice a,
.imp-form__consent-text a {
    text-decoration: underline;
}

.imp-form__consent--tick .imp-form__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.5;
    cursor: pointer;
}

.imp-form__consent--tick input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}
