/**
 * WiPay SEO Audit - Frontend Styles
 */

/* Main Wrapper */
.wipay-seo-audit-wrapper {
    max-width: 800px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Form Container */
.wipay-seo-form-container {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.wipay-seo-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.wipay-seo-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Form Input Group */
.wipay-seo-input-group {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.wipay-seo-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.wipay-seo-input:focus {
    outline: none;
    border-color: #0066cc;
}

.wipay-seo-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0066cc;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.wipay-seo-button:hover:not(:disabled) {
    background: #0052a3;
}

.wipay-seo-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Preview Section */
.wipay-seo-preview {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 400px;
}

.wipay-seo-preview-content {
    padding: 40px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.preview-header h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 0;
}

/* Score Circle */
.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid;
    position: relative;
}

.score-circle.good {
    border-color: #22c55e;
    color: #22c55e;
}

.score-circle.average {
    border-color: #f59e0b;
    color: #f59e0b;
}

.score-circle.poor {
    border-color: #ef4444;
    color: #ef4444;
}

.score-value {
    font-size: 32px;
    font-weight: 700;
}

.score-label {
    font-size: 14px;
    color: #666;
}

/* Preview Summary */
.preview-summary h4,
.preview-issues h4 {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.preview-summary ul {
    list-style: none;
    padding: 0;
}

.preview-summary li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Blur Content */
.blur-content {
    position: relative;
}

.blurred-text {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    margin-top: 20px;
    color: #999;
}


/* Modal */
.wipay-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px 0;
}

.wipay-modal-content {
    background-color: #fff;
    margin: 40px auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Paywall-specific modal adjustments */
.paywall-modal-content {
    max-width: 540px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.wipay-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    font-weight: normal;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 100;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
}

.wipay-modal-close:hover {
    color: #333;
    background: #f5f5f5;
}

.wipay-modal-content h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

/* Paywall Content */
.paywall-content {
    padding: 36px 32px 28px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.paywall-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.paywall-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.audit-website-url {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    word-break: break-word;
}

/* Preview Box */
.audit-preview-box {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 20px;
    margin: 0 0 20px 0;
    width: 100%;
    max-width: 400px;
}

.preview-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.audit-score-display {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin: 8px 0;
}

/* Score color classes */
.audit-score-display.score-excellent {
    color: #22c55e;
}

.audit-score-display.score-good {
    color: #16a34a;
}

.audit-score-display.score-average {
    color: #f59e0b;
}

.audit-score-display.score-poor {
    color: #ef4444;
}

.audit-grade-display {
    font-size: 20px;
    font-weight: 600;
    color: #4a5568;
    margin-top: 4px;
}

/* Processing Message */
.audit-processing {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #856404;
}

/* Paywall CTA */
.paywall-cta {
    font-size: 15px;
    color: #666;
    margin: 0 0 16px 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Price */
.paywall-price {
    font-size: 56px;
    font-weight: 700;
    color: #0066cc;
    margin: 0 0 20px 0;
    line-height: 1;
}

/* Features */
.paywall-features {
    width: 100%;
    text-align: left;
    margin: 0 0 24px 0;
}

.feature-item {
    padding: 8px 0;
    font-size: 15px;
    color: #333;
    line-height: 1.4;
}

/* Buttons */
.paywall-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.wipay-seo-unlock-btn,
.wipay-seo-cancel-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.wipay-seo-unlock-btn {
    background: #0066cc;
    color: #fff;
}

.wipay-seo-unlock-btn:hover {
    background: #0052a3;
}

.wipay-seo-cancel-btn {
    background: #e5e7eb;
    color: #6b7280;
}

.wipay-seo-cancel-btn:hover {
    background: #d1d5db;
}

/* Footer */
.paywall-footer {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    width: 100%;
}

.author-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.author-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Checkout Modal Content */
.wipay-modal-content h3 {
    padding: 36px 32px 0 32px;
}

/* Checkout Summary */
.checkout-summary {
    background: #f8f9fb;
    padding: 20px;
    border-radius: 8px;
    margin: 0 32px 24px 32px;
}

.item-details strong {
    font-size: 17px;
    color: #333;
}

.audit-url {
    color: #0066cc;
    margin: 5px 0;
    word-break: break-all;
    font-size: 14px;
}

.price-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.price-details strong {
    font-size: 24px;
    color: #0066cc;
}

/* Checkout Form */
.wipay-checkout-form {
    padding: 0 32px 32px 32px;
}

.wipay-checkout-form .form-row {
    margin-bottom: 18px;
}

.wipay-checkout-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wipay-checkout-form input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.wipay-checkout-form input:focus {
    outline: none;
    border-color: #0066cc;
}

.payment-info {
    text-align: center;
    margin: 20px 0;
    padding: 14px;
    background: #f8f9fb;
    border-radius: 8px;
}

.accepted-payment-methods {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.accepted-cards {
    margin-bottom: 8px;
}

.secure-text {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
}

.wipay-checkout-submit {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0066cc;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.wipay-checkout-submit:hover:not(:disabled) {
    background: #0052a3;
}

.wipay-checkout-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.wipay-seo-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 16px;
}

.wipay-seo-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.wipay-seo-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .wipay-seo-form-container {
        padding: 30px 20px;
    }

    .wipay-seo-input-group {
        flex-direction: column;
    }

    .wipay-seo-button {
        width: 100%;
    }

    .preview-header {
        flex-direction: column;
        gap: 20px;
    }

    .wipay-modal {
        padding: 10px 0;
    }

    .wipay-modal-content {
        margin: 20px auto;
        width: 95%;
    }

    .paywall-modal-content {
        max-height: calc(100vh - 40px);
    }

    .paywall-content {
        padding: 28px 20px 20px 20px;
    }

    .paywall-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .paywall-title {
        font-size: 18px;
    }

    .audit-score-display {
        font-size: 60px;
    }

    .paywall-price {
        font-size: 48px;
    }

    .paywall-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .wipay-seo-unlock-btn,
    .wipay-seo-cancel-btn {
        width: 100%;
    }

    .checkout-summary,
    .wipay-checkout-form {
        padding-left: 20px;
        padding-right: 20px;
    }

    .wipay-modal-content h3 {
        padding: 28px 20px 0 20px;
        font-size: 20px;
    }

    .feature-item {
        font-size: 14px;
        padding: 6px 0;
    }
}

@media (max-width: 480px) {
    .paywall-content {
        padding: 24px 16px 16px 16px;
    }

    .audit-score-display {
        font-size: 52px;
    }

    .paywall-price {
        font-size: 42px;
        margin-bottom: 16px;
    }

    .paywall-footer {
        padding-top: 12px;
    }

    .author-link {
        font-size: 12px;
    }
}
