:root {
  /* Dark & Light Baselines */
  --bg: #0a0a0a;
  --bg-2: #0e0e0e;
  --bg-3: #ffffff;
  --card: #161616;
  --card-2: #1c1c1c;
  --card-bg: #161b22;
  --line: rgba(255, 255, 255, 0.08);
  --white: #ffffff;
  --muted: #9a9a9a;
  --muted-2: #6f6f6f;

  /* Accent & Category Colors */
  --gold: #D6A93C;
  --gold-bright: #E8C766;
  --c-kultur: #9B3FC4;
  /* Kultur & Musik – Violett */
  --c-business: #2D7DD2;
  /* Community & Business – Blau */
  --c-sport: #5B9E42;
  /* Sport & Bewegung – Grün */
  --c-food: #E8531F;
  /* Food & Lifestyle – Orange */

  --bg-primary: #ff1a1a;
  --text-light: #ffffff;
  --text-muted: #a0aec0;
  --btn-bg: #000000;
  --bg-dark-section: #000000;
  --brand-red: #ff3333;

  /* Layout Variables */
  --maxw: 1180px;
  --container-max-width: 1200px;
  --pad: clamp(20px, 5vw, 40px);

  /* Typography */
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --base-font-size: 14px;
  --font-scale: 1;
  /* Baseline scale multiplier */
  --font-size: calc(var(--base-font-size) * var(--font-scale));
  --letter-spacing: normal;
  --word-spacing: normal;

  /* UI System States */
  --primary: #125986;
  --primary-hover: #004da1;
  --surface: #ffffff;
  --surface-2: #abaeb173;
  --text: #1e293b;
  --accent: #0061C2;
  --success: #4CAF50;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
}

/* ===== Accessibility & Visual Modes ===== */

/* Focus Indicator */
body.focus-indicator *:focus {
  outline: 3px solid var(--danger) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.3) !important;
}

/* High Contrast & Visual Modes */
html.high-contrast {
  filter: contrast(1.8) brightness(1.1) !important;
}

html.grayscale {
  filter: grayscale(1) !important;
}

/* html[data-cb="none"] {
  filter: none !important;
} */

#colorblind-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  /* Allows clicking through to buttons underneath */
  z-index: 999999;
  display: none;
}

/* Enable overlay based on html class */
html.protanopia #colorblind-overlay {
  display: block;
  backdrop-filter: url('#protanopia');
  -webkit-backdrop-filter: url('#protanopia');
}

html.deuteranopia #colorblind-overlay {
  display: block;
  backdrop-filter: url('#deuteranopia');
  -webkit-backdrop-filter: url('#deuteranopia');
}

html.tritanopia #colorblind-overlay {
  display: block;
  backdrop-filter: url('#tritanopia');
  -webkit-backdrop-filter: url('#tritanopia');
}

