/*
 * Owner decision (2026-10-05): each theme's error pages in its own colours. Laravel drew every theme's
 * 404 in the Summit navy/blue of error-pages.css; these overrides take the palette of the theme's own
 * CSS (final.css tokens). Summit keeps the base palette.
 */

/* Owner decision (2026-10-05): no gradients on buttons and bars in any theme (Summit too). */
html.site-template-summit .error-topbar { background: #1e3a8a; }
html.site-template-summit .error-panel__link--primary { background: #1d4ed8; }
html.site-template-summit .error-panel__link--primary:hover { background: #1e40af; }
html.site-template-summit .error-panel__switch-btn { background: #1d4ed8; }

/* aurum — navy ink + gold */
html.site-template-aurum {
  --error-brand: #0a1018;
  --error-brand-mid: #24324a;
  --error-accent: #b08a3c;
  --error-accent-deep: #8c6a2a;
  --error-accent-soft: #d4b46a;
  --error-accent-wash: #f7f3ea;
  --error-teal: #b08a3c;
  --error-teal-light: #ecdcb4;
  --error-navy: #0a1018;
  --error-border: #e8e0cf;
  --error-surface: #fbf9f4;
}

/* anadolu — terracotta */
html.site-template-anadolu {
  --error-brand: #1f1410;
  --error-brand-mid: #5c1d18;
  --error-accent: #7a2e1e;
  --error-accent-deep: #5c1d18;
  --error-accent-soft: #e8b49a;
  --error-accent-wash: #f7f2ea;
  --error-teal: #b45309;
  --error-teal-light: #f3d9b4;
  --error-navy: #1f1410;
  --error-border: #eadfd2;
  --error-surface: #fbf8f3;
}

/* efes — pine green + sand */
html.site-template-efes {
  --error-brand: #121a16;
  --error-brand-mid: #1e3329;
  --error-accent: #2f4a3c;
  --error-accent-deep: #1e3329;
  --error-accent-soft: #c4b49a;
  --error-accent-wash: #f6f3ec;
  --error-teal: #3d5c4a;
  --error-teal-light: #d8e2d6;
  --error-navy: #121a16;
  --error-border: #e5ddd0;
  --error-surface: #f9f7f2;
}

/* germiyan — teal (Laravel catalogue: «klasik kongre, teal odak») */
html.site-template-germiyan {
  --error-brand: #002b32;
  --error-brand-mid: #0f766e;
  --error-accent: #0d9488;
  --error-accent-deep: #115e59;
  --error-accent-soft: #5eead4;
  --error-accent-wash: #f0fdfa;
  --error-teal: #0d9488;
  --error-teal-light: #ccfbf1;
  --error-navy: #002b32;
  --error-border: #d5ece8;
  --error-surface: #f7fcfb;
}

/* marmara — navy + ivory */
html.site-template-marmara {
  --error-brand: #0e1c36;
  --error-brand-mid: #1e3a5f;
  --error-accent: #1a3654;
  --error-accent-deep: #0e1c36;
  --error-accent-soft: #c9a28f;
  --error-accent-wash: #f7f4ef;
  --error-teal: #7a4030;
  --error-teal-light: #ead3c8;
  --error-navy: #0e1c36;
  --error-border: #e6e0d6;
  --error-surface: #faf8f4;
}

/*
 * The base sheet paints these parts with literal Summit colours; for the other themes they follow the
 * variables above (Summit keeps the original rules untouched).
 */
html:not(.site-template-summit) .error-topbar {
  background: var(--error-brand);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--error-brand) 22%, transparent);
  border-bottom-color: color-mix(in srgb, var(--error-accent) 55%, transparent);
}
html:not(.site-template-summit) .error-topbar__logo span,
html:not(.site-template-summit) .error-panel__badge,
html:not(.site-template-summit) .error-foot a {
  color: var(--error-accent-soft);
}
html:not(.site-template-summit) .error-topbar__home {
  border-color: color-mix(in srgb, var(--error-accent-soft) 45%, transparent);
}
html:not(.site-template-summit) .error-topbar__home:hover {
  background: color-mix(in srgb, var(--error-accent) 28%, transparent);
  border-color: var(--error-accent-soft);
}
html:not(.site-template-summit) .error-stage__mesh {
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, color-mix(in srgb, var(--error-accent) 16%, transparent), transparent 60%),
    radial-gradient(ellipse 45% 35% at 80% 10%, color-mix(in srgb, var(--error-brand-mid) 12%, transparent), transparent 55%),
    linear-gradient(180deg, var(--error-accent-wash) 0%, var(--error-surface) 100%);
}
html:not(.site-template-summit) .error-panel {
  border-color: var(--error-teal-light);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--error-brand) 10%, transparent);
}
html:not(.site-template-summit) .error-panel__visual {
  background: linear-gradient(160deg, var(--error-navy) 0%, var(--error-brand) 35%, var(--error-brand-mid) 75%, var(--error-accent) 120%);
}
html:not(.site-template-summit) .error-panel__path {
  background: var(--error-accent-wash);
  border-color: var(--error-teal-light);
}
html:not(.site-template-summit) .error-panel__link:hover {
  border-color: var(--error-accent-soft);
  background: var(--error-accent-wash);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--error-accent) 12%, transparent);
}
html:not(.site-template-summit) .error-panel__link--primary {
  background: var(--error-brand-mid);
}
html:not(.site-template-summit) .error-panel__link--primary:hover {
  background: var(--error-accent-deep);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--error-accent) 28%, transparent);
}
html:not(.site-template-summit) .error-panel__link-icon {
  background: var(--error-accent-wash);
}
html:not(.site-template-summit) .error-panel__link--primary .error-panel__link-icon {
  color: var(--error-brand-mid);
}
html:not(.site-template-summit) .error-foot {
  background: var(--error-brand);
  border-top-color: color-mix(in srgb, var(--error-accent) 55%, transparent);
}
html:not(.site-template-summit) .error-panel__switch-btn {
  background: var(--error-accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--error-accent) 35%, transparent);
}
html:not(.site-template-summit) .error-panel__switch-btn:hover {
  box-shadow: 0 6px 18px color-mix(in srgb, var(--error-accent) 40%, transparent);
}

