﻿/*
|--------------------------------------------------------------------------
| Public forms — global stylesheet (single source of truth)
|--------------------------------------------------------------------------
| Edit CSS variables below to restyle ALL public forms at once.
| Loaded after theme.css on every public page.
|
| Markup: form.pub-form + form-grid + form-group (+ form-float via JS)
| Registration pages: wrap in .form-reg-shell + registration-form-head
*/
:root {
    --pub-form-max-width: 960px;
    --pub-form-grid-gap: 10px;
    --pub-form-field-height: 40px;
    --pub-form-field-radius: 8px;
    --pub-form-field-font: .875rem;
    --pub-form-label-float: .68rem;
    --pub-form-label-color: var(--clr-h6, #94a3b8);
    --pub-form-label-filled: var(--clr-h5, #64748b);
    --pub-form-value-color: #111827;
    --pub-form-focus-ring: color-mix(in srgb, var(--clr-primary) 12%, transparent);
    --pub-form-error: #e53935;
    --pub-form-card-padding: 20px 22px 24px;
}
/* =====================================================
   FORMS
   ===================================================== */
.form-card { background: #fff; border: 1px solid var(--clr-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-group-row {
    grid-column: 1 / -1;
    display: grid;
    gap: 18px;
}
.form-group-row--3 {
    grid-template-columns: repeat(3, 1fr);
}
.form-group-row--2 {
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 700px) {
    .form-group-row--3,
    .form-group-row--2 {
        grid-template-columns: 1fr;
    }
}
.form-reg-shell .form-group-row {
    gap: 10px;
}

.form-dotted-rule {
    grid-column: 1 / -1;
    border: 0;
    border-top: 1px dotted #c4b5d8;
    margin: 6px 0 2px;
    height: 0;
}

.form-group--category {
    margin-top: 4px;
}

.pub-form .form-label--above,
form.pub-form .form-label--above {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

/* â€”â€” Floating label (input â†’ label, placeholder=" ") â€”â€” */
.form-float {
    position: relative;
    display: flex;
    flex-direction: column;
}
.form-float > .form-label {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 5px;
    font-size: .92rem;
    font-weight: 500;
    color: #94a3b8;
    background: transparent;
    pointer-events: none;
    transition: top .15s ease, transform .15s ease, font-size .15s ease, color .15s ease, background .15s ease;
    z-index: 2;
    line-height: 1.2;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.form-float > .form-label .req { color: #e53935; }
.form-float > .form-label .opt { color: #94a3b8; font-weight: 400; font-size: .85em; }

.form-float > .form-control-x,
.form-float > textarea.form-control-x,
.form-float > select.form-control-x,
.form-float .form-input-action .form-control-x {
    min-height: 56px;
    padding: 22px 14px 10px;
    border-radius: 10px;
}
.form-float > textarea.form-control-x { min-height: 120px; padding-top: 26px; }
.form-float > select.form-control-x { padding-top: 18px; padding-bottom: 10px; }

.form-float:focus-within > .form-label,
.form-float.is-filled > .form-label {
    top: 0;
    transform: translateY(-50%);
    font-size: .74rem;
    font-weight: 600;
    color: var(--clr-primary);
    background: #fff;
}
.form-float:focus-within > .form-control-x,
.form-float:focus-within > textarea.form-control-x,
.form-float:focus-within > select.form-control-x,
.form-float:focus-within .form-input-action .form-control-x {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--pub-form-focus-ring);
}
.form-float.is-filled:not(:focus-within) > .form-label { color: #64748b; }

.form-float .form-input-action { position: relative; width: 100%; }
.form-float .form-input-action + .form-label { right: 90px; max-width: calc(100% - 100px); }
.form-float .form-input-action .form-control-x { padding-right: 88px; text-transform: uppercase; }

.form-float .form-status,
.form-float .form-hint,
.form-float .form-field-err { margin-top: 6px; position: relative; z-index: 1; }

.form-float--static > .form-label {
    position: static;
    transform: none;
    margin-bottom: 6px;
    padding: 0;
    font-size: .88rem;
    font-weight: 600;
    color: var(--clr-h4);
    background: transparent;
    pointer-events: auto;
}
.form-float--static > .form-control-x { min-height: 46px; padding: 11px 14px; }

/* Legacy top label (file uploads, etc.) */
.form-label--top { font-weight: 600; font-size: .88rem; color: var(--clr-h4); margin-bottom: 6px; display: block; }
.form-label { font-weight: 600; font-size: .88rem; color: var(--clr-h4); margin-bottom: 6px; }
.form-label .req { color: #e53935; }
.form-control-x {
    width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--clr-border); border-radius: 10px;
    font-size: .95rem; color: var(--pub-form-value-color); background: #fff; font-family: inherit; font-weight: 500;
    transition: border .2s ease, box-shadow .2s ease;
}
.form-control-x:focus { outline: none; border-color: var(--clr-primary); box-shadow: 0 0 0 3px var(--pub-form-focus-ring); }
.form-control-x::placeholder { color: transparent; }
.form-float:not(.is-filled):not(:focus-within) > .form-control-x::placeholder,
.form-float:not(.is-filled):not(:focus-within) > textarea.form-control-x::placeholder { color: transparent; }
.form-control-x:disabled,
.form-control-x[readonly] { background: #f1f5f9; color: #64748b; cursor: not-allowed; opacity: 1; }
textarea.form-control-x { min-height: 120px; resize: vertical; line-height: 1.5; }
select.form-control-x {
    -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
select.form-control-x:required:invalid { color: #94a3b8; }
select.form-control-x option { color: var(--pub-form-value-color); }
input[type="file"].form-control-x { padding: 9px 12px; }
input[type="file"].form-control-x::file-selector-button {
    margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 6px;
    background: var(--clr-tab-bg, #f1f5f9); color: var(--clr-h4); font-weight: 600; font-size: .82rem; cursor: pointer;
}
.form-hint { font-size: .78rem; color: var(--clr-h6); margin-top: 4px; }
.form-label .opt { color: var(--clr-h6); font-weight: 400; }
.form-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--clr-border);
}
.form-card__head h3 { margin: 0; font-size: 1.22rem; font-weight: 700; color: var(--clr-h3); display: flex; align-items: center; gap: 8px; }
.form-card__head h3 i { color: var(--clr-primary); }
.form-card__head-aside { flex-shrink: 0; }
.form-card__head-aside .form-link-btn { text-decoration: none; }
.form-card__head-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--clr-tab-bg, #f1f5f9);
    border: 1px solid var(--clr-border);
    color: var(--clr-h4);
    font-weight: 600;
    font-size: .88rem;
    white-space: nowrap;
}

/* Registration forms — shared shell */
.form-reg-shell { max-width: 960px; margin: 0 auto; }
.form-reg-shell.donor-verify__box { max-width: 640px; }
.form-reg-shell .donor-verify__note { margin-top: 16px; }
.form-card.form-card--reg {
    border-radius: var(--radius);
    margin-top: 0;
    box-shadow: var(--shadow-sm);
}

/* Compact fields on registration forms (volunteer / membership / internship) */
.form-reg-shell .form-card.form-card--reg {
    padding: 20px 22px 24px;
}
.form-reg-shell .form-grid {
    gap: 10px;
}
.form-reg-shell .form-float > .form-control-x,
.form-reg-shell .form-float > textarea.form-control-x,
.form-reg-shell .form-float > select.form-control-x,
.form-reg-shell .form-float .form-input-action .form-control-x {
    min-height: 40px;
    padding: 14px 12px 4px;
    font-size: .875rem;
    border-radius: 8px;
}
.form-reg-shell .form-float > textarea.form-control-x {
    min-height: 96px;
    padding-top: 20px;
}
.form-reg-shell .form-float > select.form-control-x {
    padding-top: 12px;
    padding-bottom: 4px;
}
.form-reg-shell .form-float > .form-label {
    left: 11px;
    font-size: .875rem;
}
.form-reg-shell .form-float:focus-within > .form-label,
.form-reg-shell .form-float.is-filled > .form-label {
    font-size: .68rem;
}
.form-reg-shell .form-float--static > .form-label--top,
.form-reg-shell .form-float--static > .form-label {
    margin-bottom: 4px;
    font-size: .85rem;
}
.form-reg-shell .form-float--static > .form-control-x {
    min-height: 38px;
    padding: 7px 12px;
    font-size: .875rem;
}
.form-reg-shell .form-float .form-input-action__btn {
    padding: 6px 12px;
    font-size: .78rem;
}

/* Date fields: dd/mm/yyyy placeholder until focused or filled */
.form-float--date { position: relative; }
.form-float--date:not(.is-filled):not(:focus-within) > .form-label {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.form-float--date:not(.is-filled):not(:focus-within)::after {
    content: 'dd/mm/yyyy';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .875rem;
    pointer-events: none;
    line-height: 1;
}
.form-reg-shell .form-float--date > .form-control-x { color-scheme: light; }
.form-float--date:not(.is-filled):not(:focus-within) input[type="date"]::-webkit-datetime-edit,
.form-float--date:not(.is-filled):not(:focus-within) input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.form-float--date:not(.is-filled):not(:focus-within) input[type="date"]::-webkit-datetime-edit-text,
.form-float--date:not(.is-filled):not(:focus-within) input[type="date"]::-webkit-datetime-edit-month-field,
.form-float--date:not(.is-filled):not(:focus-within) input[type="date"]::-webkit-datetime-edit-day-field,
.form-float--date:not(.is-filled):not(:focus-within) input[type="date"]::-webkit-datetime-edit-year-field {
    opacity: 0;
}
.form-float--date.is-filled > .form-label,
.form-float--date:focus-within > .form-label {
    opacity: 1;
    visibility: visible;
}
.form-float--date.is-filled::after,
.form-float--date:focus-within::after { display: none; }

.form-reg-shell .form-alert {
    margin-bottom: 12px;
    padding: 10px 14px;
}

/* Registration forms — one theme accent only (--clr-primary) */
.form-reg-shell .btn-thm {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
}
.form-reg-shell .btn-thm:hover {
    background: color-mix(in srgb, var(--clr-primary) 86%, #000);
    border-color: color-mix(in srgb, var(--clr-primary) 86%, #000);
    color: #fff;
}
.form-reg-shell .form-link-btn,
.form-reg-shell .form-footnote a,
.form-reg-shell .form-check a {
    color: var(--clr-primary);
}
.form-reg-shell .form-check {
    background: color-mix(in srgb, var(--clr-primary) 6%, #fff);
    border-color: color-mix(in srgb, var(--clr-primary) 16%, var(--clr-border));
}
.form-reg-shell .form-input-action__btn {
    background: var(--clr-primary);
}
.form-reg-shell .form-input-action__btn:hover {
    background: color-mix(in srgb, var(--clr-primary) 86%, #000);
}
.form-reg-shell .form-float .field-live-err {
    display: block;
    margin-top: 6px;
    font-size: .78rem;
    color: #c0392b;
}

@media (max-width: 640px) {
    .form-card__head h3 { font-size: 1.05rem; }
    .form-card__head-badge { font-size: .82rem; padding: 6px 12px; }
}

.form-link-btn {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 0;
    color: var(--clr-primary); font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: underline; padding: 4px 0;
}
.form-link-btn:hover { opacity: .85; }
.form-alert {
    display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px;
    font-size: .9rem; margin-bottom: 18px;
}
.form-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.form-group--error .form-control-x { border-color: #e53935; box-shadow: 0 0 0 3px rgba(229, 57, 53, .1); }
.form-group--error.form-float > .form-label { color: #e53935; }
.form-field-err { display: block; color: #e53935; font-size: .78rem; margin-top: 5px; }
.form-input-action { position: relative; }
.form-input-action .form-control-x { padding-right: 88px; text-transform: uppercase; }
.form-input-action__btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: var(--clr-primary); color: #fff; font-weight: 600; font-size: .82rem;
    padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.form-input-action__btn:hover { opacity: .92; }
.form-payable {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    padding: 14px 16px; background: color-mix(in srgb, var(--clr-primary) 6%, #fff);
    border: 1px solid color-mix(in srgb, var(--clr-primary) 18%, var(--clr-border)); border-radius: 12px;
}
.form-payable__label { color: var(--clr-h6); font-size: .9rem; font-weight: 500; }
.form-payable__amount { font-size: 1.35rem; font-weight: 800; color: var(--clr-primary); }
.form-payable small { width: 100%; font-size: .8rem; }
.form-coupon-ok { color: #16a34a; }
.form-coupon-err { color: #e11d48; }
.form-check {
    display: flex; align-items: flex-start; gap: 11px; background: var(--clr-tab-bg, #f8fafc);
    border: 1px solid var(--clr-border); border-radius: 12px; padding: 14px 16px; margin: 22px 0 18px;
    font-size: .92rem; color: var(--clr-h4); cursor: pointer;
}
.form-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--clr-primary); }
.form-check a { color: var(--clr-primary); font-weight: 600; }
.form-footnote { text-align: center; margin: 16px 0 0; font-size: .88rem; color: var(--clr-h6); }
.form-footnote a { color: var(--clr-primary); font-weight: 600; }
.form-status { display: block; font-size: .78rem; margin-top: 4px; color: var(--clr-h6); }
.form-status.is-ok { color: #16a34a; font-weight: 600; }
.form-status.is-error { color: #e53935; }
.form-status.is-loading { color: #64748b; }

/* PIN lookup â€” district & state locked after auto-fill */
.pincode-locked,
.form-control-x.pincode-locked,
input[data-pincode-locked="1"],
select[data-pincode-locked="1"] {
    background: #f1f5f9 !important;
    color: #334155;
    cursor: not-allowed;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* =====================================================
   Global public form shell (.pub-form) — membership style
   Apply class="pub-form" on any public <form> element.
   ===================================================== */
.pub-form.form-card,
form.pub-form.form-card {
    padding: var(--pub-form-card-padding);
}
.pub-form .form-grid,
form.pub-form > .form-grid {
    gap: var(--pub-form-grid-gap);
}
.pub-form .form-float > .form-control-x,
.pub-form .form-float > textarea.form-control-x,
.pub-form .form-float > select.form-control-x,
.pub-form .form-float .form-input-action .form-control-x,
form.pub-form .form-float > .form-control-x,
form.pub-form .form-float > textarea.form-control-x,
form.pub-form .form-float > select.form-control-x,
form.pub-form .form-float .form-input-action .form-control-x {
    min-height: var(--pub-form-field-height);
    padding: 14px 12px 4px;
    font-size: var(--pub-form-field-font);
    border-radius: var(--pub-form-field-radius);
}
.pub-form .form-float > textarea.form-control-x,
form.pub-form .form-float > textarea.form-control-x {
    min-height: 96px;
    padding-top: 20px;
}
.pub-form .form-float > select.form-control-x,
form.pub-form .form-float > select.form-control-x {
    padding-top: 12px;
    padding-bottom: 4px;
}
.pub-form .form-float > .form-label,
form.pub-form .form-float > .form-label {
    left: 11px;
    font-size: var(--pub-form-field-font);
    color: var(--pub-form-label-color);
}
.pub-form .form-float:focus-within > .form-label,
.pub-form .form-float.is-filled > .form-label,
form.pub-form .form-float:focus-within > .form-label,
form.pub-form .form-float.is-filled > .form-label {
    font-size: var(--pub-form-label-float);
}
.pub-form .form-float.is-filled:not(:focus-within) > .form-label,
form.pub-form .form-float.is-filled:not(:focus-within) > .form-label {
    color: var(--pub-form-label-filled);
}
.pub-form .form-float:focus-within > .form-control-x,
.pub-form .form-float:focus-within > textarea.form-control-x,
.pub-form .form-float:focus-within > select.form-control-x,
form.pub-form .form-float:focus-within > .form-control-x,
form.pub-form .form-float:focus-within > textarea.form-control-x,
form.pub-form .form-float:focus-within > select.form-control-x {
    box-shadow: 0 0 0 3px var(--pub-form-focus-ring);
}
.pub-form .form-alert,
form.pub-form > .form-alert {
    margin-bottom: 12px;
    padding: 10px 14px;
}
.pub-form .form-float--static > .form-control-x,
form.pub-form .form-float--static > .form-control-x {
    min-height: 38px;
    padding: 7px 12px;
    font-size: var(--pub-form-field-font);
}

/* Standalone card forms (contact, complaint, etc.) */
.form-card.pub-form,
form.form-card.pub-form {
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    padding: var(--pub-form-card-padding);
}

/* Builder / dynamic forms */
.fb-form.pub-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pub-form-grid-gap);
}
.fb-form.pub-form .fb-field--full { grid-column: 1 / -1; }
.fb-form.pub-form .fb-field--half { grid-column: span 1; }
@media (max-width: 700px) {
    .fb-form.pub-form { grid-template-columns: 1fr; }
    .fb-form.pub-form .fb-field--half { grid-column: 1 / -1; }
}

/* Donation donor form — reuse membership grid */
.dn-form.pub-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pub-form-grid-gap);
}
.dn-form.pub-form > .form-group.full,
.dn-form.pub-form > .dn-field.full { grid-column: 1 / -1; }
.dn-form.pub-form .dn-form__row {
    display: contents;
}
@media (max-width: 700px) {
    .dn-form.pub-form { grid-template-columns: 1fr; }
}

/* Section wrapper for form pages */
.mem-section {
    padding: 40px 0 56px;
    background: var(--clr-bg);
}
.mem-section.verify-page-section {
    padding: 48px 0 70px;
}
@media (max-width: 700px) {
    .mem-section { padding: 28px 0 40px; }
}

/* Form section headings inside pub-form */
.form-section-block {
    margin-top: 22px;
}
.form-section-block:first-child {
    margin-top: 0;
}
.form-section-rule {
    border: 0;
    border-top: 1px solid #dbe3ef;
    margin: 0 0 18px;
}
.form-section-block:first-child .form-section-rule {
    display: none;
}
.pub-form .form-section-block .form-section-title,
form.pub-form .form-section-block .form-section-title {
    grid-column: unset;
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-h3);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-form .form-section-title,
form.pub-form .form-section-title {
    grid-column: 1 / -1;
    margin: 18px 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-h3);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pub-form .form-section-title:first-child,
form.pub-form .form-section-title:first-child {
    margin-top: 0;
}
.pub-form .form-section-title i,
form.pub-form .form-section-title i,
.pub-form .form-section-block .form-section-title i,
form.pub-form .form-section-block .form-section-title i {
    color: var(--clr-primary);
}
.form-section-block--footer {
    margin-top: 26px;
}
.form-section-block--footer .form-check {
    margin: 0;
}

/* Complaint register / track tabs */
.cmp-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cmp-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 11px 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.cmp-tab:hover {
    border-color: #cbd5e1;
    color: #1e293b;
}
.cmp-tab.is-active {
    background: var(--clr-secondary, #fb8c00);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

/* Compact search / verify forms (member ID, donation track, etc.) */
.pub-form--search .form-grid {
    grid-template-columns: 1fr auto;
    align-items: end;
}
@media (max-width: 560px) {
    .pub-form--search .form-grid {
        grid-template-columns: 1fr;
    }
}
.pub-form--search .form-search-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    align-self: end;
}
.pub-form--search .form-search-actions .btn-thm {
    white-space: nowrap;
}

/* Apply modal — reuse pub-form grid inside dialog */
.apply-modal .pub-form .form-grid {
    gap: var(--pub-form-grid-gap);
}

/* Footer newsletter — horizontal email + button */
.pub-form--inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}
.pub-form--inline input[type="email"],
.pub-form--inline input[type="text"],
.pub-form--inline .form-control-x {
    flex: 1;
    min-width: 200px;
    min-height: var(--pub-form-field-height);
    padding: 10px 14px;
    border: 1px solid var(--clr-border);
    border-radius: var(--pub-form-field-radius);
    font-size: var(--pub-form-field-font);
    font-family: inherit;
    color: var(--pub-form-value-color);
    font-weight: 500;
}
/* Footer newsletter stays one row on desktop */
.footer-news .pub-form--inline {
    flex-wrap: nowrap;
    align-items: center;
}
.footer-news .pub-form--inline input[type="email"],
.footer-news .pub-form--inline input[type="text"] {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: 0;
}
.footer-news .pub-form--inline input[name="name"],
.footer-news .pub-form--inline input[name="email"] {
    flex: 1 1 0;
    max-width: none;
}
.footer-news .pub-form--inline button[type="submit"] {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
}
@media (max-width: 640px) {
    .footer-news .pub-form--inline { flex-wrap: wrap; }
    .footer-news .pub-form--inline input[name="name"],
    .footer-news .pub-form--inline input[name="email"] {
        flex: 1 1 100%;
        max-width: none;
    }
    .footer-news .pub-form--inline button[type="submit"] { width: 100%; }
}
.pub-form--inline input[type="email"]:focus,
.pub-form--inline input[type="text"]:focus,
.pub-form--inline .form-control-x:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--pub-form-focus-ring);
}

/* Submit actions — normal button width + gap from last field */
form.pub-form:not(.pub-form--inline):not(.pub-form--search) button[type="submit"],
form.pub-form:not(.pub-form--inline):not(.pub-form--search) input[type="submit"],
button[type="submit"][form].btn-thm {
    width: auto;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}
form.pub-form.form-grid > button[type="submit"],
form.pub-form.fb-form .fb-field--full > button[type="submit"] {
    grid-column: 1 / -1;
    justify-self: start;
}
form.pub-form--search button[type="submit"],
form.pub-form--search .form-search-actions button[type="submit"],
.pub-form--inline button[type="submit"] {
    margin-top: 0;
}
form.pub-form.pub-form--inline button[type="submit"] {
    width: auto;
}
form.pub-form :is([style*="display:flex"], [style*="display: flex"], .d-flex) > button[type="submit"] {
    margin-top: 0;
}

/* Profile photo upload (registration forms) */
.form-reg-shell .reg-photo-field {
    grid-column: 1 / -1;
}
.form-reg-shell .reg-photo-field > .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: .875rem;
    color: var(--clr-h3, #334155);
}
.form-reg-shell .reg-photo-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    border: 1.5px dashed var(--clr-border, #cbd5e1);
    border-radius: 12px;
    background: var(--clr-tab-bg, #f8fafc);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s, background .15s;
}
.form-reg-shell .reg-photo-drop:hover {
    border-color: var(--clr-primary, #1565c0);
    background: #fff;
}
.form-reg-shell .reg-photo-drop.has-file {
    border-color: var(--clr-primary, #1565c0);
}
.form-reg-shell .reg-photo-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.form-reg-shell .reg-photo-drop__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px;
    text-align: center;
    pointer-events: none;
    position: relative;
    z-index: 0;
}
.form-reg-shell .reg-photo-drop.has-preview .reg-photo-drop__body {
    opacity: 0;
    visibility: hidden;
}
.form-reg-shell .reg-photo-preview {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .14);
    background: #e2e8f0;
}
.form-reg-shell .reg-photo-preview[hidden] {
    display: none !important;
}
.form-reg-shell .reg-photo-drop.has-preview {
    min-height: 160px;
    background: var(--clr-tab-bg, #f8fafc);
}
.form-reg-shell .reg-photo-drop__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--clr-primary, #1565c0);
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}
.form-reg-shell .reg-photo-drop__text {
    font-size: .9rem;
    font-weight: 600;
    color: var(--clr-h3, #334155);
}
.form-reg-shell .reg-photo-drop__hint {
    font-size: .78rem;
    color: var(--clr-subheading, #64748b);
}

/* International phone input (intl-tel-input) */
.form-float--phone > .iti,
.form-float.form-float--phone > .iti {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--pub-form-field-height, 40px);
    height: var(--pub-form-field-height, 40px);
    border: 1px solid var(--clr-border);
    border-radius: var(--pub-form-field-radius, 8px);
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-reg-shell .form-float--phone > .iti {
    min-height: 40px;
    height: 40px;
    border-radius: 8px;
}
.form-float--phone:focus-within > .iti {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px var(--pub-form-focus-ring);
}
.form-group--error.form-float--phone > .iti,
.form-group--error .form-float--phone > .iti {
    border-color: var(--pub-form-error, #e53935);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, .1);
}
.form-float--phone .iti__country-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 0;
    height: 100%;
}
.form-float--phone .iti__selected-country {
    height: 100%;
    border-radius: var(--pub-form-field-radius, 8px) 0 0 var(--pub-form-field-radius, 8px);
    background: transparent;
}
.form-float--phone .iti__selected-country-primary {
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}
.form-float--phone .iti input[type="tel"],
.form-float--phone .iti input.iti__tel-input,
.form-control-x.iti__tel-input,
.pub-form input[type="tel"].iti__tel-input,
.form-group .iti input[type="tel"] {
    width: 100%;
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 var(--pub-form-field-radius, 8px) var(--pub-form-field-radius, 8px) 0 !important;
    background: transparent;
    color: var(--pub-form-value-color);
    font-weight: 500;
    font-size: var(--pub-form-field-font, .875rem);
    line-height: 1.2;
    box-sizing: border-box;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 12px !important;
    vertical-align: middle;
}
.form-reg-shell .form-float--phone .iti input[type="tel"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 12px !important;
}
.form-float .iti {
    position: relative;
}

/* Country flag dropdown — solid panel (prevents fields showing through) */
.iti {
    --iti-country-selector-bg: #fff;
}
.iti__country-selector,
.iti__dropdown-content {
    background: #fff !important;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
    z-index: 1200;
    overflow: hidden;
}
.iti--detached-country-selector {
    z-index: 1200;
}
.iti--detached-country-selector .iti__country-selector {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
}
.iti__search-input-wrapper {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
.iti__search-input {
    padding: 8px 10px;
    font-size: .875rem;
    background: #fff;
    color: #0f172a;
}
.iti__country-list {
    font-size: .875rem;
    background: #fff;
    max-height: 220px;
}
.iti__country {
    background: #fff;
    color: #0f172a;
}
.iti__country.iti__highlight {
    background: color-mix(in srgb, var(--clr-primary, #1565c0) 10%, #fff);
}
.iti__no-results {
    background: #fff;
    color: #64748b;
}
.form-float .iti + .form-label,
.form-float > .form-label {
    z-index: 4;
}
/* Phone: no placeholder; label hidden until focus or value */
.iti input[type="tel"]::placeholder,
.form-float .iti input[type="tel"]::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}
.form-float--phone:not(:focus-within):not(.is-filled) > .form-label {
    opacity: 0;
    visibility: hidden;
}
.form-float--phone:focus-within > .form-label,
.form-float--phone.is-filled > .form-label {
    opacity: 1;
    visibility: visible;
}
/* Prevent double focus ring on inner input */
.form-float--phone:focus-within > .iti input[type="tel"],
.form-float--phone:focus-within .iti input.iti__tel-input {
    box-shadow: none !important;
    outline: none;
}
.form-float:focus-within.form-float--phone > .form-control-x {
    border-color: transparent;
    box-shadow: none;
}

/* Donation modal phone field */
.dm-field.form-float--phone > .iti {
    min-height: 40px;
    height: 40px;
    border-radius: 10px;
}
.dm-grid .form-float > .form-control-x {
    min-height: 40px;
    padding: 14px 12px 4px;
    font-size: .875rem;
    border-radius: 10px;
}
.dm-grid .form-float > .form-label {
    left: 11px;
    font-size: .875rem;
}
.dm-grid .form-float:focus-within > .form-label,
.dm-grid .form-float.is-filled > .form-label {
    font-size: .68rem;
}

/* Profile / event modal fields upgraded to floating phone labels */
.mem-field.form-float,
.ev-field.form-float,
.fb-field.form-float {
    position: relative;
}
.mem-field.form-float > .form-label,
.ev-field.form-float > .form-label,
.fb-field.form-float > .form-label {
    margin-bottom: 0;
}
.mem-field.form-float > label:not(.form-label) {
    display: none;
}

/* Entered value text — legacy + modal form controls (public site) */
.field-x input:not(:disabled):not([readonly]),
.field-x textarea:not(:disabled):not([readonly]),
.field-x select:not(:disabled),
.mem-field input:not(:disabled):not([readonly]),
.mem-field textarea:not(:disabled):not([readonly]),
.mem-field select:not(:disabled),
.ev-field input:not(:disabled):not([readonly]),
.ev-field textarea:not(:disabled):not([readonly]),
.ev-field select:not(:disabled),
.fb-field input:not(:disabled):not([readonly]),
.fb-field textarea:not(:disabled):not([readonly]),
.fb-field select:not(:disabled),
.captcha-field input,
.dn-field input:not(:disabled):not([readonly]),
.dn-field textarea:not(:disabled):not([readonly]),
.dn-field select:not(:disabled) {
    color: var(--pub-form-value-color);
    font-weight: 500;
    -webkit-text-fill-color: var(--pub-form-value-color);
}

.form-control-x:-webkit-autofill,
.form-control-x:-webkit-autofill:focus,
.field-x input:-webkit-autofill,
.field-x input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--pub-form-value-color);
    transition: background-color 9999s ease-out 0s;
}