/* Fallback for browsers requiring direct filter on html element */
html.protanopia {
  filter: url(#protanopia) !important;
  -webkit-filter: url(#protanopia) !important;
}

html.deuteranopia {
  filter: url(#deuteranopia) !important;
  -webkit-filter: url(#deuteranopia) !important;
}

html.tritanopia {
  filter: url(#tritanopia) !important;
  -webkit-filter: url(#tritanopia) !important;
}

/* ===== Custom Cursors ===== */

/* Medium Cursor */
/* =========================================
   MEDIUM CURSOR
   ========================================= */

body.cursor-medium,
body.cursor-medium * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 2l18 14-10 2 6 12-4 2-6-12-6 8z' fill='%23fff' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") 5 2, auto !important;
}

/* HAND CURSOR FOR ALL LINKS + CHILD ELEMENTS */
body.cursor-medium a,
body.cursor-medium a *,
body.cursor-medium button,
body.cursor-medium button *,
body.cursor-medium [role="button"],
body.cursor-medium [role="button"] *,
body.cursor-medium select,
body.cursor-medium select *,
body.cursor-medium .ada-fab,
body.cursor-medium .ada-fab * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M10 2v12h1V2h-1zm-3 2v10h1V4H7zm6 0v10h1V4h-1zm3 2v8h1V6h-1zm-13 4v6a6 6 0 0 0 6 6h6a6 6 0 0 0 6-6V9h-1v9a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5v-6H4z' fill='%23fff' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 10 2, pointer !important;
}

body.cursor-medium input,
body.cursor-medium textarea {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M12 4h8M16 4v24M12 28h8' fill='none' stroke='%23000' stroke-width='3'/%3E%3Cpath d='M12 4h8M16 4v24M12 28h8' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 16 16, text !important;
}


/* =========================================
   LARGE CURSOR
   ========================================= */

body.cursor-large,
body.cursor-large * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M6 3l26 20-14 3 8 16-5 2-8-16-8 11z' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* HAND CURSOR FOR ALL LINKS + CHILD ELEMENTS */
body.cursor-large a,
body.cursor-large a *,
body.cursor-large button,
body.cursor-large button *,
body.cursor-large [role="button"],
body.cursor-large [role="button"] *,
body.cursor-large select,
body.cursor-large select *,
body.cursor-large .ada-fab,
body.cursor-large .ada-fab * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M15 3v18h1.5V3H15zm-4.5 3v15h1.5V6h-1.5zm9 0v15h1.5V6h-1.5zm4.5 3v12.5h1.5V9h-1.5zm-19.5 6v9a9 9 0 0 0 9 9h9a9 9 0 0 0 9-9V13.5h-1.5v9a7.5 7.5 0 0 1-7.5 7.5h-9a7.5 7.5 0 0 1-7.5-7.5v-9h-1.5z' fill='%23fff' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") 15 3, pointer !important;
}

body.cursor-large input,
body.cursor-large textarea {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M18 6h12M24 6v36M18 42h12' fill='none' stroke='%23000' stroke-width='4'/%3E%3Cpath d='M18 6h12M24 6v36M18 42h12' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 24 24, text !important;
}


/* =========================================
   EXTRA LARGE CURSOR
   ========================================= */

body.cursor-extra-large,
body.cursor-extra-large * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M8 4l34 26-18 4 10 20-7 3-10-20-10 14z' fill='%23fff' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E") 8 4, auto !important;
}

/* HAND CURSOR FOR ALL LINKS + CHILD ELEMENTS */
body.cursor-extra-large a,
body.cursor-extra-large a *,
body.cursor-extra-large button,
body.cursor-extra-large button *,
body.cursor-extra-large [role="button"],
body.cursor-extra-large [role="button"] *,
body.cursor-extra-large select,
body.cursor-extra-large select *,
body.cursor-extra-large .ada-fab,
body.cursor-extra-large .ada-fab * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M20 4v24h2V4h-2zm-6 4v20h2V8h-2zm12 0v20h2V8h-2zm6 4v16h2V12h-2zm-26 8v12a12 12 0 0 0 12 12h12a12 12 0 0 0 12-12v-6h-2v6a10 10 0 0 1-10 10h-12a10 10 0 0 1-10-10v-12h-2z' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 20 4, pointer !important;
}

body.cursor-extra-large input,
body.cursor-extra-large textarea {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M24 8h16M32 8v48M24 56h16' fill='none' stroke='%23000' stroke-width='5'/%3E%3Cpath d='M24 8h16M32 8v48M24 56h16' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/svg%3E") 32 32, text !important;
}

/* ===== Layout Structure ===== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--surface);
  padding: 24px 16px;
  border-right: 1px solid var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-logo {
  font-size: calc(22px * var(--font-scale, 1));
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  padding: 0 8px;
}

.sidebar-item {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: calc(14px * var(--font-scale, 1));
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: calc(28px * var(--font-scale, 1));
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: calc(15px * var(--font-scale, 1));
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--surface-2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: calc(13px * var(--font-scale, 1));
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: calc(32px * var(--font-scale, 1));
  font-weight: 700;
}

.stat-value.green {
  color: var(--success);
}

.stat-value.yellow {
  color: var(--warning);
}

.stat-value.blue {
  color: var(--accent);
}

.stat-value.red {
  color: var(--danger);
}

/* ===== Data Table ===== */
.data-table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface-2);
  overflow: hidden;
  margin-bottom: 32px;
}

.data-table-wrap h2 {
  padding: 20px 24px 0;
  font-size: calc(18px * var(--font-scale, 1));
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 24px;
  font-size: calc(14px * var(--font-scale, 1));
}

th {
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--surface-2);
}

td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: calc(12px * var(--font-scale, 1));
  font-weight: 600;
}

.badge.active {
  background: rgba(76, 175, 80, 0.15);
  color: var(--success);
}

.badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ===== Accessibility Widget (ADA) ===== */
.ada-fab {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #08324b;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 6px 24px rgba(201, 199, 199, 0.17);
  transition: transform 0.2s;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}

.ada-fab svg,
.ada-fab .ada-fab-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  display: block !important;
  stroke: #ffffff !important;
  fill: none !important;
  pointer-events: none;
}

.ada-fab svg circle {
  fill: #ffffff !important;
}

.ada-fab svg:focus {
  outline: none !important;
}

.ada-fab:hover {
  transform: scale(1.1);
}

/* .ada-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 500px;
  max-height: 85vh;
  background: #111010;
  border: 1px solid var(--surface-2);
  z-index: 10000;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
  animation: slideUp 0.3s ease;
} */

/* Base Panel Styles */
/* .ada-panel {
    position: fixed;
    right: 28px;
    bottom: 20px;

    width: 500px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 40px);

    background: #08324b;
    border: 1px solid var(--surface-2);
    z-index: 10000;

    overflow-x: hidden;
    overflow-y: auto;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

    display: none;
    animation: slideUp 0.3s ease;
    box-sizing: border-box;
} */

