/* Reset + box-sizing (mirrors the site's global reset) */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

/* This page sits on a white field between banner and footer */
body {
    background-color: #ffffff;
    font-family: 'Roboto', sans-serif;
    color: #111111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Page title banner ── */
.fb-banner-title {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 26px 20px;
    text-align: center;
    font-family: 'Pridi', serif;
    font-weight: 600;
    font-size: 2.7rem;
    letter-spacing: 2px;
    color: #000000;
    background: #B8B8B8;
}

/* ── Layout wrapper (grows to push footer down) ── */
.fb-wrap {
    flex: 1 0 auto;
    width: 100%;
    padding: 36px 20px 56px;
}

/* ── Feedback card ── */
.fb-card {
    max-width: 672px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 4px;
    padding: 26px 30px 20px;
}

.fb-support-email {
    text-align: right;
    font-family: 'Pridi', serif;
    font-size: 1.05rem;
    color: #000000;
    margin-bottom: 16px;
}

/* ── Fields ── */
.fb-field {
    margin-bottom: 22px;
}

.fb-label {
    display: block;
    font-family: 'Pridi', serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 8px;
}

.fb-req {
    color: #e23b3b;
    font-size: 0.85em;
    vertical-align: super;
    margin-left: 1px;
}

.fb-help {
    font-family: 'Pridi', serif;
    font-size: 0.82rem;
    color: #2b2b2b;
    margin: -2px 0 10px;
    line-height: 1.4;
}

/* Pill inputs */
.fb-input {
    width: 100%;
    height: 40px;
    border: 1.5px solid #000000;
    border-radius: 20px;
    padding: 0 18px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: #111111;
    background: #ffffff;
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.fb-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* Autofill animation — green ring while typing, then it settles back to black */
.fb-input.fb-typing {
    border-color: #45C05C;
    box-shadow: 0 0 0 3px rgba(69, 192, 92, 0.16);
}

.fb-input.fb-autofilled {
    animation: fb-autofill-settle 520ms ease-out;
}

@keyframes fb-autofill-settle {
    from {
        border-color: #45C05C;
        box-shadow: 0 0 0 3px rgba(69, 192, 92, 0.16);
    }
    to {
        border-color: #000000;
        box-shadow: 0 0 0 3px rgba(69, 192, 92, 0);
    }
}

/* Message box — vertical resize only, fixed width */
.fb-textarea {
    width: 100%;
    min-height: 158px;
    max-height: 640px;
    border: 1.5px solid #000000;
    border-radius: 10px;
    padding: 12px 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #111111;
    background: #ffffff;
    outline: none;
    resize: vertical;            /* width cannot be changed — only height */
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.fb-textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* Invalid state */
.fb-input.fb-invalid,
.fb-textarea.fb-invalid {
    border-color: #e23b3b;
}

.fb-input.fb-invalid:focus,
.fb-textarea.fb-invalid:focus {
    box-shadow: 0 0 0 3px rgba(226, 59, 59, 0.18);
}

/* Counter + inline errors */
.fb-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.fb-counter {
    margin-left: auto;
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    color: #777777;
    white-space: nowrap;
}

.fb-counter.fb-counter-max {
    color: #e23b3b;
}

.fb-error {
    font-family: 'Roboto', sans-serif;
    font-size: 0.78rem;
    color: #e23b3b;
    min-height: 1em;
    margin-top: 4px;
}

.fb-meta .fb-error {
    margin-top: 0;
}

.fb-form-error {
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
    color: #e23b3b;
    margin-top: 14px;
    min-height: 1em;
}

/* ── Submit ── */
.fb-submit-row {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.fb-submit {
    font-family: 'Pridi', serif;
    font-size: 1.05rem;
    letter-spacing: 1.5px;
    color: #ffffff;
    background: #000000;
    border: none;
    border-radius: 8px;
    padding: 8px 66px;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.05s ease;
}

.fb-submit:hover {
    opacity: 0.88;
}

.fb-submit:active {
    transform: translateY(1px);
}

.fb-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Honeypot — keep it far off-screen, never visible/focusable for humans */
.fb-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Success screen ── */
/* [hidden] must win over display:flex so it stays hidden until submit. */
.fb-success[hidden] {
    display: none;
}

.fb-success {
    display: flex;
    justify-content: center;
    padding: 100px 20px 64px;
}

.fb-success-card {
    width: 100%;
    max-width: 624px;
    background: #F9F9F9;
    border: 1px solid #EDEDED;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 42px 50px 40px;
    text-align: center;
}

/* Black rounded square holding the white check_circle glyph */
.fb-success-badge {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 14px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-success-badge svg {
    width: 36px;
    height: 36px;
    display: block;
}

.fb-success-title {
    margin-top: 28px;
    font-family: 'Pridi', serif;
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: #000000;
}

.fb-success-text {
    margin-top: 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: #45C05C;
}

/* ── Success actions ── */
.fb-success-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 42px;
}

.fb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.15s ease, background-color 0.15s ease,
                color 0.15s ease, transform 0.05s ease;
}

.fb-btn-icon {
    width: 18px;
    height: 18px;
    flex: none;
    display: block;
}

.fb-btn-solid {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.fb-btn-solid:hover {
    opacity: 0.88;
}

.fb-btn-outline {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.fb-btn-outline:hover {
    background: #000000;
    color: #ffffff;
}

.fb-btn:active {
    transform: translateY(1px);
}

/* ── "What happens next?" info panel ── */
.fb-success-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 48px;
    padding: 13px 18px 14px 15px;
    border-radius: 6px;
    background: #F1F1F1;
    text-align: left;
}

.fb-info-icon {
    width: 20px;
    height: 20px;
    flex: none;
    margin-top: 1px;
    color: #111111;
    display: block;
}

.fb-info-title {
    font-family: 'Roboto', sans-serif;
    font-size: 0.845rem;
    font-weight: 700;
    color: #000000;
}

.fb-info-text {
    margin-top: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.45;
    color: #2b2b2b;
}

/* ── Responsive (mobile design) ── */
@media (max-width: 768px) {
    .fb-banner-title {
        font-size: 1.7rem;
        letter-spacing: 1px;
        padding: 18px 16px;
    }

    .fb-wrap {
        padding: 24px 16px 44px;
    }

    .fb-card {
        padding: 20px 18px 24px;
        border-radius: 4px;
    }

    .fb-support-email {
        font-size: 0.92rem;
        margin-bottom: 12px;
    }

    .fb-label {
        font-size: 1.02rem;
    }

    .fb-help {
        font-size: 0.76rem;
    }

    .fb-success {
        padding: 44px 16px 60px;
    }

    .fb-success-card {
        padding: 32px 22px 28px;
    }

    .fb-success-badge {
        width: 62px;
        height: 62px;
        border-radius: 12px;
    }

    .fb-success-badge svg {
        width: 31px;
        height: 31px;
    }

    .fb-success-title {
        margin-top: 24px;
        font-size: 2.35rem;
    }

    .fb-success-text {
        font-size: 1rem;
    }

    .fb-success-actions {
        margin-top: 34px;
        gap: 14px;
    }

    .fb-success-info {
        margin-top: 38px;
    }
}

/* Stack the two actions once they can no longer sit side by side */
@media (max-width: 430px) {
    .fb-success-actions {
        flex-direction: column;
        gap: 12px;
    }

    .fb-btn {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .fb-banner-title {
        font-size: 1.45rem;
    }

    .fb-submit {
        padding: 10px 38px;
    }
}

/* Respect reduced-motion: no transform transitions */
@media (prefers-reduced-motion: reduce) {
    .fb-submit:active,
    .fb-btn:active {
        transform: none;
    }

    /* JS already fills instantly under reduced-motion; kill the ring too. */
    .fb-input.fb-autofilled {
        animation: none;
    }
}
