/* Recast Paywall Styles */

/* Post-level paywall */
.recast-paywall-post {
    position: relative;
    min-height: 400px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recast-paywall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
    backdrop-filter: blur(10px);
    z-index: 1;
}

.recast-paywall-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recast-paywall-summary {
    flex: 1;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #333;
}

.recast-paywall-summary p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.recast-paywall-wall {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    color: white;
    text-align: center;
}

.recast-paywall-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.9;
}

.recast-paywall-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.recast-paywall-pricing {
    margin-bottom: 2rem;
}

.recast-paywall-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.recast-paywall-status {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

.recast-paywall-actions {
    margin-top: auto;
}

.recast-paywall-button {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 200px;
}

.recast-paywall-button-primary {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recast-paywall-button-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.recast-paywall-login-prompt p {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

.recast-paywall-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Block-level paywall (streamlined) */
.recast-paywall-block {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.recast-paywall-block-content {
    max-width: 500px;
    margin: 0 auto;
}

.recast-paywall-block-summary {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: #6c757d;
}

.recast-paywall-block-summary p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.recast-paywall-block-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.recast-paywall-block-pricing {
    margin-bottom: 0.5rem;
}

.recast-paywall-block-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
}

.recast-paywall-block-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.recast-paywall-block-button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Error state */
.recast-paywall-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .recast-paywall-post {
        min-height: 300px;
    }
    
    .recast-paywall-content {
        padding: 1.5rem;
    }
    
    .recast-paywall-wall {
        padding: 1.5rem;
    }
    
    .recast-paywall-title {
        font-size: 1.5rem;
    }
    
    .recast-paywall-price {
        font-size: 2rem;
    }
    
    .recast-paywall-button {
        padding: 0.875rem 1.5rem;
        min-width: 160px;
    }
    
    .recast-paywall-block {
        padding: 1rem;
    }
    
    .recast-paywall-block-button {
        padding: 0.625rem 1.25rem;
        min-width: 140px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .recast-paywall-post {
        background: #1a1a1a;
        color: #fff;
    }
    
    .recast-paywall-overlay {
        background: linear-gradient(
            135deg,
            rgba(26, 26, 26, 0.95) 0%,
            rgba(26, 26, 26, 0.8) 50%,
            rgba(26, 26, 26, 0.6) 100%
        );
    }
    
    .recast-paywall-summary {
        color: #e0e0e0;
    }
    
    .recast-paywall-block {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .recast-paywall-block-summary {
        color: #b0b0b0;
    }
    
    .recast-paywall-block-price {
        color: #e0e0e0;
    }
    
    .recast-paywall-error {
        background: #2d1b1b;
        color: #f8d7da;
        border-color: #4a2c2c;
    }
}

/* Animation for paywall appearance */
@keyframes paywallFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recast-paywall-post,
.recast-paywall-block {
    animation: paywallFadeIn 0.3s ease-out;
}

/* Loading state */
.recast-paywall-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}

.recast-paywall-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
