/*
  Custom CSS für roadmap.urvent.com (Fider): Admin → Einstellungen → Erweitert → Eigenes CSS.
  - Keine Webfonts (weder extern noch eingebettet): es gilt der System-Font-Stack, ohne zusätzlichen Request.
  - Der Hintergrund liegt als feste Ebene über der ganzen Seite (body::before), damit er Viewport und Seitenlänge ausfüllt.
*/

/* ---------- Tokens ---------- */
body {
  --u-from: #2778b0;
  --u-to: #2a55b0;
  --u-accent: linear-gradient(135deg, var(--u-from), var(--u-to));
  --u-radius: 1.25rem;
  --u-radius-sm: 0.75rem;
  --primary-color: #2778b0;
  --primary-color-dark: #1f608d;
  --primary-color-light: #8fd3ff;
  --u-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--u-font);
  -webkit-font-smoothing: antialiased;
}

/* Fider bindet seine eigene Schrift (Inter) per Webfont ein: durch den System-Font-Stack ersetzen, damit keine Fontdateien geladen werden */
body,
button,
input,
textarea,
select,
.fider-tiptap-editor,
[class*="c-"] {
  font-family: var(--u-font) !important;
}

body[data-theme="light"] {
  --u-border: #192d501f;
  --u-surface: #ffffff;
  --u-surface-2: #eef4fa;
  --u-shadow: 0 1.25rem 3rem -1.5rem #192d5059;
  --u-text: #394255;
  --u-heading: #101828;
  --u-backdrop:
    radial-gradient(52% 40% at 96% 0%, #3b9be029 0%, transparent 60%),
    radial-gradient(58% 45% at 0% 100%, #2b6cc429 0%, transparent 60%),
    linear-gradient(180deg, #f4f8fc 0%, #e7eff8 100%);
  --colors-gray-100: #eef4fa;
  --colors-gray-200: #ffffff;
  --colors-gray-800: #394255;
  --colors-gray-900: #101828;
}

body[data-theme="dark"] {
  --u-border: #ffffff1a;
  --u-surface: #ffffff0d;
  --u-surface-2: #ffffff14;
  --u-shadow: 0 1.25rem 3rem -1.5rem #000c;
  --u-text: #d5dae3;
  --u-heading: #ffffff;
  --u-backdrop:
    radial-gradient(52% 40% at 96% 0%, #3b9be024 0%, transparent 60%),
    radial-gradient(58% 45% at 0% 100%, #2b6cc429 0%, transparent 60%),
    linear-gradient(180deg, #0b111c 0%, #090e18 100%);
  --primary-color: #5aa6e0;
  --primary-color-dark: #8fd3ff;
  --primary-color-light: #8fd3ff;
  --colors-gray-100: #0a101b;
  --colors-gray-200: #121a29;
  --colors-gray-800: #d5dae3;
  --colors-gray-900: #ffffff;
}

/* ---------- Seite ---------- */
/* Hintergrund füllend: feste Ebene über den gesamten Viewport (funktioniert auch auf iOS, wo background-attachment: fixed ignoriert wird).
   Zuvor setzte der Shorthand "fixed" nur für die letzte Verlaufsebene; die beiden Radial-Verläufe waren auf Body-Höhe begrenzt und kachelten. */
html {
  min-height: 100%;
  background-color: #f4f8fc;
}

html:has(body[data-theme="dark"]) {
  background-color: #090e18;
}

body {
  min-height: 100vh;
  background: none !important;
  color: var(--u-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--u-backdrop);
}

/* Fider setzt auf den Seiten-Container (.page) eine Vollfarbe (--colors-gray-100): sie läge als schmales Rechteck auf dem Verlauf */
.page,
.page.container {
  background: transparent !important;
}

h1, h2, h3, h4, .text-title, .text-display, .text-display2, .text-header {
  color: var(--u-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* ---------- Header: schwebende Glas-Leiste wie auf urvent.com ---------- */
#c-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent !important;
  border: 0 !important;
}

#c-header .c-menu {
  padding: 0.75rem !important;
}

#c-header .c-header__container {
  width: 100%;
  margin-inline: auto;
  padding: 0.4rem 0.75rem 0.4rem 1rem !important;
  border: 1px solid var(--u-border);
  border-radius: 50rem;
  background: #fffffff0;
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--u-shadow);
}

body[data-theme="dark"] #c-header .c-header__container {
  background: #1b1f22f0;
}

#c-header .c-header__row {
  display: flex;
  align-items: center;
  gap: 0 1rem;
}

#c-header .c-header__brand {
  flex: 0 0 auto;
  color: var(--u-heading) !important;
}

/* Das hochgeladene Logo ist weiß: auf der hellen Leiste in der Markenfarbe #2778b0 einfärben */
body[data-theme="light"] #c-header .c-header__brand img {
  filter: brightness(0) saturate(100%) invert(54.9%) sepia(20.2%) saturate(1841.3%) hue-rotate(163deg) brightness(72.4%) contrast(86.9%);
}

