/**
 * SEO Audit & Lead Pro - Minimalist Frontend Styles
 * Brand color: #3417B1
 */

:root {
    --seo-brand: #3417B1;
    --seo-brand-hover: #260e8e;
    --seo-brand-light: #f3effe;
    --seo-brand-glow: rgba(52, 23, 177, 0.15);
    
    --seo-good: #10b981;
    --seo-good-bg: #f0fdf4;
    --seo-good-border: #bbf7d0;

    --seo-warning: #f59e0b;
    --seo-warning-bg: #fffbeb;
    --seo-warning-border: #fef3c7;

    --seo-critical: #ef4444;
    --seo-critical-bg: #fef2f2;
    --seo-critical-border: #fecaca;

    --seo-dark: #0f172a;
    --seo-text: #334155;
    --seo-muted: #64748b;
    --seo-border: #e2e8f0;
    --seo-bg-subtle: #f8fafc;
}

.seo-audit-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    box-sizing: border-box;
    color: var(--seo-text);
}

.seo-audit-container *,
.seo-audit-container *::before,
.seo-audit-container *::after {
    box-sizing: border-box;
}

/* Card Container */
.seo-audit-card {
    background: #ffffff;
    border: 1px solid var(--seo-border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
    transition: all 0.25s ease;
}

/* Hero / Search Box */
.seo-search-box {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.seo-badge-tag {
    display: inline-block;
    background: var(--seo-brand-light);
    color: var(--seo-brand);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.seo-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--seo-dark);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.seo-subtitle {
    font-size: 15px;
    color: var(--seo-muted);
    margin: 0 auto 28px auto;
    max-width: 600px;
    line-height: 1.6;
}

/* Input Form */
.seo-form {
    margin: 0 auto;
    max-width: 680px;
}

.seo-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--seo-border);
    border-radius: 14px;
    padding: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.seo-input-wrapper:focus-within {
    border-color: var(--seo-brand);
    box-shadow: 0 0 0 4px var(--seo-brand-glow);
}

.seo-input-icon {
    font-size: 20px;
    padding: 0 12px;
}

.seo-input-wrapper input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 12px 8px !important;
    font-size: 15px !important;
    color: var(--seo-dark) !important;
    box-shadow: none !important;
    font-family: inherit;
}

.seo-input-wrapper input::placeholder {
    color: #94a3b8;
}

/* Primary Button */
.seo-btn-primary {
    background: var(--seo-brand) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px var(--seo-brand-glow) !important;
}

.seo-btn-primary:hover {
    background: var(--seo-brand-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--seo-brand-glow) !important;
}

.seo-btn-large {
    padding: 16px 36px !important;
    font-size: 16px !important;
    width: 100%;
}

.seo-trust-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    font-size: 13px;
    color: var(--seo-muted);
    flex-wrap: wrap;
}

/* Scanning State */
.seo-scanning {
    text-align: center;
    padding: 48px 24px;
}

.seo-radar-pulse {
    width: 50px;
    height: 50px;
    background: var(--seo-brand);
    border-radius: 50%;
    margin: 0 auto 20px auto;
    animation: seo-pulse 1.6s infinite ease-in-out;
}

@keyframes seo-pulse {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(52, 23, 177, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 25px rgba(52, 23, 177, 0);
    }
    100% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(52, 23, 177, 0);
    }
}

.seo-scanning-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--seo-dark);
    margin: 0 0 16px 0;
}

.seo-progress-bar-container {
    width: 100%;
    max-width: 450px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    margin: 0 auto 16px auto;
    overflow: hidden;
}

