/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Shared Weekly G25 Calculators newsletter subscribe/unsubscribe banner.
 * Used by G25 Explorer and G25 Studio via _WeeklyG25NewsletterBanner.cshtml.
 * Scoped custom properties so this banner renders consistently regardless of the
 * host page's own theme variables.
 */

.wg25-newsletter {
    --wg25-border-strong: rgba(139, 90, 43, 0.25);
    --wg25-accent: #c9a962;
    --wg25-accent-subtle: rgba(201, 169, 98, 0.12);
    --wg25-text-primary: #1a1815;
    --wg25-text-secondary: #4a473f;
    --wg25-text-muted: #706c64;
    --wg25-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --wg25-radius-md: 10px;
    --wg25-radius-lg: 16px;
    --wg25-font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --wg25-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    max-width: 1352px;
    margin: 24px auto 0;
    padding: 20px 24px;
    background: #fffdf8;
    border: 1px solid var(--wg25-border-strong);
    border-left: 4px solid var(--wg25-accent);
    border-radius: var(--wg25-radius-lg);
    box-shadow: var(--wg25-shadow-sm);
    font-family: var(--wg25-font-sans);
    color: var(--wg25-text-secondary);
}

.wg25-newsletter__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #8b6720;
    background: var(--wg25-accent-subtle);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 50%;
}

.wg25-newsletter__icon .dna-icon {
    width: 24px;
    height: 24px;
}

.wg25-newsletter__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #8b6720;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    line-height: 1.2;
    text-transform: uppercase;
}

.wg25-newsletter__title {
    margin: 0;
    color: var(--wg25-text-primary);
    font-family: var(--wg25-font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.wg25-newsletter__description {
    margin: 4px 0 0;
    color: var(--wg25-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.wg25-newsletter__description a {
    color: #8b6720;
    font-weight: 600;
    text-decoration: underline;
}

.wg25-newsletter__action {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wg25-newsletter__action form {
    margin: 0;
}

.wg25-newsletter__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #386a52;
    font-size: 0.75rem;
    font-weight: 700;
}

.wg25-newsletter__status-dot {
    width: 8px;
    height: 8px;
    background: #3f8f69;
    border-radius: 50%;
}

.wg25-newsletter__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 20px;
    color: #ffffff;
    background: #76602e;
    border: 1px solid #76602e;
    border-radius: var(--wg25-radius-md);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wg25-newsletter__button:hover,
.wg25-newsletter__button:focus {
    color: #ffffff;
    background: #5f4c24;
    border-color: #5f4c24;
    box-shadow: 0 0 0 3px rgba(118, 96, 46, 0.16);
    text-decoration: none;
}

.wg25-newsletter__button--secondary {
    color: var(--wg25-text-secondary);
    background: transparent;
    border-color: var(--wg25-border-strong);
}

.wg25-newsletter__button--secondary:hover,
.wg25-newsletter__button--secondary:focus {
    color: var(--wg25-text-primary);
    background: var(--wg25-accent-subtle);
    border-color: var(--wg25-accent);
}

.wg25-newsletter-flash {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1352px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border-radius: var(--wg25-radius-lg, 16px);
    box-shadow: var(--wg25-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.wg25-newsletter-flash--success {
    background: #f0faf6;
    border: 1px solid rgba(26, 122, 94, 0.25);
    border-left: 4px solid #1a7a5e;
    color: #145c47;
}

.wg25-newsletter-flash--error {
    background: #fff5f5;
    border: 1px solid rgba(176, 58, 58, 0.25);
    border-left: 4px solid #b03a3a;
    color: #8f2f2f;
}

.wg25-newsletter-flash .close {
    margin-left: auto;
}

@media (max-width: 768px) {
    .wg25-newsletter {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 14px;
        margin: 16px;
        padding: 18px;
    }

    .wg25-newsletter__icon {
        width: 44px;
        height: 44px;
    }

    .wg25-newsletter__title {
        font-size: 1.15rem;
    }

    .wg25-newsletter__action {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 2px;
    }
}

@media (max-width: 480px) {
    .wg25-newsletter {
        grid-template-columns: 1fr;
    }

    .wg25-newsletter__icon {
        display: none;
    }

    .wg25-newsletter__action {
        grid-column: auto;
        align-items: stretch;
        flex-direction: column;
    }

    .wg25-newsletter__button {
        width: 100%;
    }
}