#c-header h1,
#c-header .text-header {
  color: var(--u-heading) !important;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

#c-header .c-header__nav {
  margin-inline: auto;
}

#c-header .c-header__nav-link {
  color: #4f586b !important;
  opacity: 1;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 50rem;
  padding: 0.45rem 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}

body[data-theme="dark"] #c-header .c-header__nav-link {
  color: #d5dae3 !important;
}

#c-header .c-header__nav-link:hover,
#c-header .c-header__nav-link--active {
  background: #3b9be024;
  color: var(--u-heading) !important;
}

/* Fider zeichnet den aktiven Link mit einem Unterstrich (box-shadow); der getönte Hintergrund genügt und der Strich klebte am Pillenrand */
#c-header .c-header__nav-link,
#c-header .c-header__nav-link--active,
#c-header .c-header__nav-link:hover {
  box-shadow: none !important;
  border-bottom: 0 !important;
}

/* Vertikal mittig: Inline-Elemente (Avatar, Glocke, SVG) erzeugen sonst durch die Textgrundlinie Luft nach unten */
#c-header .c-header__container {
  display: flex;
  align-items: center;
}

#c-header .c-header__row {
  flex: 1;
  align-items: center;
  min-height: 2.5rem;
}

#c-header .c-header__row > * {
  margin-block: 0 !important;
  align-self: center;
}

#c-header .c-header__actions {
  align-items: center;
  line-height: 1;
}

#c-header .c-header__actions * { vertical-align: middle; }

#c-header .c-header__actions img,
#c-header .c-header__actions svg { display: block; }

#c-header .c-header__nav-link {
  padding-block: 0.4rem;
  line-height: 1.4;
}

#c-header .c-header__actions {
  flex: 0 0 auto;
}

#c-header .c-themeswitcher {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  color: var(--u-text) !important;
}

#c-header .c-themeswitcher svg {
  color: var(--u-text) !important;
}

#c-header .c-themeswitcher:hover {
  background: #3b9be024;
}

#c-header .c-button--primary {
  background: var(--u-accent) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 0.75rem 1.75rem -0.75rem #2778b0cc !important;
}

#c-header .c-button--primary * {
  color: #fff !important;
}

#c-header .c-dropdown__content,
#c-header .c-dropdown__content a,
#c-header .c-dropdown__content * {
  color: var(--u-text) !important;
}

#c-header .c-dropdown__content {
  background: var(--u-surface-2);
}

body[data-theme="light"] #c-header .c-dropdown__content {
  background: #fff;
}

body[data-theme="dark"] #c-header .c-dropdown__content {
  background: #121a29;
}

@media (max-width: 767.98px) {
  #c-header .c-header__container {
    border-radius: 1.5rem;
    padding-left: 0.75rem !important;
  }

  #c-header .c-header__row {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  #c-header .c-header__actions {
    margin-left: auto;
  }

  #c-header .c-header__nav {
    order: 3;
    flex: 1 1 100%;
    margin-inline: 0;
    padding-top: 0.25rem;
    border-top: 1px solid var(--u-border);
  }
}

