/**
 * CEP Newsletter — Frontend CSS
 */

/* === Footer Form === */
.cep-nl-footer-form {
    transition: background-color 0.3s ease;
}
.cep-nl-footer-form input[type="text"],
.cep-nl-footer-form input[type="email"] {
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.cep-nl-footer-form input:focus {
    border-color: rgba(255,255,255,0.6) !important;
}
.cep-nl-footer-form button[type="submit"] {
    font-size: 15px;
    transition: opacity 0.2s;
}
.cep-nl-footer-form button[type="submit"]:hover {
    opacity: 0.85;
}
.cep-nl-footer-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Popup Overlay === */
.cep-nl-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: cep-nl-fade-in 0.3s ease;
}
.cep-nl-popup-overlay.closing {
    animation: cep-nl-fade-out 0.3s ease forwards;
}

.cep-nl-popup {
    position: relative;
    max-width: 420px;
    width: calc(100% - 40px);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    animation: cep-nl-slide-up 0.3s ease;
}
.cep-nl-popup-close {
    position: absolute;
    top: 8px; right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    line-height: 1;
    padding: 4px;
}
.cep-nl-popup-close:hover {
    opacity: 1;
}

.cep-nl-popup h3 {
    font-size: 22px;
    margin-bottom: 8px;
}
.cep-nl-popup p {
    margin-bottom: 16px;
    line-height: 1.5;
}
.cep-nl-popup input[type="text"],
.cep-nl-popup input[type="email"] {
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.cep-nl-popup input:focus {
    border-color: #2271b1;
    outline: none;
}
.cep-nl-popup button[type="submit"]:hover {
    opacity: 0.9;
}
.cep-nl-popup button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Form Messages === */
.cep-nl-form-message {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}
.cep-nl-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.cep-nl-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === Preferences Page === */
.cep-nl-preferences {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
}
.cep-nl-prefs-table {
    width: 100%;
    border-collapse: collapse;
}
.cep-nl-prefs-table th {
    text-align: left;
    padding: 10px 12px;
    vertical-align: top;
    font-weight: 600;
    width: 140px;
    color: #333;
}
.cep-nl-prefs-table td {
    padding: 10px 12px;
}
.cep-nl-prefs-table input[type="text"],
.cep-nl-prefs-table input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.cep-nl-prefs-table input:focus {
    border-color: #2271b1;
    outline: none;
}
.cep-nl-prefs-save {
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
}
.cep-nl-prefs-message {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
}
.cep-nl-prefs-message.success {
    background: #d4edda; color: #155724; border: 1px solid #c3e6cb;
}
.cep-nl-prefs-message.error {
    background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb;
}
.cep-nl-unsubscribe-section {
    padding-top: 8px;
}
.cep-nl-unsubscribe-btn:hover {
    background: #dc3232 !important;
    color: #fff !important;
}

/* === Animations === */
@keyframes cep-nl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes cep-nl-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes cep-nl-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* === Responsive === */
@media (max-width: 480px) {
    .cep-nl-popup {
        padding: 24px 20px;
    }
    .cep-nl-preferences {
        padding: 12px;
    }
    .cep-nl-prefs-table th {
        width: auto;
        display: block;
        padding-bottom: 2px;
    }
    .cep-nl-prefs-table td {
        display: block;
        padding-top: 0;
    }
}
