/**
 * HyzenPro Newsletter Widget Styles
 * 
 * Styles for email subscription and newsletter signup forms
 * Matches prototype design exactly
 */

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.hyzen-newsletter {
    padding: 4rem 2rem;
    background: hsl(var(--hyzen-bg));
    text-align: center;
}

@media (min-width: 768px) {
    .hyzen-newsletter {
        padding: 6rem 2rem;
    }
}

@media (min-width: 1024px) {
    .hyzen-newsletter {
        padding: 8rem 4rem;
    }
}

/* ========================================
   HEADER CONTENT
   ======================================== */
.hyzen-newsletter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.875rem;
    background: hsl(var(--hyzen-primary));
    color: hsl(var(--hyzen-primary-fg));
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hyzen-newsletter-tag {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: hsl(var(--hyzen-muted-fg));
    margin-bottom: 1rem;
    display: block;
}

.hyzen-newsletter-title {
    font-family: var(--hyzen-font-heading, 'Playfair Display', serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 1rem;
    color: hsl(var(--hyzen-fg));
    line-height: 1.2;
}

.hyzen-newsletter-description {
    font-size: 1rem;
    color: hsl(var(--hyzen-muted-fg));
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    font-weight: 300;
}

/* ========================================
   FORM STYLING
   ======================================== */
.hyzen-newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    flex-direction: column;
}

@media (min-width: 640px) {
    .hyzen-newsletter-form {
        flex-wrap: nowrap;
        flex-direction: row;
    }
}

.hyzen-newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.25rem;
    border: 2px solid hsl(var(--hyzen-border));
    border-radius: var(--hyzen-radius, 0.5rem);
    font-size: 1rem;
    font-family: var(--hyzen-font-body, 'Inter', sans-serif);
    font-weight: 400;
    color: hsl(var(--hyzen-fg));
    background: hsl(var(--hyzen-bg));
    transition: all 0.3s ease;
}

.hyzen-newsletter-input::placeholder {
    color: hsl(var(--hyzen-muted-fg));
    opacity: 0.7;
}

.hyzen-newsletter-input:focus {
    outline: none;
    border-color: hsl(var(--hyzen-primary));
    box-shadow: 0 0 0 3px hsl(var(--hyzen-primary) / 0.1);
}

.hyzen-newsletter-input:hover {
    border-color: hsl(var(--hyzen-primary) / 0.5);
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */
.hyzen-newsletter-submit {
    padding: 1rem 2rem;
    background: hsl(var(--hyzen-primary));
    color: hsl(var(--hyzen-primary-fg));
    border: none;
    border-radius: var(--hyzen-radius, 0.5rem);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--hyzen-font-body, 'Inter', sans-serif);
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: var(--hyzen-shadow-soft, 0 4px 20px -2px rgba(0, 0, 0, 0.06));
}

.hyzen-newsletter-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--hyzen-shadow-hover, 0 8px 30px -4px rgba(0, 0, 0, 0.12));
}

.hyzen-newsletter-submit:active {
    transform: translateY(0);
}

.hyzen-newsletter-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 640px) {
    .hyzen-newsletter-submit {
        width: 100%;
    }
}

/* ========================================
   SUCCESS/ERROR STATES
   ======================================== */
.hyzen-newsletter-success {
    padding: 1.5rem;
    background: hsl(120 50% 90%);
    border: 1px solid hsl(120 80% 70%);
    border-radius: var(--hyzen-radius, 0.5rem);
    color: hsl(120 100% 20%);
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.4s ease;
}

.hyzen-newsletter-error {
    padding: 1.5rem;
    background: hsl(0 100% 90%);
    border: 1px solid hsl(0 100% 70%);
    border-radius: var(--hyzen-radius, 0.5rem);
    color: hsl(0 100% 30%);
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PRIVACY NOTICE
   ======================================== */
.hyzen-newsletter-privacy {
    font-size: 0.75rem;
    color: hsl(var(--hyzen-muted-fg));
    margin-top: 1.5rem;
    line-height: 1.6;
}

.hyzen-newsletter-privacy a {
    color: hsl(var(--hyzen-primary));
    text-decoration: none;
    border-bottom: 1px solid hsl(var(--hyzen-primary));
    transition: all 0.3s ease;
}

.hyzen-newsletter-privacy a:hover {
    color: hsl(var(--hyzen-primary) / 0.8);
}

/* ========================================
   ACCESSIBILITY
   ========================================*/
.hyzen-newsletter-input:focus-visible,
.hyzen-newsletter-submit:focus-visible {
    outline: 2px solid hsl(var(--hyzen-primary));
    outline-offset: 2px;
}

/* ========================================
   LOADING STATE
   ======================================== */
.hyzen-newsletter.loading .hyzen-newsletter-submit {
    position: relative;
    color: transparent;
}

.hyzen-newsletter.loading .hyzen-newsletter-submit::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid hsl(var(--hyzen-primary-fg) / 0.3);
    border-radius: 50%;
    border-top-color: hsl(var(--hyzen-primary-fg));
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {
    .hyzen-newsletter-input {
        background: hsl(var(--hyzen-bg));
        color: hsl(var(--hyzen-fg));
    }

    .hyzen-newsletter-input::placeholder {
        color: hsl(var(--hyzen-muted-fg));
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 640px) {
    .hyzen-newsletter {
        padding: 2.5rem 1rem;
    }

    .hyzen-newsletter-title {
        font-size: 1.5rem;
    }

    .hyzen-newsletter-description {
        font-size: 0.9rem;
    }

    .hyzen-newsletter-input,
    .hyzen-newsletter-submit {
        width: 100%;
    }

    .hyzen-newsletter-form {
        gap: 0.5rem;
    }
}
