/* ============================================================
   Barrierefreiheit Scanner — Design System
   Light + Dark Mode (high contrast)
   ============================================================ */

:root {
    --brand: #0071E3;
    --brand-hover: rgba(0,113,227,0.08);
    --text-1: #1D1D1F;
    --text-2: #6E6E73;
    --text-3: #86868B;
    --bg: #FFFFFF;
    --surface: #F5F5F7;
    --surface-raised: #FFFFFF;
    --border: rgba(0,0,0,0.08);
    --border-md: rgba(0,0,0,0.14);
    --radius-card: 16px;
    --radius-btn: 980px;
    --radius-input: 12px;
    --tr: 0.25s ease;
    --max-w: 980px;

    --sev-critical: #DC2626;
    --sev-serious: #D97706;
    --sev-moderate: #CA8A04;
    --sev-minor: #86868B;
    --score-good-1: #059669; --score-good-2: #34D399;
    --score-warn-1: #D97706; --score-warn-2: #FBBF24;
    --score-bad-1: #DC2626;  --score-bad-2: #F87171;
}

/* ============================================================ */
html { scroll-behavior: smooth; }

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
    font-size: 17px; line-height: 1.47; font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg); color: var(--text-1);
    margin: 0; padding: 0;
}

::selection { background: rgba(0,113,227,0.2); }

/* ============================================================
   Typography (MudBlazor overrides)
   ============================================================ */
.mud-typography-h1 { font-size: 56px !important; font-weight: 700 !important; letter-spacing: -0.015em !important; line-height: 1.07 !important; }
.mud-typography-h2 { font-size: 40px !important; font-weight: 600 !important; letter-spacing: -0.01em !important; line-height: 1.1 !important; }
.mud-typography-h3 { font-size: 28px !important; font-weight: 600 !important; line-height: 1.15 !important; }
.mud-typography-h4 { font-size: 22px !important; font-weight: 600 !important; }
.mud-typography-h5 { font-size: 19px !important; font-weight: 600 !important; }
.mud-typography-h6 { font-size: 17px !important; font-weight: 600 !important; }
.mud-typography-subtitle1 { font-size: 19px !important; font-weight: 500 !important; }
.mud-typography-body1 { font-size: 17px !important; line-height: 1.47 !important; }
.mud-typography-body2 { font-size: 15px !important; line-height: 1.47 !important; }
.mud-typography-caption { font-size: 13px !important; }

/* ============================================================
   MudBlazor Component Overrides
   ============================================================ */
.mud-card {
    border-radius: var(--radius-card) !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
    background: var(--surface-raised) !important;
}
.mud-button-root {
    border-radius: var(--radius-btn) !important;
    text-transform: none !important; font-weight: 500 !important;
    letter-spacing: 0 !important; padding: 10px 22px !important;
    transition: all var(--tr) !important;
}
.mud-button-root.mud-button-filled { box-shadow: none !important; }
.mud-button-root.mud-button-filled:hover { box-shadow: none !important; filter: brightness(1.12); }
.mud-button-root.mud-button-outlined { border-width: 1.5px !important; }
.mud-button-root.mud-button-size-large { padding: 14px 30px !important; font-size: 17px !important; }
.mud-button-root.mud-button-size-small { padding: 6px 16px !important; font-size: 14px !important; }
.mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: var(--radius-input) !important; }
.mud-paper { border-radius: var(--radius-card) !important; }
.mud-chip { border-radius: var(--radius-btn) !important; font-weight: 500 !important; }
.mud-table-container { border-radius: var(--radius-card) !important; box-shadow: none !important; border: 1px solid var(--border) !important; }
.mud-table .mud-table-row:hover { background: var(--brand-hover) !important; }
.mud-expand-panel { border-radius: var(--radius-card) !important; box-shadow: none !important; border: 1px solid var(--border) !important; margin-bottom: 8px !important; }
.mud-alert { border-radius: var(--radius-input) !important; }

/* (z-index fixes moved to end of file) */

/* ============================================================
   AppBar — Glassmorphism
   ============================================================ */