@media (max-width: 575.98px) {
  /* Marke und Aktionen in eine Zeile, Navigation darunter; bei sehr schmalen Geräten kürzt der Titel mit Ellipse */
  #c-header .c-header__row {
    gap: 0.25rem 0.35rem;
  }

  #c-header .c-header__brand {
    flex: 1 1 0;
    min-width: 0;
  }

  #c-header h1,
  #c-header .text-header {
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #c-header .c-themeswitcher {
    width: 36px;
    height: 36px;
  }

  #c-header .c-button--primary {
    padding-inline: 0.75rem;
  }
}

/* ---------- Buttons ---------- */
.c-button {
  border-radius: 50rem;
  font-weight: 600;
}

.c-button--primary {
  background: var(--u-accent) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 0.75rem 1.75rem -0.75rem #2778b0cc !important;
}

.c-button--primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.c-button--default,
.c-button--secondary,
.c-button--tertiary {
  background: var(--u-surface);
  border: 1px solid var(--u-border);
  color: var(--u-heading);
}

/* ---------- Karten ---------- */
.card,
.c-posts-container__post,
.p-home__add-idea-btn,
.p-show-post__post-card,
.c-comment-input-card,
.c-response-details__card,
.p-show-post__action-col > .card {
  background: var(--u-surface) !important;
  border: 1px solid var(--u-border) !important;
  border-radius: var(--u-radius) !important;
  box-shadow: var(--u-shadow) !important;
}

.c-posts-container__post {
  padding: 1.25rem 1.5rem;
  transition: transform 0.25s, border-color 0.25s;
}

.c-posts-container__post-link:hover .c-posts-container__post {
  transform: translateY(-2px);
  border-color: #2778b080 !important;
}

.c-posts-container__post-title {
  color: var(--u-heading);
  font-weight: 700;
}

.p-home__add-idea-btn {
  color: var(--u-text);
  padding: 1rem 1.5rem;
}

.p-home__add-idea-icon {
  color: var(--u-from);
}

/* ---------- Eingaben ---------- */
.c-input,
.c-textarea,
.c-select,
.c-markdown-textarea,
.fider-tiptap-editor {
  background: var(--u-surface) !important;
  color: var(--u-text) !important;
  border: 1px solid var(--u-border) !important;
  border-radius: var(--u-radius-sm) !important;
}

.c-input:focus,
.c-textarea:focus,
.c-select:focus,
*:focus:not(.no-focus) {
  border-color: var(--u-from) !important;
  box-shadow: 0 0 0 3px #2778b033 !important;
}

.c-post-filter-btn,
.c-post-sort-btn {
  background: var(--u-surface) !important;
  border: 1px solid var(--u-border) !important;
  color: var(--u-text) !important;
  border-radius: 50rem !important;
}

/* ---------- Stimmen, Tags, Status ---------- */
body[data-theme] .c-vote-counter__button {
  background: var(--u-surface-2);
  border: 1px solid var(--u-border);
  border-radius: var(--u-radius-sm);
  color: var(--primary-color);
}

body[data-theme] .c-vote-counter__button--voted {
  background: var(--u-accent);
  border-color: transparent;
  color: #fff;
}

body[data-theme] .c-vote-counter__button--voted .c-vote-counter__icon,
body[data-theme] .c-vote-counter__button--voted * {
  color: #fff;
}

.c-tag {
  background: var(--u-surface-2) !important;
  border: 1px solid var(--u-border);
  border-radius: 50rem !important;
  color: var(--u-heading) !important;
  font-weight: 600;
  padding: 0.25em 0.8em;
}

/* Status-Pille in der Liste */
.c-posts-container__post .rounded-full {
  background: var(--u-surface-2) !important;
  border-color: var(--u-border) !important;
  color: var(--u-heading) !important;
}

/* ---------- Links, Rest ---------- */
.text-link,
.header-emphasis {
  color: var(--primary-color);
}

.c-modal-window,
.c-dropdown__content {
  border: 1px solid var(--u-border);
  border-radius: var(--u-radius);
  box-shadow: var(--u-shadow);
}

body[data-theme="dark"] .c-modal-window,
body[data-theme="dark"] .c-dropdown__content {
  background: #121a29;
}

.c-divider {
  border-color: var(--u-border);
}