/* ---- "Être prévenu de la prochaine portée" -------------------------------
   The form (tools/lib/subscribe.mjs) on the home page and the litter pages.
   Standalone like css/video.css: only tokens.css is assumed. */

.notify {
    box-sizing: border-box;
    max-width: 38rem;
    margin: var(--space-lg) auto 0;
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    background: var(--color-paper);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgb(58 47 42 / 12%);
    color: var(--color-ink);
}

/* Its own band on a litter page, centred like the share card below it. */
.notify--section {
    margin-top: var(--space-xl);
    text-align: center;
}

/* Doubled class: inside the home page's .block, `.block h3` would otherwise
   add a section heading's top margin to the card. */
.notify .notify-title {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--color-ink);
    border: 0;
    padding: 0;
}

.notify-lede {
    margin: 0 0 var(--space-md);
    color: var(--color-ink-soft);
}

.notify-form {
    display: grid;
    gap: var(--space-sm);
    text-align: left;
}

.notify-label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-ink-soft);
}

.notify-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.notify-email {
    flex: 1 1 14rem;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    font: inherit;
    color: var(--color-ink);
    background: var(--color-bg);
    border: 1.5px solid var(--color-rule);
    border-radius: 0.6rem;
}

.notify-email:focus-visible {
    outline: 2px solid var(--color-field);
    outline-offset: 1px;
    border-color: var(--color-field);
}

.notify-button {
    flex: 0 0 auto;
    padding: 0.7rem 1.3rem;
    font: inherit;
    font-weight: 700;
    color: var(--color-paper);
    background: var(--color-field);
    border: 0;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background var(--motion-fast) var(--ease-out);
}

.notify-button:hover,
.notify-button:focus-visible {
    background: var(--color-ink-deep);
}

.notify-button:focus-visible {
    outline: 2px solid var(--color-field);
    outline-offset: 2px;
}

.notify-button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.notify-consent {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: var(--text-sm);
    line-height: 1.4;
    color: var(--color-ink-soft);
}

.notify-consent input {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.1rem;
    accent-color: var(--color-field);
}

/* For bots only: out of sight and out of the tab order, not display:none,
   which the cruder ones know to skip. */
.notify-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.notify-status {
    margin: 0;
    min-height: 1.4em;
    font-size: var(--text-sm);
    font-weight: 700;
}

.notify-status.is-ok { color: var(--color-field); }
.notify-status.is-bad { color: var(--color-heart-text); }

@media screen and (max-width: 40rem) {
    .notify {
        padding-inline: var(--space-md);
    }

    .notify--section {
        margin-inline: var(--space-sm);
    }

    .notify-button {
        flex: 1 1 100%;
    }
}
