/* SEO Analyzer — Frontend Styles */

.riseopp-analyzer-container {
    max-width: 780px;
    margin: 60px auto;
    padding: 48px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.07);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1b;
}

/* ── Header ─────────────────────────────────── */
.riseopp-analyzer-header {
    text-align: center;
    margin-bottom: 40px;
}

.riseopp-analyzer-header h2 {
    font-size: 34px;
    font-weight: 800;
    color: #111;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.riseopp-analyzer-header p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
    margin: 0 auto;
}

/* ── URL Input Row ───────────────────────────── */
.riseopp-analyzer-input-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    align-items: center;
}

/* Suppress theme clearfix pseudo-elements that break flex layouts */
.riseopp-analyzer-input-row::before,
.riseopp-analyzer-input-row::after {
    display: none !important;
}

.riseopp-analyzer-input-row input[type="text"] {
    flex: 1 1 auto;
    min-width: 0; /* prevents input from overflowing flex container */
    padding: 16px 20px;
    border: 2px solid #e2e4e7;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: #fdfdfd;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    height: 56px;
}

.riseopp-analyzer-input-row input[type="text"]::placeholder {
    color: #aaa;
}

.riseopp-analyzer-input-row input[type="text"]:focus {
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 4px 14px rgba(34, 113, 177, 0.1);
    outline: none;
}

.riseopp-analyzer-btn {
    flex: 0 0 auto; /* never grow or shrink */
    background: #2271b1;
    color: #fff !important;
    border: none;
    padding: 0 28px;
    height: 56px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 0;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(34, 113, 177, 0.25);
    white-space: nowrap;
    line-height: 1;
    vertical-align: middle;
    text-decoration: none;
}

/* Suppress theme pseudo-elements on button */
.riseopp-analyzer-btn::before,
.riseopp-analyzer-btn::after {
    display: none !important;
}

.riseopp-analyzer-btn:hover {
    background: #1a5a90;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(34, 113, 177, 0.3);
    color: #fff !important;
}

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

.riseopp-analyzer-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.riseopp-analyzer-btn-text {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    white-space: nowrap;
    line-height: 1;
}

/* Suppress theme pseudo-elements inside btn-text */
.riseopp-analyzer-btn-text::before,
.riseopp-analyzer-btn-text::after {
    display: none !important;
}

.riseopp-analyzer-btn-text .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    vertical-align: middle;
    flex-shrink: 0;
}

.riseopp-analyzer-hint {
    font-size: 13px;
    color: #999;
    margin: 10px 0 0;
    text-align: center;
}

/* ── Spinner (button) ────────────────────────── */
.riseopp-loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #fff;
    animation: riseopp-spin 0.8s linear infinite;
}

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

/* ── Loading State ───────────────────────────── */
.riseopp-analyzer-loading {
    margin-top: 40px;
    padding: 36px;
    background: #f8faff;
    border: 1px solid #dce8f5;
    border-radius: 16px;
    text-align: center;
    animation: riseopp-fade-in 0.3s ease-out;
}

.riseopp-analyzer-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.riseopp-analyzer-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid #dce8f5;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: riseopp-spin 0.9s linear infinite;
}

.riseopp-analyzer-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 340px;
    text-align: left;
}

.riseopp-analyzer-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #aaa;
    transition: color 0.3s;
}

.riseopp-analyzer-step.active {
    color: #2271b1;
    font-weight: 600;
}

.riseopp-analyzer-step.done {
    color: #28a745;
}

.riseopp-analyzer-step .step-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.riseopp-analyzer-step .step-text {
    flex: 1;
}

.riseopp-analyzer-step .step-status {
    font-size: 16px;
    width: 18px;
    height: 18px;
}

/* ── Error State ─────────────────────────────── */
.riseopp-analyzer-error {
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 18px 20px;
    color: #991b1b;
    font-size: 14px;
    animation: riseopp-fade-in 0.3s ease-out;
}

.riseopp-analyzer-error .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #dc2626;
    margin-top: 1px;
}

/* ── Results ─────────────────────────────────── */
.riseopp-analyzer-results {
    margin-top: 40px;
    animation: riseopp-fade-in 0.4s ease-out;
}

.riseopp-reanalyze-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin-bottom: 28px;
    transition: color 0.2s;
}
.riseopp-reanalyze-link:hover { color: #2271b1; }
.riseopp-reanalyze-link .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ── Score Section ───────────────────────────── */
.riseopp-score-section {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: #f8faff;
    border: 1px solid #dce8f5;
    border-radius: 16px;
    margin-bottom: 24px;
}
.riseopp-score-section::before,
.riseopp-score-section::after { display: none !important; }

.riseopp-score-wrap {
    position: relative;
    flex-shrink: 0;
    width: 150px;
    height: 150px;
}
.riseopp-score-svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}
.riseopp-score-track {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 10;
}
.riseopp-score-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.4s ease;
}
.riseopp-score-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.riseopp-score-num {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    letter-spacing: -1px;
}
.riseopp-score-label-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
    max-width: min-content;
    text-align: center;
}

