/**
 * Estilos Frontend - Joinet Newsletter
 * Author: Israel Rivas
 */

/* === FORMULARIO SHORTCODE === */
#joinet-newsletter-form {
    background: linear-gradient(135deg, #E50914, #B20710);
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
    margin: 20px 0;
}

#joinet-newsletter-form .jn-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

#joinet-newsletter-form .jn-subtitle {
    color: #f0f0f0;
    font-size: 14px;
    margin: 0 0 20px 0;
    opacity: 0.9;
}

#joinet-newsletter-form .jn-input-group {
    display: flex;
    max-width: 450px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#joinet-newsletter-form .jn-email-input {
    flex-grow: 1;
    height: 44px;
    padding: 0 15px;
    border: none;
    background: #ffffff;
    color: #333333;
    font-size: 15px;
    outline: none;
    font-family: inherit;
}

#joinet-newsletter-form .jn-email-input::placeholder {
    color: #999999;
}

#joinet-newsletter-form .jn-submit-button {
    height: 44px;
    padding: 0 20px;
    border: none;
    background-color: #333333;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
}

#joinet-newsletter-form .jn-submit-button:hover {
    background-color: #1a1a1a;
}

#joinet-newsletter-form .jn-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#joinet-newsletter-form .jn-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

#joinet-newsletter-form .jn-message.success {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#joinet-newsletter-form .jn-message.error {
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.4);
}

/* === POPUP === */
.joinet-newsletter-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.joinet-newsletter-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.joinet-newsletter-popup {
    background: #ffffff;
    max-width: 500px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
}

.joinet-newsletter-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.joinet-newsletter-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.joinet-newsletter-popup-header {
    background: linear-gradient(135deg, #E50914, #B20710);
    padding: 40px 30px;
    text-align: center;
    color: #ffffff;
}

.joinet-newsletter-popup-header h2 {
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

.joinet-newsletter-popup-header p {
    margin: 0;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.5;
}

.joinet-newsletter-popup-body {
    padding: 30px;
}

.joinet-newsletter-popup-body .jn-description {
    font-size: 15px;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 25px 0;
    text-align: center;
}

.joinet-newsletter-popup-form {
    max-width: 100%;
}

.joinet-newsletter-popup-form .jn-input-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.joinet-newsletter-popup-form .jn-email-input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    border: 2px solid #e5e5e5;
    border-right: none;
    background: #ffffff;
    color: #333333;
    font-size: 15px;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    border-radius: 8px 0 0 8px;
}

.joinet-newsletter-popup-form .jn-email-input:focus {
    border-color: #E50914;
}

.joinet-newsletter-popup-form .jn-submit-button {
    height: 50px;
    padding: 0 30px;
    border: none;
    background-color: #E50914;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    border-radius: 0 8px 8px 0;
}

.joinet-newsletter-popup-form .jn-submit-button:hover {
    background-color: #B20710;
}

.joinet-newsletter-popup-form .jn-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.joinet-newsletter-popup-form .jn-terms {
    font-size: 12px;
    color: #999999;
    text-align: center;
    margin: 10px 0 0 0;
    line-height: 1.5;
}

.joinet-newsletter-popup-form .jn-terms a {
    color: #E50914;
    text-decoration: none;
}

.joinet-newsletter-popup-form .jn-terms a:hover {
    text-decoration: underline;
}

.joinet-newsletter-popup-form .jn-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.joinet-newsletter-popup-form .jn-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.joinet-newsletter-popup-form .jn-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === ANIMACIONES === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    #joinet-newsletter-form {
        padding: 25px 20px;
    }

    #joinet-newsletter-form .jn-title {
        font-size: 20px;
    }

    #joinet-newsletter-form .jn-input-group {
        flex-direction: column;
    }

    #joinet-newsletter-form .jn-email-input {
        border-radius: 8px 8px 0 0;
        height: 48px;
    }

    #joinet-newsletter-form .jn-submit-button {
        border-radius: 0 0 8px 8px;
        height: 48px;
    }

    /* Popup responsive */
    .joinet-newsletter-popup {
        width: 95%;
        max-width: 95%;
    }

    .joinet-newsletter-popup-header {
        padding: 30px 20px;
    }

    .joinet-newsletter-popup-header h2 {
        font-size: 22px;
    }

    .joinet-newsletter-popup-body {
        padding: 25px 20px;
    }

    .joinet-newsletter-popup-form .jn-input-group {
        flex-direction: column;
    }

    .joinet-newsletter-popup-form .jn-email-input {
        border-radius: 8px;
        border: 2px solid #e5e5e5;
        margin-bottom: 10px;
    }

    .joinet-newsletter-popup-form .jn-submit-button {
        border-radius: 8px;
        width: 100%;
    }
}
