/* Simple Paywall Public Styles */

/* ============================================
   MODAL OVERLAY E ESTRUTURA
   ============================================ */

.simple-paywall-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(3px);
}

.simple-paywall-modal-content {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.simple-paywall-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simple-paywall-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.simple-paywall-modal-close span {
    font-size: 28px;
    line-height: 1;
    color: #666;
}

.simple-paywall-modal-body {
    padding: 40px;
    min-height: 200px;
}

/* Previne scroll no body quando modal está aberto */
body.simple-paywall-modal-open {
    overflow: hidden;
}

/* ============================================
   LOADING E SPINNER
   ============================================ */

.simple-paywall-modal-loading,
.simple-paywall-loading {
    text-align: center;
    padding: 40px 20px;
}

.simple-paywall-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.simple-paywall-modal-loading p,
.simple-paywall-loading p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* ============================================
   EXCERPT E PAYWALL BOX
   ============================================ */

.simple-paywall-excerpt {
    position: relative;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.simple-paywall-box {
    background: linear-gradient(150deg, #667eea 0%, #3857ac 100%);
    color: #fff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

.simple-paywall-box h3 {
    margin-top: 0;
    font-size: 28px;
    font-weight: 700;
}

.simple-paywall-box p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.simple-paywall-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.simple-paywall-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: .3em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    text-transform: uppercase;
}

.simple-paywall-btn-primary {
    background: #fff;
    color: #667eea;
}

.simple-paywall-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.simple-paywall-btn-secondary {
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    border: 2px solid #fff;
}

.simple-paywall-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   SIGNUP FORM
   ============================================ */

.simple-paywall-signup {
    max-width: 100%;
}

.simple-paywall-signup h2 {
    text-align: center;
    margin: 0 0 30px 0;
    color: #333;
    font-size: 24px;
}

.simple-paywall-messages {
    margin-bottom: 20px;
}

.simple-paywall-form-group {
    margin-bottom: 20px;
}

.simple-paywall-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.simple-paywall-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.simple-paywall-form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.simple-paywall-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #f5c6cb;
    font-size: 14px;
}

.simple-paywall-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c3e6cb;
    font-size: 14px;
}

/* Botão de submit do formulário */
.simple-paywall-signup button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: linear-gradient(150deg, #667eea 0%, #3857ac 100%);
    color: #fff;
    border: none;
    border-radius: .3em;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: .2em;
}

.simple-paywall-signup button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.simple-paywall-signup button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   PAYMENT STEP
   ============================================ */

.simple-paywall-form-step-2 {
    display: none;
}

.simple-paywall-payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.simple-paywall-payment-info p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

#paypal-button-container {
    margin-top: 20px;
    min-height: 150px;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */

.simple-paywall-success-message {
    text-align: center;
    padding: 40px 20px;
}

.simple-paywall-success-message .success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: #fff;
    font-size: 48px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.simple-paywall-success-message h2 {
    color: #28a745;
    margin: 20px 0 10px;
}

.simple-paywall-success-message p {
    color: #666;
    font-size: 16px;
    margin: 10px 0;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.simple-paywall-profile {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.simple-paywall-profile-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.simple-paywall-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.simple-paywall-profile-info h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.simple-paywall-profile-info p {
    margin: 5px 0;
    color: #666;
}

.simple-paywall-status-badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.simple-paywall-subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-item label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 5px;
}

.detail-item span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   LOGIN FORM
   ============================================ */

.simple-paywall-login-form {
    max-width: 100%;
}

.simple-paywall-login-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: linear-gradient(150deg, #667eea 0%, #3857ac 100%);
    color: #fff;
    border: none;
    border-radius: .3em;
    font-size: 16px;
    /* font-weight: 600; */
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: .2em;
}

.simple-paywall-login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .simple-paywall-modal-content {
        margin: 20px auto;
    }
    
    .simple-paywall-modal-body {
        padding: 30px 20px;
    }
    
    .simple-paywall-box {
        padding: 30px 20px;
    }
    
    .simple-paywall-box h3 {
        font-size: 22px;
    }
    
    .simple-paywall-box p {
        font-size: 16px;
    }
    
    .simple-paywall-buttons {
        flex-direction: column;
    }
    
    .simple-paywall-btn {
        width: 100%;
    }
    
    .simple-paywall-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .simple-paywall-subscription-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .simple-paywall-modal-overlay {
        padding: 10px;
    }
    
    .simple-paywall-modal-content {
        margin: 10px auto;
    }
    
    .simple-paywall-modal-body {
        padding: 20px 15px;
    }
    
    .simple-paywall-signup h2 {
        font-size: 20px;
    }
    
    .simple-paywall-box h3 {
        font-size: 20px;
    }
    
    .simple-paywall-box p {
        font-size: 14px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.simple-paywall-text-center {
    text-align: center;
}

.simple-paywall-mt-20 {
    margin-top: 20px;
}

.simple-paywall-mb-20 {
    margin-bottom: 20px;
}

/* Esconde elementos por padrão */
.simple-paywall-form-step-1,
.simple-paywall-form-step-2 {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}