/* ============================================================
   Newsletter Signup content block (.mv-newsletter)
   Two layout modes:
     .mv-newsletter--boxed  centered rounded card (electroplanet.ma style)
     .mv-newsletter--full   full-bleed edge-to-edge band (abt.com style)
   Inside both: a LEFT text column + a RIGHT signup form (abt.com style),
   stacking on narrow screens. Admin-set colours / max-width / radius are
   emitted inline on .mv-newsletter; everything structural lives here so the
   HTML contract (classes) stays stable.
   ============================================================ */

.mv-newsletter {
    box-sizing: border-box;
    position: relative;
    margin: 18px 0;
    padding: 28px 32px;
    background-color: #f5f6f8;
    color: #222;
    clear: both;
}

.mv-newsletter * { box-sizing: border-box; }

/* boxed: a centered card with rounded corners + a default max width. */
.mv-newsletter--boxed {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 14px;
}

/* full: a band; the renderer's full-bleed JS pins it to the viewport edges.
   Provide a CSS fallback (the 100vw trick) for no-JS / initial paint. */
.mv-newsletter--full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
}

/* The two columns: text left, form right (abt.com style). */
.mv-newsletter__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.mv-newsletter__text {
    flex: 1 1 360px;
    min-width: 0;
}

.mv-newsletter__title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: inherit;
}

.mv-newsletter__body {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: inherit;
}

.mv-newsletter__body p { margin: 0 0 6px; }
.mv-newsletter__body p:last-child { margin-bottom: 0; }

/* Right: the signup form. */
.mv-newsletter__form {
    flex: 0 1 552px;            /* ~20% wider so the email field has more room */
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;                     /* button sticks to the input (no gap) */
}

.mv-newsletter__email {
    flex: 1 1 220px;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    font-size: 15px;
    line-height: 46px;
    color: #222;
    background: #fff;
    border: 1px solid #cfd6dd;
    border-radius: 8px 0 0 8px;   /* round left only; square right to meet the button */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.mv-newsletter__email:focus {
    border-color: #2f8f6b;
    box-shadow: 0 0 0 3px rgba(47, 143, 107, .18);
}

.mv-newsletter__btn {
    flex: 0 0 auto;
    height: 46px;
    padding: 0 26px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background-color: #2f8f6b;
    border: 1px solid #2f8f6b;
    border-radius: 0 8px 8px 0;   /* round right only; square left to sit flush against the input */
    margin-left: -1px;            /* overlap the 1px borders for a seamless seam */
    cursor: pointer;
    white-space: nowrap;
    transition: filter .12s ease, box-shadow .12s ease;
}

.mv-newsletter__btn:hover { filter: brightness(1.06); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.mv-newsletter__btn:active { transform: translateY(1px); }
.mv-newsletter__btn[disabled] { opacity: .6; cursor: default; }

/* Result / status message: spans the full form width under the input row. */
.mv-newsletter__msg {
    flex-basis: 100%;
    min-height: 1em;
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.4;
}

/* Always use the block's (readable) text colour for the confirm/error message - some theme rules
   were painting it blue-on-blue inside coloured bands. inherit + !important guarantees it matches. */
.mv-newsletter .mv-newsletter__msg,
.mv-newsletter .mv-newsletter__msg.is-ok,
.mv-newsletter .mv-newsletter__msg.is-err { color: inherit !important; font-weight: 600; }

/* Stack the two columns on narrow screens. */
@media (max-width: 768px) {
    .mv-newsletter { padding: 22px 18px; }
    .mv-newsletter__inner { flex-direction: column; align-items: stretch; gap: 16px; }
    .mv-newsletter__form { flex-basis: auto; }
}