/* ege — deep sea + teal, orange actions (final.css --ege-* tokens) */
html.site-template-ege {
  --error-brand: #0f1f26;
  --error-brand-mid: #17303a;
  --error-accent: #0a7490;
  --error-accent-deep: #075c73;
  --error-accent-soft: #7fb3c4;
  --error-accent-wash: #eef6f8;
  --error-teal: #0a7490;
  --error-teal-light: #cfe4ea;
  --error-navy: #0f1f26;
  --error-border: #dbe4e8;
  --error-surface: #f5f8f9;
}
html.site-template-ege .error-panel__link--primary { background: #c8500c; }
html.site-template-ege .error-panel__link--primary:hover { background: #a8430a; }
html.site-template-ege .error-panel__link--primary .error-panel__link-icon { color: #c8500c; }

/* kapadokya — pdr.org.tr charcoal, red actions, light blue (final.css --kapadokya-* tokens) */
html.site-template-kapadokya {
  --error-brand: #1f1f1e;
  --error-brand-mid: #3c3c3b;
  --error-accent: #0e7a8a;
  --error-accent-deep: #0b6673;
  --error-accent-soft: #7ad0dc;
  --error-accent-wash: #eef8fa;
  --error-teal: #0e7a8a;
  --error-teal-light: #d3eef2;
  --error-navy: #1f1f1e;
  --error-border: #e2e8f0;
  --error-surface: #f7f8fa;
}
html.site-template-kapadokya .error-panel__link--primary { background: #c01018; }
html.site-template-kapadokya .error-panel__link--primary:hover { background: #9a0d13; }
html.site-template-kapadokya .error-panel__link--primary .error-panel__link-icon { color: #c01018; }

/* karadeniz — navy ground, green actions, blue accents (final.css --karadeniz-* tokens) */
html.site-template-karadeniz {
  --error-brand: #071f3f;
  --error-brand-mid: #0f3d73;
  --error-accent: #1763b5;
  --error-accent-deep: #114f8f;
  --error-accent-soft: #9cc7f2;
  --error-accent-wash: #eef4fb;
  --error-teal: #1763b5;
  --error-teal-light: #d8e7f7;
  --error-navy: #071f3f;
  --error-border: #e2e8f0;
  --error-surface: #f3f7fb;
}
html.site-template-karadeniz .error-panel__link--primary { background: #0e7c50; }
html.site-template-karadeniz .error-panel__link--primary:hover { background: #0a5f3d; }
html.site-template-karadeniz .error-panel__link--primary .error-panel__link-icon { color: #0e7c50; }

/* akdeniz — sea blue ground, coral actions, sand (final.css --akdeniz-* tokens) */
html.site-template-akdeniz {
  --error-brand: #052a40;
  --error-brand-mid: #0b4a6e;
  --error-accent: #0a7ea8;
  --error-accent-deep: #086a8f;
  --error-accent-soft: #9fd6ec;
  --error-accent-wash: #eef7fb;
  --error-teal: #0a7ea8;
  --error-teal-light: #d6eef7;
  --error-navy: #052a40;
  --error-border: #e6dccb;
  --error-surface: #faf6ef;
}
html.site-template-akdeniz .error-panel__link--primary { background: #c94a25; }
html.site-template-akdeniz .error-panel__link--primary:hover { background: #a83a1b; }
html.site-template-akdeniz .error-panel__link--primary .error-panel__link-icon { color: #c94a25; }

/* Karadeniz / Akdeniz (owner 2026-10-30: «köşeler 2px, hap yok»): the error pages' card, fields and buttons too
   (error-pages.css rounds them 10–20px, the pill button 999px). */
html:is(.site-template-karadeniz, .site-template-akdeniz) :is(.error-topbar__home, .error-panel, .error-panel__path, .error-panel__link, .error-panel__link-icon, .error-card__main, .error-card__btn, .error-panel__notice, .error-panel__switch-btn) {
  border-radius: 2px;
}

/* «Siteye dön» / «Back to site» stays on one line on phones; the site name beside it gives way. */
.error-topbar__logo { min-width: 0; }
.error-topbar__home { flex-shrink: 0; white-space: nowrap; }

/* —— «Site is updating» (503): the congress's logo, a status line and the retry countdown —— */
.error-panel--maint .error-panel__visual { justify-content: space-between; }
.error-panel__brand-logo {
  display: block;
  max-width: 11rem;
  max-height: 4.5rem;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.25rem;
}
.error-panel__brand-name {
  display: block;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}
.error-panel__maint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.75rem;
  border-radius: 2px;
  font-size: 1.35rem;
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.22);
}
.error-panel__status {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 1.1rem 0 1.25rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  color: var(--error-navy, #0f172a);
  background: var(--error-accent-wash, #eff6ff);
  border: 1px solid var(--error-teal-light, #dbeafe);
  border-radius: 2px;
}
.error-panel__status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--error-accent, #1d4ed8);
  animation: cp-maint-pulse 1.6s ease-in-out infinite;
}
.error-panel__status-track {
  grid-column: 1 / -1;
  height: 3px;
  background: color-mix(in srgb, var(--error-accent, #1d4ed8) 15%, transparent);
  overflow: hidden;
}
.error-panel__status-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--error-accent, #1d4ed8);
  transition: width 1s linear;
}
.error-panel__contact {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: #475569;
}
.error-panel__contact a { color: var(--error-accent-deep, #1e40af); font-weight: 600; }
.error-panel__code-note {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}
@keyframes cp-maint-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .error-panel__status-dot { animation: none; }
  .error-panel__status-bar { transition: none; }
}
