/* =============================================================
   NICHENCY — FORMS
   components/forms.css
   ============================================================= */

/* ── CONTACT FORM — [nichency_contact_form] ── */
/* Scoped to .nichency-form-wrapper */

.nichency-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    font-family: 'Karla', sans-serif;
    color: #1a1a1a;
    width: 100%;
    box-sizing: border-box;
}

.nichency-form-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e2e2e2;
    width: 100%;
    box-sizing: border-box;
}

.form-notice {
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    font-style: italic;
}

.nichency-grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* prevents grid blowout */
}

.full-span { grid-column: span 2; }

.nichency-grid-form label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #130F49;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required-tag {
    color: #C84B4B;
    margin-left: 3px;
}

.nichency-grid-form input,
.nichency-grid-form textarea {
    padding: 12px 16px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    font-family: 'Karla', sans-serif;
    font-size: 16px;
    color: #1a1a1a;
    background: #ffffff;
    transition: border-color .2s;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.nichency-grid-form input::placeholder,
.nichency-grid-form textarea::placeholder {
    color: #aaa;
}

.nichency-grid-form input:focus,
.nichency-grid-form textarea:focus {
    outline: none;
    border-color: #130F49;
}

/* Submit button — heavily specified to override theme defaults */
.nichency-form-wrapper .nichency-grid-form button.nichency-submit[type="submit"],
.nichency-form-wrapper .nichency-grid-form button.nichency-submit[type="submit"]:not(:hover) {
    grid-column: span 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 16px 40px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #ffffff !important;
    background: #130F49 !important;
    background-color: #130F49 !important;
    border: 1px solid #130F49 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    transition: background .2s, color .2s, background-color .2s !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
}

.nichency-form-wrapper .nichency-grid-form button.nichency-submit[type="submit"]:hover,
.nichency-form-wrapper .nichency-grid-form button.nichency-submit[type="submit"]:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #000000 !important;
    border: 1px solid #130F49 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    transform: none !important;
    font-family: 'Inter', sans-serif !important;
}

/* Alerts */
.nichency-alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-family: 'Karla', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.alert-error {
    background: #FFF5F5;
    color: #C84B4B;
    border: 1px solid #FEB2B2;
}

.alert-success {
    background: #EFFBF8;
    color: #130F49;
    border: 1px solid #c5e8e0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

/* Responsive — tablet */
@media screen and (max-width: 768px) {
    .nichency-form-wrapper .nichency-form-card {
        padding: 32px 28px !important;
    }
}

/* Responsive — mobile: single column */
@media screen and (max-width: 600px) {
    .nichency-form-wrapper,
    .nichency-form-wrapper .nichency-form-card,
    .nichency-form-wrapper .nichency-grid-form {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .nichency-form-wrapper .nichency-form-card {
        padding: 24px 16px !important;
        border-radius: 8px !important;
    }

    .nichency-form-wrapper .nichency-grid-form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 16px !important;
    }

    .nichency-form-wrapper .nichency-grid-form .form-field-group,
    .nichency-form-wrapper .nichency-grid-form .form-field-group.full-span {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .nichency-form-wrapper .nichency-grid-form input,
    .nichency-form-wrapper .nichency-grid-form textarea {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px !important; /* prevents iOS auto-zoom */
        padding: 12px 14px !important;
        box-sizing: border-box !important;
    }

    .nichency-form-wrapper .nichency-grid-form label {
        font-size: 12px !important;
    }

    .nichency-form-wrapper .form-notice {
        font-size: 13px !important;
    }

    .nichency-form-wrapper .nichency-grid-form button.nichency-submit[type="submit"] {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        padding: 14px 24px !important;
        font-size: 15px !important;
    }
}

/* Responsive — small mobile */
@media screen and (max-width: 380px) {
    .nichency-form-wrapper .nichency-form-card {
        padding: 20px 14px !important;
    }

    .nichency-form-wrapper .nichency-grid-form button.nichency-submit[type="submit"] {
        padding: 13px 20px !important;
    }
}
