:root {
    --fb-brand: #048324;
    --fb-brand-deep: #e42228;
    --fb-ink: #23291f;
    --fb-ink-soft: #6b756f;
    --fb-line: #e3e7e4;
    --fb-paper: #ffffff;
}


/* =========================================
   MODAL 1 — BOTTOM MESSAGE CARD
========================================= */

.fb-prompt {
    position: fixed;

    /* DESKTOP: bottom-right */
    right: 24px;
    bottom: 24px;
    left: auto;

    z-index: 998;

    display: flex;
    align-items: flex-start;
    gap: 14px;

    width: 100%;
    max-width: 340px;

    box-sizing: border-box;

    padding: 20px 20px 20px 18px;

    border-radius: 16px;

    background: var(--fb-paper);

    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);

    opacity: 0;

    transform: translateY(24px);

    pointer-events: none;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.fb-prompt.is-visible {
    opacity: 1;

    transform: translateY(0);

    pointer-events: auto;
}


.fb-prompt-icon {
    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border-radius: 10px;

    background: #e7f2ef;

    color: var(--fb-brand);
}

.fb-prompt-icon svg {
    width: 19px;
    height: 19px;
}

.fb-prompt-body {
    flex: 1;

    min-width: 0;
}

.fb-prompt-title {
    display: block;

    margin-bottom: 4px;

    color: var(--fb-ink);

    font-size: 16px;
    font-weight: 700;
}

.fb-prompt-text {
    display: block;

    margin-bottom: 14px;

    color: var(--fb-ink-soft);

    font-size: 15px;
    line-height: 1.6;
}

.fb-prompt-button {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding: 9px 18px;

    border: none;
    border-radius: 8px;

    background: var(--fb-brand);

    color: #ffffff;

    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;

    letter-spacing: 0.3px;

    cursor: pointer;

    transition: background 0.2s ease, transform 0.2s ease;
}

.fb-prompt-button:hover {
    background: var(--fb-brand-deep);

    transform: translateY(-1px);
}

.fb-prompt-button svg {
    width: 13px;
    height: 13px;
}

.fb-prompt-close {
    position: absolute;

    top: 12px;
    right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;

    border: none;
    border-radius: 50%;

    background: #f4f6f5;

    color: #97a19b;

    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease;
}

.fb-prompt-close:hover {
    background: #e3e7e4;
    color: var(--fb-ink);
}

.fb-prompt-close svg {
    width: 10px;
    height: 10px;
}


/* =========================================
   MODAL 2 — OVERLAY FORM MODAL
========================================= */

.fb-overlay {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(20, 26, 22, 0.55);

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fb-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.fb-modal {
    position: relative;

    width: 100%;
    max-width: 420px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 32px 30px 28px;

    border-radius: 16px;

    background: var(--fb-paper);

    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);

    transform: translateY(16px) scale(0.98);

    transition: transform 0.25s ease;
}

.fb-overlay.is-open .fb-modal {
    transform: translateY(0) scale(1);
}

.fb-modal-close {
    position: absolute;

    top: 16px;
    right: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border: none;
    border-radius: 50%;

    background: #f4f6f5;

    color: var(--fb-ink-soft);

    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease;
}

.fb-modal-close:hover {
    background: #e3e7e4;
    color: var(--fb-ink);
}

.fb-modal-close svg {
    width: 13px;
    height: 13px;
}

.fb-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    margin-bottom: 16px;

    border-radius: 12px;

    background: #e7f2ef;

    color: var(--fb-brand);
}

.fb-modal-icon svg {
    width: 22px;
    height: 22px;
}

.fb-modal h2 {
    margin: 0 0 8px;

    color: var(--fb-ink);

    font-size: 20px;
    font-weight: 700;

    line-height: 1.3;
}

.fb-modal-desc {
    margin: 0 0 24px;

    color: var(--fb-ink-soft);

    font-size: 13.5px;
    line-height: 1.7;
}


/* =========================================
   FORM FIELDS
========================================= */

.fb-field {
    margin-bottom: 18px;
}

.fb-field label {
    display: block;

    margin-bottom: 7px;

    color: #444444;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fb-select-wrap {
    position: relative;
}

.fb-select-wrap svg {
    position: absolute;

    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    width: 12px;
    height: 12px;

    color: var(--fb-ink-soft);

    pointer-events: none;
}

.fb-field select,
.fb-field textarea {
    width: 100%;

    border: 1px solid var(--fb-line);
    border-radius: 8px;

    background: #fafcfb;

    color: var(--fb-ink);

    font-family: inherit;
    font-size: 13.5px;

    outline: none;

    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fb-field select {
    height: 46px;

    padding: 0 34px 0 14px;

    appearance: none;

    cursor: pointer;
}

.fb-field textarea {
    min-height: 110px;

    padding: 12px 14px;

    line-height: 1.6;

    resize: vertical;
}

.fb-field textarea::placeholder {
    color: #a5a5a5;
}

.fb-field select:focus,
.fb-field textarea:focus {
    border-color: var(--fb-brand);

    background: #ffffff;

    box-shadow: 0 0 0 3px rgba(15, 109, 92, 0.1);
}


/* =========================================
   SUBMIT BUTTON
========================================= */

.fb-submit {
    width: 100%;
    height: 48px;

    border: none;
    border-radius: 8px;

    background: var(--fb-brand);

    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.4px;
    text-transform: uppercase;

    cursor: pointer;

    transition: background 0.2s ease, transform 0.2s ease;
}

.fb-submit:hover {
    background: var(--fb-brand-deep);

    transform: translateY(-1px);
}

.fb-submit:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}


/* =========================================
   SUCCESS STATE
========================================= */

.fb-success {
    display: none;

    text-align: center;

    padding: 10px 0 4px;
}

.fb-success.is-visible {
    display: block;
}

.fb-modal.is-submitted .fb-form {
    display: none;
}

.fb-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin: 0 auto 16px;

    border-radius: 50%;

    background: #e7f2ef;

    color: var(--fb-brand);
}

.fb-success-icon svg {
    width: 24px;
    height: 24px;
}

.fb-success h3 {
    margin: 0 0 8px;

    color: var(--fb-ink);

    font-size: 18px;
    font-weight: 700;
}

.fb-success p {
    margin: 0;

    color: var(--fb-ink-soft);

    font-size: 13.5px;
    line-height: 1.7;
}


/* =========================================
   MOBILE
========================================= */

@media only screen and (max-width: 480px) {

    .fb-prompt {
        /* CENTER HORIZONTALLY */
        left: 50%;
        right: auto;

        bottom: 16px;

        /* Leave 16px on each side */
        width: calc(100% - 32px);

        max-width: 340px;

        box-sizing: border-box;

        /* Start animation slightly below */
        transform: translateX(-50%) translateY(24px);
    }

    .fb-prompt.is-visible {
        /* CENTER + slide up */
        transform: translateX(-50%) translateY(0);
    }

    .fb-modal {
        padding: 28px 22px 24px;
    }

    .fb-prompt-close {
        top: 14px;
        right: 14px;
    }
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .fb-prompt,
    .fb-overlay,
    .fb-modal,
    .fb-prompt-button,
    .fb-submit {
        transition: none;
    }
}