/* Kalenderseite Stadt Vilshofen an der Donau – ohne externe Ressourcen */

:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --text: #1d2329;
  --muted: #4f5b66;
  --border: #d5dbe1;
  --accent: #005a8c;
  --accent-hover: #00466d;
  --accent-text: #ffffff;
  --ok-bg: #e3f2e6;
  --ok-text: #1e5b2b;
  --pending-bg: #eceff2;
  --pending-text: #4a5560;
  --warn-bg: #fff6dd;
  --warn-border: #c99a00;
  --focus: #e8a300;
  --radius: 10px;
  --maxw: 60rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181c;
    --surface: #1d2329;
    --text: #e8ecef;
    --muted: #aab4be;
    --border: #36414b;
    --accent: #6cbcf0;
    --accent-hover: #93cff5;
    --accent-text: #0b1a24;
    --ok-bg: #1d3a24;
    --ok-text: #b7e4c0;
    --pending-bg: #2a3239;
    --pending-text: #c3ccd4;
    --warn-bg: #3a3218;
    --warn-border: #d6ad2b;
    --focus: #ffc94a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  background: var(--surface);
  color: var(--text);
  padding: .5rem 1rem;
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Kopf – fixiert, Titel und Menü bleiben beim Scrollen sichtbar */
html { scroll-padding-top: 5.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--accent);
  color: var(--accent-text);
  padding: .6rem 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 2rem;
}
.site-owner { margin: 0; font-size: .85rem; font-weight: 600; opacity: .9; }
.site-header h1 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.5rem); line-height: 1.2; }
.lead { margin: 1.75rem 0 0; max-width: 42rem; font-size: 1.125rem; }

/* Sprungnavigation in der Kopfleiste */
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem 1.25rem; }
.toc a {
  display: inline-block;
  padding: .4rem 0;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.toc a:hover { color: var(--accent-text); border-bottom-color: currentColor; }
.nav-short { display: none; }

@media (max-width: 48rem) {
  html { scroll-padding-top: 7.5rem; }
  .header-bar { display: block; }
  .toc { margin: .25rem -1rem 0; padding: 0 1rem; overflow-x: auto; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc ul { gap: 1rem; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
}

main section { padding: 2rem 0 .5rem; }
h2 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; line-height: 1.3; margin: 1.25rem 0 .5rem; }

/* Karten */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card p { margin: .5rem 0; }
.card-pending { color: var(--muted); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.card-head h3 { margin: 0; color: var(--text); }

.badge {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  padding: .15rem .6rem;
  border-radius: 999px;
}
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-pending { background: var(--pending-bg); color: var(--pending-text); }

.meta { margin: .75rem 0; display: flex; flex-wrap: wrap; gap: .25rem 2rem; }
.meta div { display: flex; flex-wrap: wrap; gap: 0 .4rem; }
.meta dt { font-weight: 600; }
.meta dt::after { content: ":"; }
.meta dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .25rem 0 .25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--pending-bg); color: var(--accent-hover); }
.btn[hidden] { display: none; }

@media (max-width: 30rem) {
  .actions .btn { width: 100%; }
}

.url-label { display: block; font-size: .9rem; font-weight: 600; color: var(--muted); margin-top: 1rem; }
.url-group {
  display: flex;
  align-items: stretch;
  margin-top: .25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}
.url-group:focus-within { border-color: var(--accent); }
.url-group .url-field { border: 0; margin: 0; min-width: 0; flex: 1; background: transparent; }
.url-group .url-field:focus-visible { outline-offset: -3px; }
.icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.75rem;
  padding: 0 .85rem;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.icon-btn:last-child { border-radius: 0 6px 6px 0; }
.icon-btn:hover { background: var(--pending-bg); color: var(--accent-hover); }
.icon-btn[hidden] { display: none; }
.icon-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.url-field {
  width: 100%;
  margin-top: .25rem;
  padding: .5rem .65rem;
  font: inherit;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.copy-status { min-height: 1.5em; margin: .3rem 0 0; font-weight: 600; color: var(--ok-text); }
.copy-status.is-error { color: var(--text); }

/* Vergleich */
.compare { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.25rem .5rem;
}
.compare-item ul, .notes { padding-left: 1.25rem; }
.compare-item li, .notes li { margin: .35rem 0; }
.tag {
  font-size: .8rem;
  font-weight: 600;
  vertical-align: middle;
  background: var(--ok-bg);
  color: var(--ok-text);
  padding: .1rem .5rem;
  border-radius: 999px;
}

/* Aufklappbereiche */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: .6rem 0;
}
summary {
  cursor: pointer;
  padding: .85rem 1.1rem;
  font-weight: 600;
  list-style-position: inside;
}
summary:hover { color: var(--accent); }
details[open] > summary { border-bottom: 1px solid var(--border); }
.details-body { padding: .25rem 1.25rem .75rem; }
.details-body ol { padding-left: 1.4rem; }
.details-body li { margin: .35rem 0; }

.hint { color: var(--muted); font-size: .95rem; }
.warn {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  padding: .6rem .85rem;
  border-radius: 4px;
}

/* Fuß */
.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .95rem;
}
.footer-links { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
@media (max-width: 30rem) { .url-field { font-size: .8rem; } }
@media (max-width: 40rem) {
  .url-group { flex-wrap: wrap; }
  .url-group .url-field { flex-basis: 100%; }
  .url-group .icon-btn { flex: 1 1 100%; border-top: 1px solid var(--border); border-left: 0; }
  .icon-btn:last-child { border-radius: 0 0 6px 0; }
}
@media (max-width: 22rem) { .toc ul { gap: .75rem; } .toc a { font-size: .95rem; } }
