/* Phone-screen renderings of the SMS opt-in flow, shown on /Home/SmsTerms.
 *
 * These are live HTML, not screenshots, and that is deliberate: the markup is the same thing the reviewer
 * is being shown, so there is no export step to forget and no image that can quietly fall out of date when
 * the consent wording changes. The consent text and message bodies are pulled from
 * VerificationMessages at render time for the same reason.
 *
 * Adapted from docs/toll-free-verification/mockup.css. Everything is scoped under .sms-flow so the phone
 * chrome can't leak into the rest of the site or collide with Bootstrap.
 * Colors come from the shared --et-* tokens in brand.css; nothing here hardcodes a brand hex. */

.sms-flow {
    --sf-brand: var(--et-primary);
    --sf-brand-2: var(--et-primary-2);
    --sf-bg: var(--et-background);
    --sf-sand: var(--et-warm-ivory);
    --sf-surface: var(--et-surface);
    --sf-gold: var(--et-warm-gold);
    --sf-ink: var(--et-text);
    --sf-muted: var(--et-text-muted);
    --sf-line: var(--et-divider);
}

/* Step layout ------------------------------------------------------------ */

.sms-step {
    margin: 2rem 0 2.5rem;
}

.sms-step-heading {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.sms-step-number {
    flex: 0 0 auto;
    background: var(--et-primary);
    color: var(--et-white);
    border-radius: 999px;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.sms-step-heading h3 {
    margin: 0;
}

/* A step with no screen (the message itself arriving) reads as part of the sequence rather than a gap. */
.sms-step.is-offscreen {
    border-left: 3px solid var(--et-divider);
    margin-left: 0.8rem;
    padding-left: 1.4rem;
}

.sms-screens {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.25rem;
}

/* Phone frame ------------------------------------------------------------ */

.sms-flow .phone {
    width: min(390px, 100%);
    /* min-height, not a fixed 844: the sign-up screen is taller than an iPhone viewport, and a fixed
       height with overflow:hidden clipped the call-to-action off the bottom. */
    min-height: 720px;
    background: var(--sf-bg);
    border-radius: 46px;
    border: 11px solid var(--et-deep-teal);
    box-shadow: 0 18px 40px rgba(13, 47, 37, .22);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sms-flow .notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: var(--et-deep-teal);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 5;
}

.sms-flow .statusbar {
    height: 52px;
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 26px 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-brand);
}

.sms-flow .statusbar .icons { letter-spacing: 2px; }

.sms-flow .screen {
    flex: 1 1 auto;
    padding: 8px 26px 26px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sms-flow .brand { display: flex; justify-content: center; padding: 4px 0 2px; }
.sms-flow .brand .logo { height: 44px; width: auto; }

.sms-flow h4 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.6px;
    margin: 14px 0 0;
    color: var(--sf-ink);
}

.sms-flow .sub {
    color: var(--sf-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0 0;
}

/* Fields ----------------------------------------------------------------- */

.sms-flow .field { margin-top: 16px; }

.sms-flow .field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--sf-ink);
    margin-bottom: 7px;
}

.sms-flow .field label .opt { color: var(--sf-muted); font-weight: 500; }

.sms-flow .input {
    width: 100%;
    height: 50px;
    background: var(--sf-surface);
    border: 1.5px solid var(--sf-line);
    border-radius: 13px;
    padding: 0 15px;
    font-size: 16px;
    color: var(--sf-ink);
    display: flex;
    align-items: center;
}

.sms-flow .input.placeholder { color: #a99f88; }
.sms-flow .input .flag { margin-right: 8px; }

/* Disclosure block -------------------------------------------------------- */

/* Shown immediately above the "Text me a code" button — the point where the user opts in by asking.
   ⚠️ There is deliberately NO checkbox here. The toll-free reviewer rejected the earlier design twice:
   once because the consent checkbox was pre-selected, and once because tying consent to account creation
   made messaging "a requirement for service". Under request-as-opt-in there is nothing to tick and
   nothing bundled into sign-up — the tap on the button is the affirmative act. Do not add a checkbox. */
.sms-flow .disclosure {
    margin-top: 18px;
    background: var(--sf-sand);
    border: 1.5px solid var(--sf-gold);
    border-radius: 13px;
    padding: 13px 14px;
}

.sms-flow .disclosure p {
    font-size: 12px;
    line-height: 1.55;
    color: var(--sf-brand);
    margin: 0;
}

.sms-flow .disclosure .fine {
    color: #7a5f3a;
    margin-top: 6px;
}

/* Plain helper text under a field — states what a number is used for without asking for agreement. */
.sms-flow .field-note {
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--sf-muted);
    margin: 6px 0 0;
}

/* Buttons ---------------------------------------------------------------- */

.sms-flow .btn-mock {
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--sf-brand), var(--sf-brand-2));
    color: var(--et-white);
    font-size: 17px;
    font-weight: 700;
    display: grid;
    place-items: center;
    margin-top: 20px;
    box-shadow: 0 8px 18px rgba(13, 47, 37, .22);
}

.sms-flow .mock-link { color: var(--sf-brand); font-weight: 700; }
.sms-flow .spacer { flex: 1 1 auto; }

.sms-flow .foot {
    text-align: center;
    font-size: 13px;
    color: var(--sf-muted);
    margin-top: 18px;
}

/* One-time-code entry ----------------------------------------------------- */

.sms-flow .otp {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 24px;
}

.sms-flow .otp .cell {
    width: 46px;
    height: 56px;
    border: 1.5px solid var(--sf-line);
    background: var(--sf-surface);
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 800;
    color: var(--sf-ink);
}

.sms-flow .otp .cell.filled { border-color: var(--sf-brand); background: var(--et-white); }

.sms-flow .resend {
    text-align: center;
    font-size: 14px;
    color: var(--sf-muted);
    margin-top: 20px;
}

.sms-flow .sentto {
    margin-top: 14px;
    display: inline-flex;
    align-self: center;
    align-items: center;
    gap: 7px;
    background: var(--sf-surface);
    border: 1.5px solid var(--sf-line);
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sf-ink);
}

/* Messages-app screen ----------------------------------------------------- */

.sms-flow .msgapp { background: var(--et-white); padding-top: 8px; }

.sms-flow .msgbar {
    text-align: center;
    padding: 8px 0 14px;
    border-bottom: 1px solid #ececec;
}

.sms-flow .msgbar .from { font-size: 16px; font-weight: 700; color: #111; }
.sms-flow .msgbar .num { font-size: 12px; color: #8a8a8e; margin-top: 2px; }

.sms-flow .thread {
    padding: 18px 6px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sms-flow .stamp { text-align: center; font-size: 11px; color: #8a8a8e; }

.sms-flow .thread .bubble {
    align-self: flex-start;
    max-width: 84%;
    background: #e9e9eb;
    color: #111;
    padding: 12px 15px;
    border-radius: 20px;
    border-bottom-left-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
}

.sms-flow .msgapp .foot { color: #8a8a8e; }
