/* ==========================================================================
   Eupnea Newsletter Discount - Frontend Styles
   ========================================================================== */

/* Inline form (shortcode & widget) */
.end-signup-form {
    max-width: 480px;
    margin: 24px auto;
}

.end-form-inner {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.end-form-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.end-form-text {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.5;
}

.end-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.end-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: none;
}

.end-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.end-submit {
    width: 100%;
    padding: 14px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
}

.end-submit:hover {
    background: #005d8c;
}

.end-submit:active {
    transform: scale(0.98);
}

.end-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

.end-message {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.end-message.end-success {
    background: #edf7ed;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.end-message.end-error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #f5c6cb;
}

.end-privacy {
    font-size: 12px;
    color: #999;
    margin: 12px 0 0;
}

/* Spinner on submit */
.end-submit.end-loading {
    position: relative;
    color: transparent;
}

.end-submit.end-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: end-spin 0.6s linear infinite;
}

@keyframes end-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Popup
   ========================================================================== */

.end-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.end-popup-overlay.end-visible {
    opacity: 1;
}

.end-popup {
    background: #ffffff;
    border-radius: 16px;
    max-width: 440px;
    width: 90%;
    padding: 40px 32px 32px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.end-popup-overlay.end-visible .end-popup {
    transform: translateY(0) scale(1);
}

.end-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.end-popup-close:hover {
    color: #333;
}

.end-popup-content {
    text-align: center;
}

.end-popup-icon {
    margin-bottom: 16px;
    color: #0073aa;
}

.end-popup-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.end-popup-text {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.5;
}

.end-popup .end-input {
    margin-bottom: 10px;
}

.end-popup .end-submit {
    margin-top: 4px;
}

.end-popup .end-privacy {
    font-size: 11px;
    margin-top: 16px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .end-popup {
        padding: 32px 20px 24px;
        margin: 16px;
    }

    .end-popup-title {
        font-size: 22px;
    }

    .end-form-inner {
        padding: 24px 16px;
    }
}
