/* BNR Newsletter Subscribe Block Styles */

/* Button Styles */
.bnr-newsletter-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bnr-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bnr-newsletter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button Sizes */
.bnr-newsletter-btn--small {
    padding: 8px 16px;
    font-size: 14px;
}

.bnr-newsletter-btn--medium {
    padding: 12px 24px;
    font-size: 16px;
}

.bnr-newsletter-btn--large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Button Styles */
.bnr-newsletter-btn--primary {
    background: #dc3545;
    color: #fff;
}

.bnr-newsletter-btn--primary:hover {
    background: #c82333;
    color: #fff;
}

.bnr-newsletter-btn--secondary {
    background: #6c757d;
    color: #fff;
}

.bnr-newsletter-btn--secondary:hover {
    background: #5a6268;
    color: #fff;
}

.bnr-newsletter-btn--outline {
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.bnr-newsletter-btn--outline:hover {
    background: #dc3545;
    color: #fff;
}

/* Modal Styles */
.bnr-newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.bnr-newsletter-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.bnr-newsletter-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: bnr-modal-slide-in 0.3s ease-out;
}

@keyframes bnr-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.bnr-newsletter-modal__header {
    background: #f8f9fa;
    color: #333;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin: 0px -20px 20px -20px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bnr-newsletter-modal__title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-align: center;
    flex: 1;
}

.bnr-newsletter-modal__close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.bnr-newsletter-modal__close:hover {
    background: #f8f9fa;
    color: #333;
}

/* Modal Body */
.bnr-newsletter-modal__body {
    padding: 0 24px 20px 24px;
}

.bnr-newsletter-modal__description {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: center;
}

/* Form Styles */
.bnr-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bnr-newsletter-form__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bnr-newsletter-form__input {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: #fff;
}

.bnr-newsletter-form__input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.bnr-newsletter-form__input::placeholder {
    color: #999;
}

.bnr-newsletter-form__error {
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.bnr-newsletter-form__actions {
    display: flex;
    justify-content: flex-end;
}

.bnr-newsletter-form__submit {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 120px;
}

.bnr-newsletter-form__submit:hover:not(:disabled) {
    background: #c82333;
}

.bnr-newsletter-form__submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Modal Footer */
.bnr-newsletter-modal__footer {
    padding: 0 24px 24px 24px;
}

.bnr-newsletter-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bnr-newsletter-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 16px;
    font-weight: 500;
    text-align: center;
}

.bnr-newsletter-error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    font-weight: 500;
    text-align: center;
}

/* Body scroll prevention */
body.bnr-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bnr-newsletter-modal {
        padding: 10px;
    }
    
    .bnr-newsletter-modal__content {
        max-width: 100%;
        margin: 0;
    }
    
    .bnr-newsletter-modal__header {
        padding: 20px 20px 0 20px;
    }
    
    .bnr-newsletter-modal__title {
        font-size: 20px;
    }
    
    .bnr-newsletter-modal__body {
        padding: 0 20px 16px 20px;
    }
    
    .bnr-newsletter-modal__footer {
        padding: 0 20px 20px 20px;
    }
    
    .bnr-newsletter-form__actions {
        justify-content: stretch;
    }
    
    .bnr-newsletter-form__submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bnr-newsletter-btn--large {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .bnr-newsletter-modal__header {
        padding: 16px 16px 0 16px;
    }
    
    .bnr-newsletter-modal__body {
        padding: 0 16px 12px 16px;
    }
    
    .bnr-newsletter-modal__footer {
        padding: 0 16px 16px 16px;
    }
}

/* Editor Preview Styles */
.bnr-newsletter-subscribe-block-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #f9f9f9;
    margin: 1rem 0;
}

.bnr-newsletter-subscribe-preview {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bnr-newsletter-preview-content h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.bnr-newsletter-preview-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.bnr-newsletter-preview-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.bnr-newsletter-preview-info strong {
    color: #333;
}