.appbar-glass {
    background: rgba(255,255,255,0.95) !important;
    border-bottom: 1px solid var(--border) !important;
}
.appbar-glass .mud-button-root.mud-button-text { color: var(--text-1) !important; font-weight: 400 !important; }
.appbar-glass .mud-button-root.mud-button-text:hover { background: var(--brand-hover) !important; }
.appbar-glass .mud-button-root.mud-button-filled { color: #fff !important; }
.appbar-glass .mud-icon-button { color: var(--text-3) !important; }
.appbar-brand {
    font-weight: 600; font-size: 19px; letter-spacing: -0.3px;
    text-decoration: none; color: var(--text-1);
}

/* ============================================================
   Content offset for fixed AppBar
   ============================================================ */
.mud-main-content { padding-top: 64px !important; }

/* ============================================================
   MudSwitch fix — prevent pill radius from breaking switch
   ============================================================ */
.mud-switch { border-radius: 0 !important; }
.mud-switch .mud-button-root { border-radius: 0 !important; padding: 0 !important; }
.mud-switch-track { border-radius: 14px !important; }
.mud-switch-thumb { border-radius: 50% !important; }

/* ============================================================
   Admin Sub-Nav — proper stacking below AppBar
   ============================================================ */
.admin-subnav {
    display: flex; gap: 4px; padding: 16px 0;
    border-bottom: 1px solid var(--border); margin-bottom: 32px;
    flex-wrap: wrap; position: relative; z-index: 1;
}

/* ============================================================
   Hero
   ============================================================ */
.hero { text-align: center; padding: 64px 20px 48px; max-width: var(--max-w); margin: 0 auto; }
.hero .subtitle { opacity: 0; animation: fadeInUp 0.8s ease 0.15s forwards; }
.hero .scan-form { opacity: 0; animation: fadeInUp 0.8s ease 0.3s forwards; max-width: 680px; margin: 40px auto 0; }
@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
.fade-in-up { animation: fadeInUp 0.8s ease forwards; }

/* ============================================================
   Score Gradient
   ============================================================ */
.hero-score { font-size: 96px; font-weight: 700; letter-spacing: -3px; line-height: 1; display: inline-block; }
.score-good { background: linear-gradient(135deg, var(--score-good-1), var(--score-good-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.score-warn { background: linear-gradient(135deg, var(--score-warn-1), var(--score-warn-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.score-bad  { background: linear-gradient(135deg, var(--score-bad-1),  var(--score-bad-2));  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ============================================================
   Severity Cards
   ============================================================ */
.severity-card {
    border-radius: var(--radius-card); padding: 20px 24px; margin-bottom: 12px;
    background: var(--surface-raised); border: 1px solid var(--border);
    border-left: 4px solid var(--sev-minor);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.severity-card:hover { transform: translateY(-1px); border-color: var(--border-md); }
.severity-card.severity-critical { border-left-color: var(--sev-critical); }
.severity-card.severity-serious  { border-left-color: var(--sev-serious); }
.severity-card.severity-moderate { border-left-color: var(--sev-moderate); }

/* ============================================================
   Pill Links
   ============================================================ */
.pill-link {
    display: inline-flex; align-items: center; padding: 9px 20px;
    border-radius: var(--radius-btn); border: 1.5px solid var(--border-md);
    color: var(--text-1); text-decoration: none; font-size: 15px; font-weight: 500;
    background: transparent; transition: all var(--tr);
}
.pill-link:hover { background: var(--brand-hover); border-color: var(--brand); color: var(--brand); }

/* ============================================================
   Trust Bar
   ============================================================ */
.trust-bar { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; padding:20px 0; color: var(--text-3); font-size:14px; }
.trust-sep { opacity: 0.4; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 100px 0; }
.section-sm { padding: 50px 0; }
.prose { max-width: 720px; margin: 0 auto; }

/* ============================================================
   Fix-Suggestion Box (used in ScanProgress, SEO pages)
   ============================================================ */
.fix-box {
    padding: 12px 16px; border-radius: 10px;
    background: rgba(0,113,227,0.05); border: 1px solid rgba(0,113,227,0.1);
}

/* Code snippets */
.code-snip {
    display: block; font-size: 12px; padding: 8px 12px; border-radius: 8px;
    background: var(--surface); color: var(--text-2);
    font-family: "SF Mono", "Fira Code", monospace; overflow: auto; max-height: 60px;
}

/* Category headers in violation lists */
.cat-header {
    font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-3); margin: 24px 0 12px;
}

/* ============================================================
   SEO Pages (shared styles for CmsCheck + BranchCheck)
   ============================================================ */
.seo-heading { font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--text-1); }
.seo-subtext { line-height: 1.65; color: var(--text-2); }
.seo-section-title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-1); margin-bottom: 16px; }

.seo-card {
    border: 1px solid var(--border); border-radius: 18px; padding: 32px;
    background: var(--surface);
}

.seo-issue-card {
    padding: 20px 24px; border-radius: var(--radius-card);
    background: var(--surface-raised); border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.seo-tip-row {
    display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px;
    background: var(--surface); border-radius: 12px; margin-bottom: 8px;
}
.seo-tip-num {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.seo-tip-text { font-size: 15px; line-height: 1.6; color: var(--text-1); }

/* FAQ */
details.faq-item {
    border-radius: 12px; background: var(--surface); overflow: hidden; margin-bottom: 8px;
}
details.faq-item summary {
    padding: 16px 20px; font-size: 15px; font-weight: 500; color: var(--text-1);
    cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
    content: "+"; font-size: 22px; font-weight: 300; color: var(--text-3);
    transition: transform var(--tr); flex-shrink: 0; margin-left: 16px;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item[open] { background: var(--brand-hover); }
details.faq-item p { padding: 0 20px 16px; font-size: 14px; line-height: 1.65; color: var(--text-2); margin: 0; }

/* BFSG explanation box (BranchCheck) */
.bfsg-explain {
    border-left: 4px solid var(--brand); border-radius: 0 16px 16px 0;
    padding: 28px 32px; background: var(--brand-hover);
}

/* ============================================================
   Auth Form Fields
   ============================================================ */
.form-field { text-align: left; }
.form-field label { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-field input {
    width: 100%; padding: 12px 16px; font-size: 17px; font-family: inherit;
    border: 1.5px solid var(--border-md); border-radius: var(--radius-input);
    background: var(--bg); color: var(--text-1); outline: none; box-sizing: border-box;
    transition: border-color var(--tr), box-shadow var(--tr);
}
.form-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
.form-field input::placeholder { color: var(--text-3); opacity: 0.7; }

/* Auth card */
.auth-card {
    border: 1px solid var(--border); border-radius: 18px;
    background: var(--surface-raised); padding: 40px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border); padding: 32px 0; text-align: center;
    color: var(--text-3); font-size: 13px; margin-top: 60px;
}
.site-footer a { color: var(--text-3); text-decoration: none; margin: 0 14px; transition: color var(--tr); }
.site-footer a:hover { color: var(--brand); }

/* ============================================================
   Dashboard Website Cards
   ============================================================ */
.website-card {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.website-card:hover {
    transform: translateY(-2px); border-color: var(--border-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Score pills */
.score-pill {
    font-size: 15px; font-weight: 700; min-width: 44px; height: 44px;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.score-high { background: rgba(52,199,89,0.12); color: #34C759; }
.score-mid  { background: rgba(255,149,0,0.12); color: #FF9500; }
.score-low  { background: rgba(255,59,48,0.12); color: #FF3B30; }
.score-none { background: var(--surface); color: var(--text-3); }

/* ============================================================
   Severity Chips (HTML native, not MudChip)
   ============================================================ */
.sev-chip {
    display: inline-flex; align-items: center; padding: 4px 12px;
    border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.sev-chip-critical { background: #FF3B30; color: white; }
.sev-chip-serious  { background: #FF9500; color: white; }
.sev-chip-moderate { background: #FFCC00; color: #1a1a1a; }
.sev-chip-minor    { background: var(--text-3); color: white; }
.sev-chip-pass     { background: #34C759; color: white; }

/* ============================================================
   Scan Pulse Animation
   ============================================================ */
.scan-pulse {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--brand);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 var(--brand); }
    50% { transform: scale(1.15); opacity: 0.85; box-shadow: 0 0 0 20px transparent; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================================
   Gated Content (Free-Scan → Register CTA)
   ============================================================ */
.gated-content {
    text-align: center; padding: 48px 24px; margin: 32px 0;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.gated-icon { font-size: 48px; margin-bottom: 16px; }
.gated-title { font-size: 22px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.gated-text { font-size: 15px; color: var(--text-2); max-width: 480px; margin: 0 auto 24px; line-height: 1.6; }
.gated-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.violations-blurred {
    position: relative; max-height: 280px; overflow: hidden;
}
.violations-blurred::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 160px;
    background: linear-gradient(transparent, var(--bg) 80%); pointer-events: none;
}

/* ============================================================
   Prose Content (rendered Markdown)
   ============================================================ */
.prose-content h2 { font-size:28px; font-weight:600; margin:40px 0 16px; color:var(--text-1); letter-spacing:-0.02em; }
.prose-content h3 { font-size:22px; font-weight:600; margin:32px 0 12px; color:var(--text-1); }
.prose-content p { line-height:1.7; margin-bottom:20px; color:var(--text-1); }
.prose-content a { color:var(--brand); text-decoration:none; }
.prose-content a:hover { text-decoration:underline; }
.prose-content ul, .prose-content ol { padding-left:24px; margin-bottom:20px; line-height:1.7; }
.prose-content li { margin-bottom:8px; color:var(--text-1); }
.prose-content blockquote {
    border-left:4px solid var(--brand); padding:16px 24px;
    background:var(--surface); border-radius:0 12px 12px 0;
    margin:24px 0; color:var(--text-2); font-style:italic;
}
.prose-content code {
    background:var(--surface); padding:2px 8px; border-radius:6px;
    font-size:15px; font-family:"SF Mono","Fira Code",monospace;
}
.prose-content pre code {
    display:block; padding:20px; border-radius:12px; background:var(--surface);
    overflow-x:auto; font-size:14px; border:1px solid var(--border);
}
.prose-content table { width:100%; border-collapse:collapse; margin:24px 0; }
.prose-content th {
    background:var(--surface); font-weight:600; text-align:left;
    padding:12px 16px; border-bottom:2px solid var(--border);
}
.prose-content td { padding:12px 16px; border-bottom:1px solid var(--border); }
.prose-content img { max-width:100%; border-radius:12px; margin:24px 0; display:block; }
.prose-content hr { border:none; height:1px; background:var(--border); margin:40px 0; }
.prose-content strong { font-weight:600; color:var(--text-1); }

/* Blog tag pills */
.tag-pill {
    display:inline-block; padding:3px 10px; border-radius:var(--radius-btn);
    background:var(--surface); color:var(--text-2); font-size:12px; font-weight:500;
    margin-right:4px;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 600px) {
    .mud-typography-h2 { font-size: 28px !important; }
    .mud-typography-h3 { font-size: 22px !important; }
    .hero-score { font-size: 72px; letter-spacing: -2px; }
    .hero { padding: 40px 16px 32px; }
    .section { padding: 60px 0; }
    .section-sm { padding: 30px 0; }
    .trust-bar { gap: 4px; font-size: 13px; }
    .seo-section-title { font-size: 20px; }
}

/* ============================================================
   Pricing Cards
   ============================================================ */
.pricing-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 1100px; margin: 0 auto;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card {
    border: 1px solid var(--border); border-radius: 20px; padding: 32px 24px;
    background: var(--surface-raised); display: flex; flex-direction: column;
}
.pricing-card.featured { border-color: var(--brand); border-width: 2px; position: relative; }
.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--brand); color: white; font-size: 13px; font-weight: 600;
    padding: 4px 16px; border-radius: 980px;
}
.pricing-amount { font-size: 48px; font-weight: 700; color: var(--text-1); letter-spacing: -2px; }
.pricing-period { font-size: 15px; color: var(--text-3); font-weight: 400; }
.pricing-features { list-style: none; padding: 0; margin: 24px 0; flex: 1; }
.pricing-features li {
    padding: 8px 0; font-size: 15px; color: var(--text-2);
    display: flex; align-items: center; gap: 10px;
}
.pricing-features li::before { content: "\2713"; color: #34C759; font-weight: 700; }
.pricing-features li.disabled::before { content: "\2717"; color: var(--text-3); }
.pricing-features li.disabled { color: var(--text-3); }

/* ============================================================
   Revenue Cards (Admin Dashboard)
   ============================================================ */
.revenue-card {
    background: rgba(52,199,89,0.04);
    border: 1px solid rgba(52,199,89,0.15);
    border-radius: 16px;
    padding: 24px;
}
.revenue-card .revenue-value {
    font-size: 36px;
    font-weight: 700;
    color: #34C759;
    letter-spacing: -1px;
}
.revenue-card .revenue-label {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 4px;
}
.revenue-card .revenue-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 8px;
}

/* ============================================================
   Cookie Banner (DSGVO)
   ============================================================ */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--surface-raised); border-top: 1px solid var(--border);
    padding: 20px 24px; box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    animation: slideUp 0.4s ease forwards;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.cookie-banner-inner {
    max-width: 980px; margin: 0 auto;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cookie-banner-text {
    flex: 1; font-size: 14px; line-height: 1.5;
    color: var(--text-2); min-width: 280px;
}
.cookie-banner-actions {
    display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap;
}
@media (max-width: 600px) {
    .cookie-banner-inner { flex-direction: column; }
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .mud-button-root { flex: 1; }
}

/* ============================================================
   Z-Index Stacking Order
   ============================================================ */
.mud-appbar {
    z-index: 1100 !important;
}