.ada-panel {
    position: fixed;
    right: 28px;

    /* Space below the sticky header */
    top: 110px;
    bottom: 20px;

    width: 500px;
    max-width: calc(100vw - 32px);

    /* Height is controlled by top + bottom */
    max-height: none;

    background: #08324b;
    border: 1px solid var(--surface-2);
    z-index: 10000;

    overflow-x: hidden;
    overflow-y: auto;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;

    animation: slideUp 0.3s ease;
    box-sizing: border-box;
}
/* Header */
.ada-panel-header {
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 60px;

    padding: 14px 16px;

    background: #08324b;
    box-sizing: border-box;
}


/* iPhone / mobile */
@media (max-width: 991px) {

    .ada-panel {
        left: 16px;
        right: 16px;

        width: auto;
        max-width: none;

        bottom: max(16px, env(safe-area-inset-bottom));

        max-height: calc(
            100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px
        );

        margin: 0;

        overflow-x: hidden;
        overflow-y: auto;

        box-sizing: border-box;
    }

    .ada-panel-header {
        position: sticky;
        top: 0;
        z-index: 100;

        background: #1e4359;
    }
}
/* Small Screens / Landscape Mode Height Adjustment */


.ada-panel.open {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.ada-panel-header h3 {
  font-size: calc(17px * var(--font-scale, 1));
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.ada-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: calc(20px * var(--font-scale, 1));
  cursor: pointer;
  transition: color 0.2s;
  padding: 10px;
}

.ada-close:hover {
  color: var(--danger);
  background: var(--bg-3);
}

.ada-section {
  padding: 24px 20px;
  border-bottom: 1px solid var(--surface-2);
}

.ada-section-header,
.ada-section-header1 {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 44px;
}

.ada-section-header {
  margin-bottom: 16px;
}

.ada-section-header1 {
  margin-bottom: 0px;
}

.ada-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(209, 212, 214, 0.11);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 97, 194, 0.1);
}

.ada-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.ada-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ada-section-title {
  font-size: calc(15px * var(--font-scale, 1));
  color: #ffffff;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.ada-desc {
  font-size: calc(12.5px * var(--font-scale, 1));
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.ada-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.ada-btn {
  padding: 8px 14px;
  border: 1px solid var(--surface-2);
  border-radius: 5px;
  color: var(--text);
  font-size: calc(13px * var(--font-scale, 1));
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-transform: capitalize;
}

.ada-btn:hover {
  border-color: var(--primary);
}

#adaPanel .ada-btn {
  background-color: #fff;
}
.ada-btn:hover{
  color: #000;
}
#adaPanel .ada-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.ada-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ada-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(215, 215, 215, 0.2);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.ada-toggle{
  padding: 10px 10px;
}

.ada-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.ada-toggle.on {
  background: var(--primary);
}

.ada-toggle.on::after {
  transform: translateX(20px);
}

.ada-reset-container {
  position: sticky;
  bottom: 0;
  background:#08324b;
  padding: 12px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.ada-reset {
  width: 100%;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #08324b;
  font-size: calc(13px * var(--font-scale, 1));
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.ada-reset:hover {
background: rgb(18, 89, 134);
  border-color: rgb(18, 89, 134);
}

/* ===== Overlays & Utilities ===== */

/* Reading Mask */
.reading-mask-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  display: none;
}

.reading-mask-overlay.active {
  display: block;
}

.mask-top,
.mask-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.mask-top {
  top: 0;
}

.mask-bottom {
  bottom: 0;
}

/* Keyboard Shortcuts */
.kb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.kb-overlay.open {
  display: flex;
}

.kb-card {
  background: var(--surface);
  padding: 32px;
  width: 420px;
  border: 1px solid var(--surface-2);
}

.kb-card h3 {
  font-size: calc(20px * var(--font-scale, 1));
  margin-bottom: 20px;
  text-align: center;
}

.kb-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.kb-key {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  font-size: calc(12px * var(--font-scale, 1));
  font-weight: 600;
  font-family: monospace;
}

/* Screen Reader Status */
.sr-status {
  position: fixed;
  bottom: 96px;
  left: 28px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--primary);
  font-size: calc(13px * var(--font-scale, 1));
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 8px;
}

.sr-status.active {
  display: flex;
}

#srStatus span {
  color: #040404;
}

.sr-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Screen Reader Active Highlight */
.caw-sr-highlight {
  outline: 3px solid #D6A93C !important;
  outline-offset: 3px !important;
  background-color: rgba(214, 169, 60, 0.18) !important;
  border-radius: 4px;
  transition: outline 0.15s ease, background-color 0.15s ease;
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  /* .ada-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 20px;
  } */

  .cards-grid {
    grid-template-columns: 1fr;
  }
}
#adaFab:hover {
  background-color: #08324B;
}