// ==========================================================================
// PressZone Theme - Newsletter Popup Styles
// ==========================================================================
// Entry point - compiles to newsletter-popup.css
// Uses Sass variables with body.dark-mode & nesting pattern.
// ==========================================================================

@import 'abstracts/variables';
@import 'abstracts/mixins';

.newsletter-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;

    &.is-open {
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;

        .newsletter-popup-container {
            transform: scale(1) translateY(0);
        }
    }
}

.newsletter-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.newsletter-popup-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.newsletter-popup-content {
    background: $light-bg-card;
    border: 1px solid $light-border-color;
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    body.dark-mode & {
        background: $dark-bg-card;
        border-color: $dark-border-color;
    }
}

// Close Button
.newsletter-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: $light-text-muted;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all $transition-base;

    &:hover {
        background: $light-bg-tertiary;
        color: $light-text-primary;
    }

    body.dark-mode & {
        color: $dark-text-muted;

        &:hover {
            background: $dark-bg-tertiary;
            color: $dark-text-primary;
        }
    }

    @include rtl {
        right: auto;
        left: 1rem;
    }
}

// Icon
.newsletter-popup-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, $color-primary, $color-secondary);
    border-radius: 1rem;
    font-size: 1.75rem;
    color: #fff;
}

// Content
.newsletter-popup-title {
    color: $light-text-primary;

    body.dark-mode & {
        color: $dark-text-primary;
    }
}

.newsletter-popup-description {
    font-size: 0.9375rem;
    line-height: 1.6;
}

// Form
.newsletter-popup-form {
    .form-control {
        background: $light-bg-secondary;
        border-color: $light-border-color;
        color: $light-text-primary;
        text-align: center;

        &::placeholder {
            color: $light-text-muted;
        }

        &:focus {
            background: $light-bg-tertiary;
            border-color: $color-primary;
            box-shadow: 0 0 0 0.25rem rgba($color-primary, 0.25);
        }

        body.dark-mode & {
            background: $dark-bg-secondary;
            border-color: $dark-border-color;
            color: $dark-text-primary;

            &::placeholder {
                color: $dark-text-muted;
            }

            &:focus {
                background: $dark-bg-tertiary;
            }
        }
    }
}

// Decline Link
.newsletter-popup-decline {
    display: inline-block;
    background: none;
    border: none;
    color: $light-text-muted;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color $transition-base;

    &:hover {
        color: $light-text-secondary;
        text-decoration: underline;
    }

    body.dark-mode & {
        color: $dark-text-muted;

        &:hover {
            color: $dark-text-secondary;
        }
    }
}
