/* Newsletter plugin — uses the active storefront theme's CSS variables so it fits every theme. */
.nl-block {
    --nl-primary: var(--theme-primary, #059669);
    --nl-on-primary: var(--theme-on-primary, #fff);
    --nl-text: var(--theme-text, #18181b);
    --nl-muted: var(--theme-text-muted, #71717a);
    --nl-border: var(--theme-border, #e4e4e7);
    --nl-surface: var(--theme-surface, #fff);
    --nl-input-bg: var(--theme-background, #fff);
    color: var(--nl-text);
    width: 100%;
}
.nl-tone-dark {
    --nl-text: #fff;
    --nl-muted: rgb(255 255 255 / .75);
    --nl-border: rgb(255 255 255 / .3);
    --nl-input-bg: rgb(255 255 255 / .1);
    --nl-button-bg: #fff;
    --nl-button-text: #18181b;
}
.nl-align-center { text-align: center; }
.nl-align-center .nl-form { margin-inline: auto; }
.nl-heading { font-family: var(--theme-font-title, inherit); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
.nl-text { margin: .75rem 0 0; color: var(--nl-muted); }
.nl-form { display: flex; flex-direction: column; gap: .75rem; max-width: 30rem; margin-top: 1.75rem; }
.nl-inline .nl-form { max-width: 34rem; }
@media (min-width: 640px) {
    .nl-inline .nl-form { flex-direction: row; }
    .nl-inline .nl-input { flex: 1 1 0; min-width: 0; }
}
.nl-card { background: var(--nl-surface); border: 1px solid var(--nl-border); border-radius: var(--theme-radius-lg, 1.5rem); padding: clamp(1.5rem, 4vw, 2.5rem); }
.nl-tone-dark.nl-card { background: rgb(24 24 27 / .55); backdrop-filter: blur(8px); }
.nl-input {
    height: 3.25rem; width: 100%; border-radius: 9999px; border: 1px solid var(--nl-border); background: var(--nl-input-bg);
    padding: 0 1.5rem; color: var(--nl-text); font: inherit; outline: none; backdrop-filter: blur(6px);
}
.nl-input::placeholder { color: var(--nl-muted); opacity: .85; }
.nl-input:focus { border-color: var(--nl-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--nl-primary) 15%, transparent); }
.nl-tone-dark .nl-input:focus { border-color: #fff; box-shadow: none; }
.nl-button {
    height: 3.25rem; border: 0; border-radius: 9999px; padding: 0 1.75rem; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap;
    background: var(--nl-button-bg, var(--nl-primary)); color: var(--nl-button-text, var(--nl-on-primary)); transition: background-color .2s, color .2s, opacity .2s;
}
.nl-button:hover { background: var(--theme-primary-hover, var(--nl-primary)); color: var(--nl-on-primary); }
.nl-tone-dark .nl-button:hover { background: var(--nl-primary); color: var(--nl-on-primary); }
.nl-button:disabled { opacity: .6; cursor: wait; }
.nl-message { margin: 1.75rem 0 0; font-weight: 600; color: var(--nl-primary); }
.nl-tone-dark .nl-message { color: #fff; }
.nl-error { margin: .5rem 0 0; font-size: .875rem; color: #dc2626; }
.nl-tone-dark .nl-error { color: #fecaca; }
.nl-consent { margin: .75rem 0 0; font-size: .75rem; color: var(--nl-muted); }
.nl-hp, .nl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nl-hp { left: -9999px; }

.nl-checkout { position: relative; display: flex; align-items: flex-start; gap: .75rem; margin: .75rem 0; padding: .75rem .9rem; border: 1px solid var(--theme-border, #e4e4e7); border-radius: .75rem; cursor: pointer; color: var(--theme-text, inherit); font-size: .875rem; transition: border-color .15s ease; }
.nl-checkout:hover { border-color: color-mix(in srgb, var(--theme-primary, #059669) 45%, var(--theme-border, #e4e4e7)); }
.nl-switch-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nl-switch-track { position: relative; flex-shrink: 0; width: 2.5rem; height: 1.4rem; margin-top: .05rem; border-radius: 999px; background: var(--theme-border, #e4e4e7); transition: background-color .2s ease; }
.nl-switch-thumb { position: absolute; top: .2rem; left: .2rem; width: 1rem; height: 1rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s ease; }
.nl-switch-input:checked + .nl-switch-track { background: var(--theme-primary, #059669); }
.nl-switch-input:checked + .nl-switch-track .nl-switch-thumb { transform: translateX(1.1rem); }
.nl-switch-input:focus-visible + .nl-switch-track { outline: 3px solid var(--theme-primary, #059669); outline-offset: 2px; }

.nl-checkout-hint { display: block; color: var(--theme-text-muted, #71717a); font-size: .75rem; }

.nl-page { max-width: 36rem; margin: 0 auto; padding: 5rem 1.5rem; text-align: center; color: var(--theme-text, inherit); }
.nl-page h1 { font-family: var(--theme-font-title, inherit); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; line-height: 1.15; margin: 1rem 0 0; }
.nl-page p { color: var(--theme-text-muted, #71717a); margin: 1rem 0 0; }
.nl-page-icon { display: inline-flex; width: 3.5rem; height: 3.5rem; align-items: center; justify-content: center; border-radius: 9999px; background: var(--theme-primary-soft, #ecfdf5); color: var(--theme-primary, #059669); font-size: 1.5rem; }
.nl-page-actions { margin-top: 2rem; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.nl-page-link { display: inline-flex; align-items: center; height: 3rem; padding: 0 1.5rem; border-radius: 9999px; border: 1px solid var(--theme-border, #e4e4e7); color: var(--theme-text, inherit); font-weight: 600; text-decoration: none; }
.nl-page .nl-button { height: 3rem; background: var(--theme-primary, #059669); color: var(--theme-on-primary, #fff); }