.seo-progress-bar {
    width: 20%;
    height: 100%;
    background: var(--seo-brand);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.seo-step-text {
    font-size: 14px;
    color: var(--seo-muted);
    margin: 0;
}

/* Error Box */
.seo-error-alert {
    background: var(--seo-critical-bg);
    border: 1px solid var(--seo-critical-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: #991b1b;
    font-size: 14px;
    font-weight: 600;
}

.seo-error-icon {
    font-size: 22px;
}

/* Overview Card */
.seo-overview-grid {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}

.seo-gauge-column {
    flex-shrink: 0;
    margin: 0 auto;
}

.seo-score-circle {
    position: relative;
    width: 140px;
    height: 140px;
}

.seo-circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s ease;
}

.circle.score-good { stroke: var(--seo-good); }
.circle.score-warning { stroke: var(--seo-warning); }
.circle.score-critical { stroke: var(--seo-critical); }

.seo-circle-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seo-score-number {
    font-size: 34px;
    font-weight: 900;
    color: var(--seo-dark);
    line-height: 1;
}

.seo-score-label {
    font-size: 11px;
    color: var(--seo-muted);
    margin-top: 4px;
}

.seo-meta-column {
    flex: 1;
    min-width: 260px;
}

.seo-audited-url-row {
    font-size: 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.seo-audited-url-row .url-label {
    color: var(--seo-muted);
}

.seo-audited-url-row .url-val {
    color: var(--seo-dark);
    background: var(--seo-bg-subtle);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--seo-border);
}

.seo-stats-summary-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pill-critical { background: var(--seo-critical-bg); color: #b91c1c; border: 1px solid var(--seo-critical-border); }
.pill-critical .pill-dot { background: var(--seo-critical); }

.pill-warning { background: var(--seo-warning-bg); color: #b45309; border: 1px solid var(--seo-warning-border); }
.pill-warning .pill-dot { background: var(--seo-warning); }

.pill-good { background: var(--seo-good-bg); color: #15803d; border: 1px solid var(--seo-good-border); }
.pill-good .pill-dot { background: var(--seo-good); }

.seo-quick-meta-row {
    display: flex;
    gap: 24px;
    border-top: 1px solid var(--seo-border);
    padding-top: 14px;
    font-size: 13px;
    color: var(--seo-muted);
}

.quick-meta-item .meta-value {
    color: var(--seo-dark);
    font-weight: 700;
    margin-right: 4px;
}

/* Checklist Tabs & Navigation */
.seo-checklist-section {
    margin-bottom: 24px;
}

.seo-checklist-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--seo-dark);
}

.seo-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    color: var(--seo-muted);
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #ffffff;
    color: var(--seo-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Checklist Cards */
.seo-checks-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.seo-check-card {
    background: #ffffff;
    border: 1px solid var(--seo-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
}

.seo-check-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.seo-check-card.check-good {
    border-right: 4px solid var(--seo-good);
}

.seo-check-card.check-warning {
    border-right: 4px solid var(--seo-warning);
}

.seo-check-card.check-critical {
    border-right: 4px solid var(--seo-critical);
}

.check-icon-col {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.check-body {
    flex: 1;
}

.check-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.check-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--seo-dark);
    margin: 0;
}

.check-score-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--seo-muted);
}

.check-value-desc {
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 6px;
    line-height: 1.5;
}

.check-rec-box {
    font-size: 12.5px;
    color: #334155;
    background: var(--seo-bg-subtle);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px dashed var(--seo-border);
    margin-top: 6px;
}

.check-rec-box strong {
    color: var(--seo-brand);
}

/* Gated Card */
.seo-gated-card {
    text-align: center;
    border: 2px dashed var(--seo-brand);
    background: #fcfbfe;
}

.gated-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.seo-gated-card h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--seo-dark);
}

.seo-gated-card p {
    font-size: 14px;
    color: var(--seo-muted);
    max-width: 550px;
    margin: 0 auto 20px auto;
    line-height: 1.6;
}

.lead-form-grid {
    display: flex;
    gap: 10px;
    max-width: 650px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.lead-form-grid input {
    flex: 1;
    min-width: 200px;
    padding: 12px 14px;
    border: 1px solid var(--seo-border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.lead-form-grid input:focus {
    border-color: var(--seo-brand);
}

/* CTA Lead Box */
.seo-cta-box {
    background: linear-gradient(135deg, #ffffff 0%, #f7f5ff 100%);
    border: 1.5px solid rgba(52, 23, 177, 0.18);
    position: relative;
}

.cta-header {
    text-align: center;
    margin-bottom: 24px;
}

.cta-badge {
    display: inline-block;
    background: var(--seo-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 10px;
}

.cta-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--seo-dark);
    margin: 0 0 8px 0;
}

.cta-header p {
    font-size: 14px;
    color: var(--seo-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.lead-inputs-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--seo-dark);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--seo-border);
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--seo-brand);
    box-shadow: 0 0 0 3px var(--seo-brand-glow);
}

.lead-action-row {
    margin-top: 20px;
    text-align: center;
}

.lead-result-msg {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.lead-result-msg.success {
    background: var(--seo-good-bg);
    color: #15803d;
    border: 1px solid var(--seo-good-border);
}

.lead-result-msg.error {
    background: var(--seo-critical-bg);
    color: #b91c1c;
    border: 1px solid var(--seo-critical-border);
}

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

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

/* Responsive queries */
@media (max-width: 680px) {
    .seo-audit-card {
        padding: 24px 18px;
    }
    .seo-title {
        font-size: 20px;
    }
    .seo-input-wrapper {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    .seo-btn-primary {
        width: 100%;
    }
    .seo-overview-grid {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .seo-checklist-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .seo-tabs {
        overflow-x: auto;
    }
}
