/* MLC Newsletter signup — footer / homepage / popup placements.
   Loaded only when a placement is active (see inc/newsletter.php). */

.mlc-nl-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ---- Form (shared) ---- */
.mlc-nl-form {
    width: 100%;
    max-width: 480px;
}
.mlc-nl-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.mlc-nl-email {
    flex: 1 1 200px;
    min-width: 0;
    padding: 12px 14px;
    font-size: 15px;
    color: var(--mlc-charcoal);
    background: #fff;
    border: 1.5px solid var(--mlc-gray-light);
    border-radius: var(--mlc-radius-sm);
    transition: border-color var(--mlc-transition);
}
.mlc-nl-email:focus {
    outline: none;
    border-color: var(--mlc-purple);
}
.mlc-nl-submit {
    flex: 0 0 auto;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--mlc-purple);
    border: 1.5px solid var(--mlc-purple);
    border-radius: var(--mlc-radius-sm);
    cursor: pointer;
    transition: background var(--mlc-transition), border-color var(--mlc-transition);
}
.mlc-nl-submit:hover {
    background: var(--mlc-purple-dark);
    border-color: var(--mlc-purple-dark);
}
.mlc-nl-submit:disabled {
    opacity: 0.65;
    cursor: default;
}
.mlc-nl-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--mlc-gray);
}
.mlc-nl-consent input {
    margin-top: 2px;
    flex: 0 0 auto;
}
.mlc-nl-consent a {
    color: var(--mlc-purple);
    text-decoration: underline;
}
.mlc-nl-msg {
    margin: 10px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
}
.mlc-nl-msg--success {
    color: #1f7a44;
    font-weight: 600;
}
.mlc-nl-msg--error {
    color: #b23b3b;
    font-weight: 600;
}
.mlc-nl-form.mlc-nl-done .mlc-nl-row,
.mlc-nl-form.mlc-nl-done .mlc-nl-consent {
    display: none;
}

/* ---- Footer placement ---- */
/* A panel rather than a bare row: it appears on every page, so it needs to read as
   a deliberate offer. Previously it hung 88px below the columns (the grid's own
   padding plus a margin) yet ran straight into the copyright bar, and the copy
   stretched to ~620px leaving a dead gap before the form. */
.mlc-footer-newsletter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px 40px;
    margin: 0 0 40px;
    padding: 28px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--mlc-radius-lg);
}
.mlc-footer-newsletter .mlc-footer-newsletter-copy {
    flex: 1 1 280px;
    max-width: 460px;
}
.mlc-footer-newsletter h4 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
    color: var(--mlc-gold);
}
.mlc-footer-newsletter p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    max-width: 420px;
}
.mlc-footer-newsletter .mlc-nl-form {
    flex: 0 1 430px;
}
.mlc-footer-newsletter .mlc-nl-consent {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
}
.mlc-footer-newsletter .mlc-nl-consent a {
    color: rgba(255, 255, 255, 0.9);
}
.mlc-footer-newsletter .mlc-nl-msg {
    color: #fff;
}

@media (max-width: 640px) {
    .mlc-footer-newsletter {
        padding: 24px 20px;
        margin-bottom: 28px;
    }
    .mlc-footer-newsletter .mlc-nl-form {
        flex: 1 1 100%;
    }
}

/* ---- Homepage section ---- */
.mlc-newsletter-section {
    padding: 72px 0;
    background: var(--mlc-purple-light);
}
.mlc-newsletter-card {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 40px;
    text-align: center;
    background: var(--mlc-warm-white);
    border-radius: var(--mlc-radius-lg);
    box-shadow: var(--mlc-shadow-lg);
}
.mlc-newsletter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    background: var(--mlc-gold);
    border-radius: 50%;
    box-shadow: var(--mlc-shadow);
}
.mlc-newsletter-card h2 {
    margin: 0 0 12px;
    color: var(--mlc-purple-dark);
}
.mlc-newsletter-intro {
    margin: 0 auto 24px;
    max-width: 480px;
    color: var(--mlc-gray);
    line-height: 1.65;
}
.mlc-newsletter-card .mlc-nl-form {
    margin: 0 auto;
}
.mlc-newsletter-card .mlc-nl-consent {
    justify-content: center;
    text-align: left;
}

/* ---- Popup placement ----
   The popup card leaves ~376px of content width, so the inline email+button row
   always wraps there. A wrapped button inherits no justification, which left it
   stranded to the left of otherwise centred copy — so stack it deliberately,
   full width and centred, and centre the consent row the way the section does. */
.mlc-popup__newsletter {
    margin-top: 20px;
}
/* Rule only when something (e.g. custom HTML) sits above the form — with the
   product grid hidden the form follows the intro text, where a divider is noise. */
.mlc-popup__custom + .mlc-popup__newsletter {
    padding-top: 20px;
    border-top: 1px solid var(--mlc-gray-light);
}
.mlc-popup__newsletter .mlc-nl-form {
    max-width: 100%;
}
.mlc-popup__newsletter .mlc-nl-row {
    flex-direction: column;
    gap: 10px;
}
.mlc-popup__newsletter .mlc-nl-email,
.mlc-popup__newsletter .mlc-nl-submit {
    width: 100%;
    flex: 0 0 auto;
}
.mlc-popup__newsletter .mlc-nl-consent {
    justify-content: center;
    text-align: left;
}
.mlc-popup__newsletter .mlc-nl-msg {
    text-align: center;
}
/* Offer badge — reuses the gold circle from the homepage section, a size down. */
.mlc-popup__badge.mlc-newsletter-badge {
    width: 56px;
    height: 56px;
    font-size: 19px;
    margin-bottom: 14px;
}

@media (max-width: 600px) {
    .mlc-nl-row { flex-direction: column; }
    /* .mlc-nl-email carries `flex: 1 1 200px`, which is a *width* intent. Once the row
       becomes a column that 200px basis applies to the main axis — height — so the email
       field rendered 200px tall on phones. Reset the basis; width is handled below. */
    .mlc-nl-email { flex: 0 0 auto; width: 100%; }
    .mlc-nl-submit { width: 100%; }
    .mlc-newsletter-section { padding: 48px 0; }
    .mlc-newsletter-card { padding: 36px 22px; }
}