.riseopp-score-summary { flex: 1; min-width: 0; }
.riseopp-score-summary h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
}
.riseopp-score-summary p {
    font-size: 14px;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

/* ── Section Cards (Accordion) ───────────────── */
.riseopp-analyzer-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.riseopp-section-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.riseopp-section-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.riseopp-section-card.status-good   { border-left: 4px solid #22c55e; }
.riseopp-section-card.status-warning{ border-left: 4px solid #f97316; }
.riseopp-section-card.status-error  { border-left: 4px solid #ef4444; }

.riseopp-section-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    background: #fff;
    user-select: none;
    transition: background 0.15s;
}
.riseopp-section-header::before,
.riseopp-section-header::after { display: none !important; }
.riseopp-section-header:hover { background: #fafbff; }

.riseopp-section-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.riseopp-section-status-dot.status-good    { background: #22c55e; }
.riseopp-section-status-dot.status-warning { background: #f97316; }
.riseopp-section-status-dot.status-error   { background: #ef4444; }

.riseopp-section-icon {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    color: #6b7280;
    flex-shrink: 0;
}
.riseopp-section-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #111;
}
.riseopp-section-chevron {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    color: #9ca3af;
    transition: transform 0.25s;
    flex-shrink: 0;
}
.riseopp-section-card.open .riseopp-section-chevron {
    transform: rotate(180deg);
}

.riseopp-section-body {
    padding: 0 20px 20px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

/* ── Analysis text block ─────────────────────── */
.riseopp-analysis-text {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 16px 0 0;
}

/* ── Metadata subsections ────────────────────── */
.riseopp-meta-item {
    padding-top: 16px;
}
.riseopp-meta-item + .riseopp-meta-item {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
}
.riseopp-meta-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7280;
    margin-bottom: 10px;
}
.riseopp-meta-label::before,
.riseopp-meta-label::after { display: none !important; }
.riseopp-meta-label .dashicons { font-size: 14px !important; width: 14px !important; height: 14px !important; }

.riseopp-status-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.riseopp-status-chip.status-good    { background: #dcfce7; color: #16a34a; }
.riseopp-status-chip.status-warning { background: #ffedd5; color: #c2410c; }
.riseopp-status-chip.status-error   { background: #fee2e2; color: #dc2626; }

.riseopp-meta-value-box {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}
.riseopp-meta-value-box::before,
.riseopp-meta-value-box::after { display: none !important; }

.riseopp-meta-value-text { flex: 1; word-break: break-word; }
.riseopp-char-badge {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    align-self: flex-start;
}
.riseopp-char-badge.good    { background: #dcfce7; color: #16a34a; }
.riseopp-char-badge.warning { background: #ffedd5; color: #c2410c; }
.riseopp-char-badge.error   { background: #fee2e2; color: #dc2626; }

.riseopp-suggestion-box {
    display: flex !important;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 10px;
}
.riseopp-suggestion-box::before,
.riseopp-suggestion-box::after { display: none !important; }
.riseopp-suggestion-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    padding-top: 1px;
}
.riseopp-suggestion-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

/* ── Issue / Recommendation lists ────────────── */
.riseopp-list-block { margin-top: 14px; }

.riseopp-list-heading {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 8px;
}
.riseopp-list-heading::before,
.riseopp-list-heading::after { display: none !important; }
.riseopp-list-heading .dashicons { font-size: 14px !important; width: 14px !important; height: 14px !important; }

.riseopp-issues-heading  { color: #b45309; }
.riseopp-issues-heading .dashicons { color: #f97316; }
.riseopp-recs-heading    { color: #15803d; }
.riseopp-recs-heading .dashicons { color: #22c55e; }
.riseopp-opps-heading    { color: #1d4ed8; }
.riseopp-opps-heading .dashicons { color: #3b82f6; }

.riseopp-issues-list,
.riseopp-recs-list,
.riseopp-opps-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.riseopp-issues-list li,
.riseopp-recs-list li,
.riseopp-opps-list li {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    padding: 5px 0 5px 20px;
    position: relative;
    border-bottom: 1px solid #f3f4f6;
}
.riseopp-issues-list li:last-child,
.riseopp-recs-list li:last-child,
.riseopp-opps-list li:last-child { border-bottom: none; }

.riseopp-issues-list li::before { content: '✕'; color: #ef4444; position: absolute; left: 0; font-size: 11px; top: 7px; }
.riseopp-recs-list li::before   { content: '✓'; color: #22c55e; position: absolute; left: 0; font-size: 11px; top: 7px; }
.riseopp-opps-list li::before   { content: '→'; color: #3b82f6; position: absolute; left: 0; font-size: 11px; top: 7px; }

/* Content strengths/weaknesses */
.riseopp-sw-grid {
    display: flex !important;
    gap: 16px;
    margin-top: 14px;
}
.riseopp-sw-grid::before,
.riseopp-sw-grid::after { display: none !important; }
.riseopp-sw-col { flex: 1; min-width: 0; }
.riseopp-sw-col-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 8px;
    display: flex !important;
    align-items: center !important;
    gap: 5px;
}
.riseopp-sw-col-label::before,
.riseopp-sw-col-label::after { display: none !important; }
.riseopp-strengths-label { color: #15803d; }
.riseopp-weaknesses-label { color: #b91c1c; }
.riseopp-sw-list { margin: 0; padding: 0; list-style: none; }
.riseopp-sw-list li {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    padding: 4px 0 4px 18px;
    position: relative;
}
.riseopp-strengths-list li::before  { content: '●'; color: #22c55e; position: absolute; left: 0; font-size: 8px; top: 8px; }
.riseopp-weaknesses-list li::before { content: '●'; color: #ef4444; position: absolute; left: 0; font-size: 8px; top: 8px; }

.riseopp-intent-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    background: #e0f2fe;
    color: #0369a1;
}

/* Image alt coverage bar */
.riseopp-coverage-bar-wrap {
    margin-top: 14px;
}
.riseopp-coverage-label {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}
.riseopp-coverage-label::before,
.riseopp-coverage-label::after { display: none !important; }
.riseopp-coverage-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.riseopp-coverage-fill {
    height: 100%;
    border-radius: 4px;
    background: #22c55e;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Quick Wins ──────────────────────────────── */
.riseopp-quick-wins {
    margin-bottom: 28px;
}
.riseopp-quick-wins-title {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
    display: flex !important;
    align-items: center !important;
    gap: 8px;
}
.riseopp-quick-wins-title::before,
.riseopp-quick-wins-title::after { display: none !important; }
.riseopp-wins-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.riseopp-win-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
}
.riseopp-win-card::before,
.riseopp-win-card::after { display: none !important; }
.riseopp-win-priority {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
}
.riseopp-win-priority::before,
.riseopp-win-priority::after { display: none !important; }
.riseopp-win-content { flex: 1; min-width: 0; }
.riseopp-win-action {
    font-size: 14px;
    color: #111;
    line-height: 1.5;
    margin: 0 0 8px;
}
.riseopp-win-badges {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
}
.riseopp-win-badges::before,
.riseopp-win-badges::after { display: none !important; }
.riseopp-win-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.riseopp-win-badge.impact-high   { background: #dcfce7; color: #15803d; }
.riseopp-win-badge.impact-medium { background: #fef9c3; color: #854d0e; }
.riseopp-win-badge.impact-low    { background: #f1f5f9; color: #475569; }
.riseopp-win-badge.effort-high   { background: #fee2e2; color: #b91c1c; }
.riseopp-win-badge.effort-medium { background: #ffedd5; color: #9a3412; }
.riseopp-win-badge.effort-low    { background: #dcfce7; color: #15803d; }

/* ── CTA ─────────────────────────────────────── */
.riseopp-analyzer-cta {
    margin-top: 36px;
    padding: 40px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 60%, #0ea5e9 100%);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.riseopp-analyzer-cta::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 50%);
    animation: riseopp-spin 12s linear infinite;
}
.riseopp-analyzer-cta-headline {
    position: relative;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 28px;
}
.riseopp-analyzer-cta-btns {
    position: relative;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}
.riseopp-analyzer-cta-btns::before,
.riseopp-analyzer-cta-btns::after { display: none !important; }
.riseopp-analyzer-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    white-space: nowrap;
}
.riseopp-analyzer-cta-btn::before,
.riseopp-analyzer-cta-btn::after { display: none !important; }
.riseopp-analyzer-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
.riseopp-analyzer-cta-btn .dashicons { font-size: 18px !important; width: 18px !important; height: 18px !important; }

.riseopp-cta-btn-primary {
    background: #fff;
    color: #1e40af !important;
}
.riseopp-cta-btn-primary:hover { color: #1e40af !important; }

.riseopp-cta-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.6);
}
.riseopp-cta-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    color: #fff !important;
}

/* ── Mobile (results) ────────────────────────── */
@media (max-width: 600px) {
    .riseopp-score-section {
        flex-direction: column;
        text-align: center;
    }
    .riseopp-sw-grid {
        flex-direction: column !important;
    }
    .riseopp-analyzer-cta { padding: 28px 20px; }
    .riseopp-analyzer-cta-headline { font-size: 18px; }
    .riseopp-analyzer-cta-btns { flex-direction: column !important; align-items: center; }
    .riseopp-analyzer-cta-btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ── Shared Animations ───────────────────────── */
@keyframes riseopp-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 600px) {
    .riseopp-analyzer-container {
        padding: 28px 20px;
        margin: 20px auto;
    }

    .riseopp-analyzer-header h2 {
        font-size: 26px;
    }

    .riseopp-analyzer-input-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .riseopp-analyzer-input-row input[type="text"] {
        width: 100%;
    }

    .riseopp-analyzer-btn {
        width: 100%;
        justify-content: center;
        height: 52px;
    }
}
