body {
    font-family: "Segoe UI", Roboto, sans-serif;
	background-color: #121212;
    color: #e0e0e0;
}

.card-img-top {
    object-fit: cover;
    height: 250px;
}

.card-title {
    font-weight: bold;
}

footer {
    font-size: 0.9rem;
    opacity: 0.7;
	color: #bbb;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #bbb;
}

ul li span.text-success,
ul li span.text-danger,
ul li span.text-warning {
    font-weight: bold;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar .nav-link.active {
    font-weight: bold;
    text-decoration: underline;
}
.leaflet-overlay-pane path {
    fill: rgba(0, 0, 0, 0.3);
}

.equal-height-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.equal-height-card .card-body {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Modernes Card- und Layout-Design für AllskyKamera --- */

/* Sensordaten-Card und andere Cards */
.card.bg-secondary {
    background: #23272b !important;
    border: 1px solid #343a40;
    color: #f8f9fa;
}

.card-header {
    background: #1a1d20 !important;
    border-bottom: 1px solid #343a40;
    color: #ffc107;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.card-body {
    background: #23272b !important;
    color: #f8f9fa;
}

.card ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.card ul li {
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.text-muted {
    color: #b0b0b0 !important;
}

.table-dark th, .table-dark td {
    background-color: #23272b !important;
    color: #f8f9fa !important;
    border-color: #343a40;
}

.table-hover tbody tr:hover {
    background-color: #2c3035 !important;
}

.progress {
    background-color: #343a40;
    border-radius: 1rem;
    box-shadow: 0 1px 4px #0002;
}

.progress-bar {
    font-weight: bold;
    font-size: 1.1rem;
}

.badge {
    font-size: 0.95em;
    margin-right: 0.3em;
}

.badge.bg-success {
    background-color: #198754 !important;
}
.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #23272b !important;
}
.badge.bg-danger {
    background-color: #dc3545 !important;
}

a, a:visited {
    color: #66bfff;
}
a:hover {
    color: #ffc107;
    text-decoration: underline;
}

h1, h4 {
    letter-spacing: 0.5px;
}

img.img-fluid.shadow {
    border: 2px solid #343a40;
}

@media (max-width: 767px) {
    .card-header, .card-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Inhaltsverzeichnis & Preisspalte (Kamerabau) */
.toc a { display:block; margin: .25rem 0; }
.price { text-align: right; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
h2 { scroll-margin-top: 6rem; }

/* Dunkle Info-Boxen (ersetzt helle Bootstrap Alerts) */
.alert-info {
    background: #1a2633 !important;
    color: #d7e9ff !important;
    border: 1px solid #16324a !important;
}

/* Einheitliche Karten wie auf der Startseite */
.card { background: #23272b; border: 1px solid #343a40; color:#f8f9fa; }
.card-header { background:#1a1d20 !important; border-bottom:1px solid #343a40; color:#ffc107; font-weight:700; letter-spacing:.5px; }

/* Tabellen dunkel halten */
.table-dark th, .table-dark td { background-color:#23272b !important; color:#f8f9fa !important; border-color:#343a40; }
.table-secondary { background:#2c3035 !important; color:#e0e0e0 !important; }

.level-chip{position:absolute;top:8px;left:8px;z-index:2;}
.card-img-link{position:relative;display:block;}

.share-buttons .btn svg { vertical-align: text-bottom; }
.share-buttons .btn.btn-primary { background: #0d6efd; border-color: #0d6efd; }
.share-buttons .btn.btn-outline-light { border-color: #bbb; color: #eee; }

/* Kleine Sparklines im netdata-Dashboard */
.sparkline-wrapper {
    height: 40px;        /* fixe Höhe für den Container */
    width: 100%;
    position: relative;  /* wichtig für Chart.js */
}

.sparkline {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* LongKeogram nur als Vorschau laden/anzeigen */
.longkeo-preview{
  display:block;
  max-width:100%;     /* darf kleiner werden */
  width:auto;         /* aber NICHT hochskalieren */
  height:auto;
  max-height:180px;   /* deine Vorschauhöhe */
  margin: 0 auto;     /* zentrieren */
  background:#000;
}

.keo-timeline{
  display:flex;
  justify-content:space-between;
  font-size:.8rem;
  color:#aeb6bf;
  padding:0 .25rem;
  user-select:none;
}

.keo-timeline span{
  position:relative;
  padding-top:.35rem;
}

.keo-timeline span::before{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%);
  width:1px;
  height:6px;
  background:#55606b;
  opacity:.9;
}

/* Preview-Box verhindert "zu hohe" Keogramme auf großen Screens */
  .preview-box{
    height: 420px;                 /* kannst du z.B. 280/320/360 testen */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0,0,0,0.25);
    border-radius: .5rem;
  }
  .preview-box img{
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }


  /* Supporters / Donation lists */
.supporter-tier {
  background: linear-gradient(180deg, #1e293b, #0b1220);
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem;
  height: 100%;
}

.supporter-tier h3 {
  margin: 0 0 .25rem 0;
  font-weight: 700;
}

.supporter-tier .tier-sub {
  color: #9ca3af;
  font-size: .9rem;
  margin-bottom: .75rem;
}

.supporter-badge {
  display: inline-block;
  font-size: .78rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid #475569;
  color: #e5e7eb;
  margin-left: .4rem;
  opacity: .95;
}

.supporter-item {
  padding: .45rem 0;
  border-bottom: 1px dashed rgba(148,163,184,.25);
}
.supporter-item:last-child { border-bottom: 0; }

.supporter-link { color: #7dd3fc; text-decoration: none; }
.supporter-link:hover { text-decoration: underline; }
.supporter-name { color: #e5e7eb; font-weight: 600; }

.supporter-msg {
  color: #cbd5e1;
  font-size: .9rem;
  margin-top: .15rem;
  font-style: italic;
}

/* Anonymous card */
.supporter-anon {
  background: radial-gradient(circle at top, #1f2a44, #0b1220);
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

/* Partner grid */
.partner-link { text-decoration: none; color: inherit; display: block; }
.partner-card {
  background: linear-gradient(180deg, #1f2937, #0b1220);
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: transform .08s ease, border-color .08s ease;
}
.partner-card:hover { transform: translateY(-2px); border-color: #60a5fa; }

.partner-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(148,163,184,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 64px;
}
.partner-logo { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.partner-logo-fallback { font-size: 1.6rem; color: #93c5fd; }

.partner-name { font-weight: 700; }
.partner-msg { color: #cbd5e1; font-size: .9rem; margin-top: .15rem; }

.supporter-tier-wide{
  background: linear-gradient(180deg,#1e293b,#0b1220);
  border:1px solid #334155;
  border-radius:.9rem;
  padding:1.25rem 1.25rem;
}

.supporter-tier-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.5rem;
}
.supporter-tier-title h3{ margin:0; font-weight:800; }
.supporter-range{ color:#9ca3af; font-size:.9rem; }

.supporter-anonchip{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.25rem .6rem;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.03);
  color:#e5e7eb;
  font-size:.85rem;
  margin:.5rem 0 .75rem 0;
}

.supporter-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.8rem 1.2rem;
}
@media (max-width: 768px){
  .supporter-grid{ grid-template-columns:1fr; }
}

.supporter-entry{
  padding:.6rem .75rem;
  border:1px solid rgba(148,163,184,.18);
  border-radius:.65rem;
  background: rgba(255,255,255,.02);
}

.supporter-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:.75rem;
}
.supporter-date{
  color:#94a3b8;
  font-size:.85rem;
  white-space:nowrap;
}

.supporter-msg{
  margin-top:.25rem;
  color:#cbd5e1;
  font-size:.9rem;
  font-style:italic;
}

.supporter-table .supporter-msg-cell{
  max-width: 520px;
  white-space: normal;
}

@media (max-width: 768px){
  .supporter-table .supporter-msg-cell{
    max-width: 100%;
  }
}

/* FAQ Accordion – Dark Theme Fix */
#faq .accordion-button {
  color: #f1f3f5;
}

#faq .accordion-button:not(.collapsed) {
  color: #ffffff;
  background-color: rgba(13, 110, 253, 0.12); /* leichtes Blau */
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
}

#faq .accordion-button::after {
  filter: invert(1); /* Pfeil sichtbar machen */
}

#faq .accordion-body {
  color: rgba(255,255,255,.85);
}

/* Verhindert Scrollbars in Cards durch Code-Blöcke */
.card pre {
  overflow-x: auto;          /* erlaubt Scroll, falls wirklich nötig */
  white-space: pre-wrap;     /* Zeilen umbrechen */
  word-break: break-word;    /* lange Tokens umbrechen */
  background: #0f1318;
  color: #e6e6e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0;
}

/* Optional: schöner für Inline-Code */
.card code {
  white-space: pre-wrap;
  word-break: break-word;
}

.cam-card-wrap { position: relative; overflow: hidden; }

/* Badge oben rechts – clean, nicht gedreht */
.support-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .6rem;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.support-badge .dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}

.support-badge.support .dot  { background: #0d6efd; } /* Bootstrap primary */
.support-badge.monthly .dot  { background: #ffc107; } /* Bootstrap warning */

/* Optional: monthly etwas dunklerer Text (weil gelb) */
.support-badge.monthly { color: #fff; }

.support-inline {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  font-size: .80rem;
  font-weight: 700;
  letter-spacing: .2px;
}

.support-inline .dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}

.support-inline.support .dot { background: #0d6efd; }
.support-inline.monthly .dot { background: #ffc107; }

.support-inline a {
  font-weight: 700;
  text-decoration: none;
}

.support-inline a:hover {
  text-decoration: underline;
}

/* Support-Callout unter H1 */
.support-callout {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .6rem;
  border-radius: .75rem;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.support-callout .badge-dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.support-callout.support  .badge-dot { background: #0d6efd; }
.support-callout.monthly  .badge-dot { background: #ffc107; }

.support-callout .label {
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .2px;
}

.support-callout .sub {
  font-size: .8rem;
  color: rgba(255,255,255,.70);
}

.support-callout .btn {
  border-radius: .6rem;
  padding: .25rem .55rem;
  font-weight: 700;
}

.support-callout .btn-warning {
  color: #1f2937 !important;          /* dunkles Anthrazit */
  font-weight: 600;
}

.support-callout .btn-warning:hover {
  color: #111827 !important;          /* noch dunkler beim Hover */
}

.support-callout .btn-warning i {
  color: #b45309; /* dunkles Gold/Bronze */
}

/* Fix: keine blaue Schrift auf gelbem Button */
.btn-warning,
.btn-warning:link,
.btn-warning:visited {
  color: #1f2937 !important;          /* dunkles Anthrazit */
}

.btn-warning:hover,
.btn-warning:focus {
  color: #111827 !important;
}

.btn-warning i,
.btn-warning .bi {
  color: inherit !important;
}

/* falls irgendwo ein link-info im btn-warning steckt */
.btn-warning .link-info,
.btn-warning a {
  color: inherit !important;
}

.premium-gauge { margin-top: .25rem; }

.premium-gauge-canvas{
  height: 120px;
}

.premium-gauge-scale{
  display:flex;
  justify-content:space-between;
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  padding: 0 .15rem;
  margin-top: .15rem;
}

.premium-dayvalues{
  border-top: 1px solid rgba(255,255,255,.10);
  margin-top: .35rem;
  padding-top: .25rem;
}

.premium-dayvalues-title{
  text-align:center;
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin-bottom: .1rem;
}

.premium-dayvalues-row{
  display:flex;
  justify-content:space-between;
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  padding: 0 .15rem;
}

.qp-pane { display:none; }
.qp-pane.active { display:block; }

/* Avatar-Dropdown: Caret entfernen */
.dropdown-toggle-no-caret::after {
  display: none !important;
}

.dropdown-menu-dark .dropdown-item.active,
.dropdown-menu-dark .dropdown-item:active {
  background-color: rgba(255,255,255,.15);
}

/* -----------------------------
   Halbkreis-Donut (180°)
   - stabil im Card Layout
   - Label unter der Grafik
------------------------------ */

.semi-wrap{
  display:flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.semi-chart{
  --p: 50;               /* 0..100 */
  --size: 220px;         /* Breite */
  --thickness: 16px;     /* Ringdicke */
  --track: rgba(255,255,255,.10); /* Rest-Halbkreis */
  --fill: var(--bs-primary);      /* Füllfarbe */

  width: var(--size);
  height: calc(var(--size) / 2);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.semi-chart::before{
  content:"";
  position:absolute;
  inset: 0;
  width: 100%;
  height: 200%;
  border-radius: 50%;
  background: conic-gradient(
    from 270deg,
    var(--fill) 0 calc(var(--p) * 1.8deg),
    var(--track) 0 180deg,
    transparent 0
  );
}

.semi-chart::after{
  content:"";
  position:absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -50%);
  width: calc(100% - (var(--thickness) * 2));
  height: calc(200% - (var(--thickness) * 2));
  border-radius: 50%;
  background: #23272b; /* Card-Hintergrund, nicht #000 */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

/* Text unterhalb der Grafik */
.semi-meta{
  min-width: 220px;
}
.semi-meta .title{
  font-weight: 700;
  margin-bottom: .25rem;
}
.semi-meta .line{
  color: rgba(255,255,255,.70);
  font-size: .92rem;
}
.semi-meta .sum{
  font-weight: 700;
  margin-top: .15rem;
}

/* Legende */
.semi-legend{
  margin-top: .35rem;
  display:flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: rgba(255,255,255,.70);
  font-size: .85rem;
}
.semi-legend .item{
  display:inline-flex;
  align-items:center;
  gap: .4rem;
}
.semi-legend .dot{
  width:10px;height:10px;border-radius:999px;
  display:inline-block;
}

/* kleinere Variante (pro Kamera) */
.semi-sm{
  --size: 170px;
  --thickness: 14px;
}

.size-nowrap { white-space: nowrap; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #0b1220;
  color: #e5e7eb;
}
.leaflet-popup-content a.btn {
  border-color: rgba(255,255,255,0.25);
}

/* -------------------------------------------------
   CleverReach Newsletter – Dark Theme (scoped)
-------------------------------------------------- */
.ask-newsletter .cr-web-wrapper,
.ask-newsletter .cr-web-row,
.ask-newsletter .bgcolor-1,
.ask-newsletter .bgcolor-2 {
  background: transparent !important;
}

.ask-newsletter .cr-text,
.ask-newsletter .color-1,
.ask-newsletter .color-2 {
  color: #e5e7eb !important;
}

.ask-newsletter .cr-web-form {
  display: block !important;
}

.ask-newsletter label,
.ask-newsletter .cr-web-form label {
  color: #e5e7eb !important;
}

.ask-newsletter .ask-cr-input,
.ask-newsletter .cr-web-form input[type="email"] {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(148,163,184,.35) !important;
  border-radius: .6rem !important;
}

.ask-newsletter .ask-cr-input::placeholder {
  color: rgba(229,231,235,.55) !important;
}

.ask-newsletter .ask-cr-input:focus {
  box-shadow: 0 0 0 .2rem rgba(102,191,255,.20) !important;
  border-color: rgba(102,191,255,.55) !important;
}

.ask-newsletter .ask-cr-btn,
.ask-newsletter .cr-web-form button {
  font-weight: 700 !important;
  border-radius: .6rem !important;
}

.ask-newsletter label.required:after,
.ask-newsletter .cr-web-label.required:after {
  color: #ffc107 !important;
}

.longkeo-thumb {
  width: 100%;
  height: 110px;         /* kleiner machen: 80-100px */
  object-fit: cover;
  object-position: center;
  border-radius: .5rem;
}

.longkeo-thumb-wrap {
  background: #111;
  border-radius: .75rem;
  padding: .4rem;
}

.ask-hero {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: radial-gradient(circle at 20% 10%, rgba(99,102,241,.20), transparent 45%),
              radial-gradient(circle at 80% 30%, rgba(34,197,94,.12), transparent 45%),
              linear-gradient(180deg, #0b1022, #070a12);
  border: 1px solid rgba(148,163,184,.15);
}
.ask-hero-inner { padding: 1.25rem 1.25rem; }
@media (min-width: 992px){ .ask-hero-inner { padding: 1.75rem 2rem; } }
.ask-hero h1 { font-size: 1.6rem; margin: 0 0 .35rem 0; }
.ask-hero p { margin:0; color: rgba(229,231,235,.85); }
.ask-hero .ask-hero-actions .btn { border-radius: 999px; }

.ask-info-grid { display:grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 992px){ .ask-info-grid { grid-template-columns: 1fr 1fr; } }
.ask-info {
  border-radius: 1.25rem;
  padding: 1rem;
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(148,163,184,.14);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.ask-info h3 { font-size: 1.05rem; margin:0 0 .4rem 0; }
.ask-info p { margin:0; color: rgba(229,231,235,.80); }
.ask-info .btn { border-radius: 999px; }

.ask-row { margin-top: 1.35rem; }
.ask-row-head{
  display:flex; align-items:flex-start; justify-content: space-between; gap: .75rem;
  margin: 0 .25rem .5rem .25rem;
}
.ask-row-head-left{ display:flex; flex-direction:column; gap:.35rem; }
.ask-row-controls{ display:flex; gap:.5rem; flex-wrap:wrap; }
.ask-row-title { font-size: 1.1rem; margin:0; }
.ask-row-sub { font-size: .9rem; color: rgba(229,231,235,.65); white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }

.ask-rail-wrap { position: relative; }
.ask-rail {
  display:flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .25rem .25rem .75rem .25rem;

  /* NO visible scrollbars */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge legacy */
}
.ask-rail::-webkit-scrollbar{ display:none; } /* Chrome/Safari */

.ask-rail-btn{
  position:absolute; top: 38%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(2,6,23,.65);
  color: #e5e7eb;
  display:none;
  z-index: 5;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
@media (min-width: 992px){
  .ask-rail-btn{ display:inline-flex; align-items:center; justify-content:center; }
  .ask-rail-btn.left{ left: -12px; }
  .ask-rail-btn.right{ right: -12px; }
}

.ask-tile{
  position: relative;
  flex: 0 0 auto;
  width: 260px;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(148,163,184,.14);
  scroll-snap-align: start;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ask-tile:hover{
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(148,163,184,.25);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.ask-tile-link{ display:block; color: inherit; text-decoration: none; }
.ask-tile-img{ width:100%; height: 150px; object-fit: cover; display:block; background: #0b1220; }

.ask-tile-grad{
  position:absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55) 70%, rgba(0,0,0,.80));
  pointer-events:none;
}

.ask-tile-meta{
  position:absolute; left: 10px; right: 10px; bottom: 10px;
  display:flex; flex-direction:column; gap:.2rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}
.ask-tile-name{ font-weight: 700; line-height: 1.15; }
.ask-tile-sub{ font-size: .85rem; display:flex; align-items:center; gap:.4rem; flex-wrap: wrap; }
.ask-muted{ color: rgba(229,231,235,.80); }
.ask-dot{ color: rgba(229,231,235,.45); }

.ask-badge{
  position:absolute; top: 10px;
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(2,6,23,.55);
  color: #e5e7eb;
  backdrop-filter: blur(6px);
}
.ask-badge-tag{ left: 10px; }
.ask-badge-support{ right: 10px; }
.ask-badge-support.monthly{ background: rgba(245,158,11,.20); border-color: rgba(245,158,11,.35); }
.ask-badge-support.support{ background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.32); }

.ask-tile-actions{
  position:absolute; right: 10px; bottom: 10px;
  display:flex; gap:.35rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.ask-tile:hover .ask-tile-actions{ opacity: 1; transform: translateY(0); }
.ask-act{
  width: 34px; height: 34px;
  border-radius: 999px;
  display:inline-flex; align-items:center; justify-content:center;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(2,6,23,.65);
  color: #e5e7eb;
  text-decoration:none;
}
.ask-act:hover{ border-color: rgba(148,163,184,.35); }

.ask-country-bar{
  display:flex; gap:.5rem; flex-wrap: wrap;
  margin: .25rem .25rem .25rem .25rem;
}
.ask-pill{
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(2,6,23,.55);
  color: rgba(229,231,235,.90);
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .85rem;
  cursor: pointer;
  user-select: none;
}
.ask-pill.active{
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.ask-status{ color: rgba(229,231,235,.80); }
.ask-status.online{ color: #34d399; }
.ask-status.offline{ color: #fb7185; }

/* IMPORTANT: do NOT use display:none here, otherwise IntersectionObserver won't fire */
.ask-online-hidden{
  opacity: 0;
  pointer-events: none;
}

.ask-country-btn.active {
  border-color: rgba(99,102,241,.55) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* ---------------------------
   TOP 10 Ranked Row (Netflix)
   - Zahl links neben dem Bild
   - Badges / Actions bleiben korrekt
--------------------------- */

.ask-row.ask-row-tall .ask-rail {
  padding-top: 6px;
  padding-bottom: 10px;
}

.ask-row.ask-row-tall .ask-tile {
  width: 380px;              /* etwas breiter */
}

.ask-row.ask-row-tall .ask-tile-img {
  height: 210px;             /* höher */
  object-fit: cover;
}

/* ranked: NICHT das ganze Tile verschieben! */
.ask-row.ask-row-ranked .ask-tile {
  position: relative;
}

/* nur der klickbare Inhalt (Bild + Meta) bekommt Platz nach links */
.ask-row.ask-row-ranked .ask-tile-link {
  display: block;
  padding-left: 88px;        /* Platz für die große Zahl */
}

/* Rank-Zahl links, vertikal zentriert neben dem Bild */
.ask-row.ask-row-ranked .ask-rank {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-55%);
  font-size: 170px;
  line-height: 0.85;
  font-weight: 900;
  opacity: 0.18;
  letter-spacing: -0.06em;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 10px 30px rgba(0,0,0,0.75);
}

/* Zahl soll hinter Bild/Meta liegen */
.ask-row.ask-row-ranked .ask-tile-link,
.ask-row.ask-row-ranked .ask-tile-grad,
.ask-row.ask-row-ranked .ask-tile-meta,
.ask-row.ask-row-ranked .ask-tile-img {
  position: relative;
  z-index: 2;
}

/* Badges + Actions bleiben an original Position am Tile */
.ask-row.ask-row-ranked .ask-badge,
.ask-row.ask-row-ranked .ask-tile-actions {
  z-index: 4;
}

/* Actions müssen rechts unten bleiben (bezogen auf das Tile),
   aber optisch nicht "über der Zahl" liegen */
.ask-row.ask-row-ranked .ask-tile-actions {
  right: 10px;
  bottom: 10px;
}

/* -------- Overview compact layout -------- */
.ask-info-grid-compact{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 992px){
  .ask-info-grid-compact{ grid-template-columns: 1fr; }
}

.ask-stats .ask-stats-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.ask-stat{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,.03);
}
.ask-stat-val{
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}
.ask-stat-lbl{
  opacity: .8;
  font-size: .9rem;
  margin-top: 4px;
}
.ask-subtle{ opacity:.8; font-size:.95rem; }

.ask-pill{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin-right: 6px;
}

/* -------- Dezent Community/Newsletter -------- */
.ask-soft-callout{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  overflow:hidden;
}
.ask-soft-inner{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 14px;
}
@media (min-width: 992px){
  .ask-soft-inner{
    grid-template-columns: 1.2fr .8fr;
    align-items: start;
  }
}
.ask-soft-title{
  font-weight: 700;
  margin-bottom: 4px;
}
.ask-soft-text{ opacity:.85; margin-bottom: 10px; }
.ask-soft-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.ask-soft-mini{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,.12);
}
.ask-soft-mini-title{
  font-weight: 700;
  margin-bottom: 6px;
}

.ask-nl{
  display:flex;
  gap: 8px;
}
.ask-nl input{ flex:1; }

/* -------- Leaflet map -------- */
.ask-map-wrap{
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.ask-map-canvas{
  height: 320px;
}
@media (min-width: 992px){
  .ask-map-canvas{ height: 380px; }
}
.leaflet-container{
  background: rgba(0,0,0,.2);
}

        /* --- Marker als hellblauer Pin mit Label (Kamera-ID) --- */
        .camera-marker-icon {
            background: transparent;
            border: none;
        }

        .cam-marker {
            position: relative;
            width: 40px;
            height: 40px;
        }

        /* der blaue Pin */
        .cam-marker-pin {
            position: absolute;
            left: 50%;
            top: 4px;
            width: 20px;
            height: 20px;
            margin-left: -10px;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            background: #3b82f6; /* hell-blau */
            box-shadow: 0 0 6px rgba(59,130,246,0.7);
        }

        /* weiße „Spitze“ innen */
        .cam-marker-inner {
            position: absolute;
            top: 8px;
            left: 50%;
            width: 10px;
            height: 10px;
            margin-left: -5px;
            border-radius: 50%;
            background: #ffffff;
        }

        /* Label mit Kamera-ID – jetzt ÜBER dem Pin */
        .cam-marker-label {
            position: absolute;
            bottom: 42px;     /* über dem Marker */
            left: 50%;
            transform: translateX(-50%);
            padding: 1px 6px;
            border-radius: 4px;
            background: rgba(15,23,42,0.9);
            color: #e5e7eb;
            font-size: 9px;
            font-weight: 500;
            white-space: nowrap;
        }

        /* Bei ausgewähltem Marker wird Label hervorgehoben */
        .camera-marker-selected .cam-marker-label {
            background: rgba(249,115,22,0.95);
            color: #111827;
            font-weight: 700;
        }

        /* hellblau: ONLINE */
        .cam-marker-pin-online {
            background: #3b82f6; /* blau */
        }

        /* rot: OFFLINE */
        .cam-marker-pin-offline {
            background: #ef4444; /* rot */
        }

        .cam-marker-pin {
            position: absolute;
            left: 50%;
            top: 4px;
            width: 20px;
            height: 20px;
            margin-left: -10px;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            box-shadow: 0 0 6px rgba(0,0,0,0.25);
        }

/* --- Camera header: cleaner / technical --- */
.camera-header {
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}

.cam-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .2px;
}

.cam-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: .6px;
  border: 1px solid rgba(255,255,255,.12);
}

.cam-sub, .cam-hint {
  font-size: .95rem;
}

.text-light-50 { color: rgba(255,255,255,.65) !important; }

/* Like button: discoverable favorite UI */
.btn-like {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);
  color: #fff;
  position: relative;
}

.btn-like .like-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9rem;
  opacity: .85;
}

.btn-like:hover { border-color: rgba(255,255,255,.35); }

/* Pulse hint (only when not yet liked) */
.btn-like.pulse {
  animation: likePulse 1.6s ease-in-out infinite;
}
@keyframes likePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.18); }
  70%  { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.btn-like.liked {
  border-color: rgba(255,255,255,.35);
  background: rgba(25,135,84,.18); /* subtle green tint */
}


/* Kamera-Header: Grid/Tabelle */
.camera-header-grid{
  display: grid;
  grid-template-columns: 1fr auto;  /* Spalte 1 Inhalt, Spalte 2 Badge */
  grid-template-rows: auto auto auto;
  gap: .75rem 1rem;
  align-items: start;
}

/* Zellen */
.camera-header-grid .ch-left   { grid-column: 1; grid-row: 1; }
.camera-header-grid .ch-right  { grid-column: 2; grid-row: 1; display:flex; align-items:center; justify-content:flex-end; }
.camera-header-grid .ch-buttons{ grid-column: 1; grid-row: 2; }
.camera-header-grid .ch-share  { grid-column: 1 / span 2; grid-row: 3; }

/* Optional: auf kleinen Screens alles untereinander */
@media (max-width: 768px){
  .camera-header-grid{
    grid-template-columns: 1fr;
  }
  .camera-header-grid .ch-right{ grid-column: 1; justify-content:flex-start; }
  .camera-header-grid .ch-share{ grid-column: 1; }
}

/* Button-Box soll NICHT über die ganze Zeile laufen */
.camera-header-grid .ch-buttons{
  justify-self: start;              /* Grid: Zelle links "kleben" */
}

.camera-header-grid .ch-buttons .ch-btnbox{
  display: inline-block;            /* shrink-to-fit */
  width: fit-content;               /* moderne Browser */
  max-width: 100%;                  /* trotzdem responsive */
}

/* Fallback, falls fit-content mal zickt */
@supports not (width: fit-content){
  .camera-header-grid .ch-buttons .ch-btnbox{ display:inline-block; }
}

/* =========================
   Camera Header – Mobile Fix
   ========================= */
@media (max-width: 768px){

  /* Grid auf 1 Spalte */
  .camera-header-grid{
    grid-template-columns: 1fr;
  }

  /* LEFT: klar stapeln */
  .cam-head-left .cam-title{
    font-size: 1.15rem;
    line-height: 1.25;
  }

  /* Badges + Like umbrechen */
  .cam-head-left > div:first-child{
    flex-wrap: wrap;
    gap: .4rem .5rem;
  }

  /* Supporter-Badge: eigene Zeile, volle Breite */
  .cam-head-support{
    grid-column: 1;
    justify-content: flex-start;
  }

  .support-inline{
    width: 100%;
    justify-content: space-between;
  }

  /* Buttons-Box: volle Breite */
  .cam-head-buttons{
    justify-self: stretch;
  }

  .cam-head-buttons .ch-btnbox{
    width: 100%;
  }

  /* Buttons untereinander */
  .cam-head-buttons .btn{
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   Camera Header: Support-Badge zuverlässig auf Mobile
   (egal was camera_support_badge.php ausgibt)
   ========================================== */

/* Der Header soll eine saubere Bezugsfläche sein */
.camera-header { position: relative; }

/* Wenn das Badge als Overlay (absolute) kommt: im Header NICHT overlayen */
.camera-header .support-badge{
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0;
  pointer-events: auto; /* im Header darf man klicken */
}

/* Falls die include-Datei support-inline ausgibt: auch ok */
.camera-header .support-inline{
  max-width: 100%;
}

/* Mobile: Support-Bereich immer volle Breite und unter dem Titel sauber umbrechen */
@media (max-width: 768px){
  .camera-header-grid .ch-right{
    width: 100%;
    justify-content: flex-start;
  }
  .camera-header .support-inline,
  .camera-header .support-badge{
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================
   kamera.php Header – Mobile: Reihenfolge fix
   ========================================== */
@media (max-width: 768px){

  .camera-header-grid{
    display: grid;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    gap: .6rem !important;
  }

  /* harte Reihenfolge statt Auto-Placement */
  .camera-header-grid .ch-left   { grid-column: 1 !important; grid-row: 1 !important; }
  .camera-header-grid .ch-right  { grid-column: 1 !important; grid-row: 2 !important; }
  .camera-header-grid .ch-buttons{ grid-column: 1 !important; grid-row: 3 !important; }
  .camera-header-grid .ch-share  { grid-column: 1 !important; grid-row: 4 !important; }

  /* Support-Block soll volle Breite haben und nicht “rechts kleben” */
  .camera-header-grid .ch-right{
    justify-content: flex-start !important;
    width: 100% !important;
  }

  /* Alles was im Support-Bereich drin ist: nicht floaten, nicht absolut */
  .camera-header-grid .ch-right *{
    float: none !important;
  }
  .camera-header-grid .ch-right .support-badge{
    position: static !important;
    inset: auto !important;
  }

  /* Falls der Include einen Button hat: verhindert, dass er “neben” den Titel rutscht */
  .camera-header-grid .ch-right .btn{
    max-width: 100%;
  }
}
