/* ============================================================
   Technical SEO Checker – Main Stylesheet
   ============================================================ */

:root {
    --primary:   #2563eb;
    --success:   #16a34a;
    --warning:   #d97706;
    --danger:    #dc2626;
    --secondary: #6b7280;
    --dark:      #111827;
    --light-bg:  #f9fafb;
}

/* ── Base ── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--light-bg);
    color: #1f2937;
}

/* ── Hero Section ── */
.hero-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}
.hero-section h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; }
.hero-section .lead { font-size: 1.15rem; opacity: .85; }

/* ── URL Input Card ── */
.scan-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    padding: 2rem;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}
.scan-card .form-control {
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    padding: .75rem 1rem;
    border: 2px solid #e5e7eb;
    transition: border-color .2s;
}
.scan-card .form-control:focus { border-color: var(--primary); box-shadow: none; }
.scan-card .btn-primary {
    border-radius: 0 8px 8px 0;
    padding: .75rem 1.5rem;
    font-weight: 600;
}
.scan-card select.form-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

/* ── Feature Cards ── */
.feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform .2s, box-shadow .2s;
    height: 100%;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.feature-icon {
    width: 56px; height: 56px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ── Progress / Scanning ── */
.scan-progress-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    padding: 2rem;
}
.scan-stage {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.scan-stage:last-child { border-bottom: none; }
.stage-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.stage-spinner { width: 20px; height: 20px; }
.stage-name { flex: 1; font-weight: 500; }
.stage-status { font-size: .8rem; }

/* ── Results Dashboard ── */
.summary-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    padding: 1.5rem;
    text-align: center;
    border-top: 4px solid var(--primary);
}
.summary-card.passed  { border-color: var(--success); }
.summary-card.errors  { border-color: var(--danger); }
.summary-card.warnings { border-color: var(--warning); }
.summary-card .number { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.summary-card .label  { font-size: .85rem; color: var(--secondary); margin-top: .3rem; }

.score-circle {
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800;
    margin: 0 auto;
}
.score-circle.good    { background: #dcfce7; color: var(--success); border: 6px solid var(--success); }
.score-circle.average { background: #fef3c7; color: var(--warning); border: 6px solid var(--warning); }
.score-circle.poor    { background: #fee2e2; color: var(--danger);  border: 6px solid var(--danger); }

/* ── Issue Table ── */
.issue-row { transition: background .15s; }
.issue-row:hover { background: #f0f7ff !important; }
.issue-detail-box {
    background: #f8fafc;
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: .75rem 1rem;
    margin-top: .5rem;
    font-size: .875rem;
}
.detected-val {
    background: #fee2e2;
    border-radius: 4px;
    padding: .15rem .4rem;
    font-family: monospace;
    font-size: .85rem;
}
.recommended-val {
    background: #dcfce7;
    border-radius: 4px;
    padding: .15rem .4rem;
    font-family: monospace;
    font-size: .85rem;
}

/* ── Tab Nav ── */
.nav-tabs .nav-link { color: #374151; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--primary); font-weight: 600; }

/* ── Performance Gauges ── */
.perf-score {
    width: 90px; height: 90px; border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700;
    border: 5px solid;
}
.perf-score.good   { border-color: #22c55e; color: #16a34a; background: #f0fdf4; }
.perf-score.needs  { border-color: #f59e0b; color: #b45309; background: #fffbeb; }
.perf-score.poor   { border-color: #ef4444; color: #dc2626; background: #fef2f2 ; }
.perf-score.na     { border-color: #9ca3af; color: #6b7280; background: #f9fafb; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-section { padding: 50px 0 80px; }
    .scan-card { margin-top: -20px; }
    .summary-card .number { font-size: 2rem; }
}

/* ── Misc utilities ── */
.font-mono { font-family: monospace; }
.text-wrap-break { word-break: break-all; }
.truncate-url { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.table td, .table th { vertical-align: middle; }
.badge-lg { font-size: .85rem; padding: .4em .7em; }

/* ── Alert box for non-Google score note ── */
.score-disclaimer {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .85rem;
    color: #1d4ed8;
}

/* ── SEOquake Compliance UI Styles ── */
.compliance-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    overflow: hidden;
    margin-bottom: 2rem;
}
.compliance-header {
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.compliance-row {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}
.compliance-row:hover {
    background: #fbfcfe;
}
.compliance-row:last-child {
    border-bottom: none;
}
.compliance-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.compliance-icon.passed {
    background: #10b981;
    color: #fff;
}
.compliance-icon.error {
    background: #ef4444;
    color: #fff;
}
.compliance-icon.warning {
    background: #f59e0b;
    color: #fff;
}
.compliance-icon.not_checked {
    background: #9ca3af;
    color: #fff;
}
.compliance-title {
    font-weight: 700;
    font-size: 0.98rem;
    color: #111827;
    margin-bottom: 2px;
}
.compliance-desc {
    color: #4b5563;
    font-size: 0.88rem;
    margin-bottom: 6px;
    line-height: 1.4;
}
.compliance-pill {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    max-width: 100%;
    word-break: break-all;
    border: 1px solid #e5e7eb;
}
.badge-status {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.35em 0.75em;
    border-radius: 4px;
}
.badge-status.error {
    background: #fee2e2;
    color: #dc2626;
}
.badge-status.passed {
    background: #dcfce7;
    color: #15803d;
}
.badge-status.warning {
    background: #fef3c7;
    color: #b45309;
}
.badge-status.not_checked {
    background: #f3f4f6;
    color: #6b7280;
}
.tips-toggle-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tips-toggle-btn:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #9ca3af;
}
.tips-drawer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 0.85rem;
    font-size: 0.88rem;
}
.tips-drawer.error {
    border-left-color: #ef4444;
}
.tips-drawer.warning {
    border-left-color: #f59e0b;
}
.tips-drawer.passed {
    border-left-color: #10b981;
}
.filter-pill-btn {
    border-radius: 20px;
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
}


