/* RiseOpp Frontend CSS */

.riseopp-seo-container {
    max-width: 700px;
    margin: 60px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1a1a1b;
}

.riseopp-seo-header {
    text-align: center;
    margin-bottom: 40px;
}

.riseopp-seo-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #111;
    letter-spacing: -0.5px;
}

.riseopp-seo-header p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.riseopp-form-group {
    margin-bottom: 24px;
}

/* Minimal Design: Hide Labels */
.riseopp-form-group label {
    display: none;
}

.riseopp-form-group textarea,
.riseopp-form-group input[type="text"],
.riseopp-form-group input[type="number"],
.riseopp-form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: #fdfdfd;
    color: #333;
    transition: all 0.2s ease;
    box-sizing: border-box;
    line-height: 1.5;
}

.riseopp-form-group textarea::placeholder,
.riseopp-form-group input::placeholder {
    color: #999;
}

.riseopp-form-group textarea {
    height: 140px;
    resize: vertical;
}

.riseopp-form-group textarea:focus,
.riseopp-form-group input:focus,
.riseopp-form-group select:focus {
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.08);
    outline: none;
}

.riseopp-form-row {
    display: flex;
    gap: 24px;
}

/* Flexbox clearfix isolation */
.riseopp-form-row::before,
.riseopp-form-row::after,
.riseopp-results-tabs::before,
.riseopp-results-tabs::after,
.riseopp-cta-buttons::before,
.riseopp-cta-buttons::after {
    display: none !important;
}

.riseopp-form-row .riseopp-form-group {
    flex: 1;
}

.riseopp-link-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    margin: 0 auto;
}

.riseopp-link-btn:hover {
    color: #2271b1;
}

.riseopp-advanced-toggle {
    margin-bottom: 25px;
    text-align: center;
}

.riseopp-advanced-content {
    background: #fafafa;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #f0f0f0;
}

/* Checkbox specific */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
    color: #444;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.riseopp-submit-btn {
    width: 100%;
    background: #2271b1;
    color: white;
    border: none;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.riseopp-submit-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.riseopp-submit-btn:active {
    transform: scale(0.99);
}

.riseopp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loader Styling */
.riseopp-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: riseopp-spin 1s ease-in-out infinite;
}

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

/* Results Area */
.riseopp-results-area {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.riseopp-results-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.riseopp-tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.riseopp-tab-btn:hover {
    background: #f5f5f5;
}

.riseopp-tab-btn.active {
    background: #007bff;
    color: #fff;
}

.riseopp-tab-content {
    display: none;
}

.riseopp-tab-content.active {
    display: block;
}

/* Result Cards */
.riseopp-result-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: border-color 0.2s;
}

.riseopp-result-card:hover {
    border-color: #007bff;
}

.riseopp-result-text {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 35px;
    padding-right: 40px;
    word-break: break-word;
}

.riseopp-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

/* Fix for staging/themes that inject pseudo-elements (like clearfixes) into flex containers */
.riseopp-result-meta::before,
.riseopp-result-meta::after {
    display: none !important;
}

.riseopp-char-count {
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f0f0;
}

.riseopp-char-count.warning {
    background: #fff3cd;
    color: #856404;
}

.riseopp-char-count.danger {
    background: #f8d7da;
    color: #721c24;
}

.riseopp-char-count.success {
    background: #d4edda;
    color: #155724;
}

.riseopp-copy-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    transition: all 0.2s;
}

.riseopp-copy-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.riseopp-copy-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.riseopp-copy-btn.copied {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

/* Pairings Section */
.riseopp-pair-card {
    background: #f8fbff;
    border: 1px solid #cce5ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.riseopp-pair-badge {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 15px;
}

.riseopp-pair-reason {
    font-size: 13px;
    font-style: italic;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #cce5ff;
}

.riseopp-note {
    font-size: 12px;
    color: #d63384;
    margin-top: 5px;
    font-family: monospace;
}

/* Error Message Styling */
.riseopp-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #991b1b;
}

/* Rate Limit Error */
.riseopp-rate-limit-error {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 25px;
    animation: riseopp-shake 0.5s ease-in-out;
}

@keyframes riseopp-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.riseopp-error-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.riseopp-error-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

.riseopp-error-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #9a3412;
}

.riseopp-error-content p {
    margin: 0 0 15px 0;
    color: #c2410c;
    line-height: 1.5;
}

.riseopp-retry-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    color: #9a3412;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.riseopp-retry-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    animation: riseopp-spin 2s linear infinite;
}

/* Captcha Error */
.riseopp-captcha-error {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 20px;
    color: #92400e;
}

.riseopp-captcha-error .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #d97706;
}

/* CTA Block */
.riseopp-cta-block {
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: riseopp-cta-glow 3s ease-in-out infinite alternate;
}

@keyframes riseopp-cta-glow {
    from {
        box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
    }

    to {
        box-shadow: 0 10px 60px rgba(59, 130, 246, 0.5);
    }
}

.riseopp-cta-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: riseopp-cta-shimmer 4s linear infinite;
}

@keyframes riseopp-cta-shimmer {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.riseopp-cta-headline {
    position: relative;
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.riseopp-cta-subtitle {
    position: relative;
    margin: 0 0 30px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.riseopp-cta-buttons {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.riseopp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.riseopp-cta-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.riseopp-cta-primary {
    background: #fff;
    color: #1e40af;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.riseopp-cta-primary:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.riseopp-cta-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.riseopp-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .riseopp-form-row {
        flex-direction: column;
        gap: 0;
    }

    .riseopp-rate-limit-error {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .riseopp-error-icon {
        margin: 0 auto;
    }

    .riseopp-cta-block {
        padding: 30px 20px;
    }

    .riseopp-cta-headline {
        font-size: 22px;
    }

    .riseopp-cta-buttons {
        flex-direction: column;
    }

    .riseopp-cta-btn {
        width: 100%;
        justify-content: center;
    }
}