/* Public website: front page portal, content pages, rich text, RSS feeds, and the admin editor */

/* ── Menu bar ── */
.site-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 7px 22px;
  background: linear-gradient(180deg, var(--title-a), var(--title-b)); box-shadow: 0 2px 12px rgba(60, 30, 90, .25);
  border-bottom: 1px solid #6a90c8;
}
.site-logo {
  font: 900 18px "Trebuchet MS", Verdana, sans-serif; color: #fff; text-decoration: none; white-space: nowrap;
  -webkit-text-stroke: 1px #b0407a; text-shadow: 0 2px 0 #b0407a;
}
.site-logo span { color: #fff3a8; -webkit-text-stroke-color: #5a4aa0; text-shadow: 0 2px 0 #5a4aa0; }
.site-menu { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.site-menu a {
  color: #fff; text-decoration: none; padding: 5px 14px; border-radius: 14px; font-weight: bold; font-size: 12px;
  border: 1px solid transparent; text-shadow: 0 1px 0 rgba(30, 50, 110, .5);
}
.site-menu a:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.12); }
.site-menu a.active { background: #fff; color: var(--pink-d); text-shadow: none; }
.site-menu a.ext::after { content: " ↗"; font-size: 10px; }
.site-play { text-decoration: none; white-space: nowrap; }
.menu-toggle, .burger { display: none; }

/* Mobile: the menu collapses behind a burger button */
@media (max-width: 760px) {
  .site-bar { flex-wrap: wrap; gap: 10px; padding: 7px 12px; }
  .site-logo { flex: 1; font-size: 16px; }
  .site-play { order: 2; padding: 5px 12px; }
  .menu-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
  .burger {
    order: 3; display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 34px;
    padding: 0 9px; box-sizing: border-box; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.14);
  }
  .burger span { display: block; height: 3px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .menu-toggle:focus-visible ~ .burger { outline: 2px solid #fff3a8; outline-offset: 2px; }
  .site-menu {
    order: 4; flex: 1 0 100%; flex-direction: column; flex-wrap: nowrap; gap: 2px;
    max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease;
  }
  .site-menu a { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
  .menu-toggle:checked ~ .site-menu { max-height: 80vh; overflow-y: auto; padding: 4px 0 8px; }
  .menu-toggle:checked ~ .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle:checked ~ .burger span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked ~ .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── Front page ── */
.screen.portal { display: block; overflow-y: auto; user-select: text; }
.portal-main { max-width: 1060px; margin: 0 auto; padding: 22px 20px 30px; position: relative; }
.portal .logo { margin: 4px 0 22px; }
.portal .logo h1 { font-size: 52px; }
.portal .logo h1 span { font-size: 28px; }
.portal-cols { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 820px) { .portal-cols { grid-template-columns: 1fr; } .side-col { order: -1; } }
.side-col { display: flex; flex-direction: column; gap: 16px; }
.portal .login-panel { width: auto; }
#front-avatar, #welcome-avatar {
  display: block; margin: -4px auto 8px; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #fff 0%, #ffe3ef 55%, #e2dcff 100%); border: 1px solid var(--line);
}
.welcome-text { text-align: center; font-size: 13px; margin: 0 0 12px; }
.stats-panel .stat-line { padding: 3px 0; }
.stats-panel b { font-size: 16px; color: var(--pink-d); }

.news-panel .panel-body { padding: 6px 20px 14px; }
.news-item { padding: 14px 0 12px; border-bottom: 1px dashed var(--line); }
.news-item:last-of-type { border-bottom: 0; }
.news-item h3 { margin: 0; font: bold 17px "Trebuchet MS", Verdana, sans-serif; }
.news-item h3 a { color: #5a4aa0; text-decoration: none; }
.news-item h3 a:hover { color: var(--pink-d); }
.news-meta { color: var(--ink-soft); font-size: 10px; margin: 2px 0 8px; }
.news-more { margin: 10px 0 0; text-align: right; }
.news-more a, .pager a { color: var(--pink-d); font-weight: bold; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.pager a, .pager b { padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.pager b { background: var(--pink); color: #fff; border-color: var(--pink-d); }

.site-foot { text-align: center; color: var(--ink-soft); padding: 26px 10px 18px; font-size: 10px; }

/* ── Content pages ── */
body.site-page { overflow: auto; height: auto; min-height: 100%; user-select: text; }
.page-main { max-width: 860px; margin: 26px auto 0; padding: 0 20px; }
.page-panel .panel-title { font-size: 15px; padding: 9px 16px; }
.page-panel .panel-body { padding: 18px 26px 24px; }
.badge { display: inline-block; padding: 0 6px; border-radius: 8px; background: var(--pink); color: #fff; font-size: 10px; font-weight: bold; }
.badge.muted { background: #ddd6ea; color: var(--ink-soft); }

/* ── Rich text (shared by pages, news and the editor) ── */
.rich { font-size: 12px; line-height: 1.65; overflow-wrap: break-word; }
.rich > :first-child { margin-top: 0; }
.rich p { margin: 0 0 10px; }
.rich h2, .rich h3, .rich h4 { font-family: "Trebuchet MS", Verdana, sans-serif; color: #5a4aa0; margin: 18px 0 8px; line-height: 1.25; }
.rich h2 { font-size: 19px; }
.rich h3 { font-size: 16px; }
.rich h4 { font-size: 13px; }
.rich a { color: var(--pink-d); font-weight: bold; }
.rich a[target=_blank]::after { content: " ↗"; font-size: .85em; font-weight: normal; }
.rich ul, .rich ol { margin: 0 0 10px; padding-left: 24px; }
.rich li { margin: 2px 0; }
.rich blockquote { margin: 0 0 10px; padding: 8px 14px; border-left: 4px solid var(--pink); background: #fff3f8; border-radius: 0 8px 8px 0; color: #6a4a62; }
.rich pre { background: #2f2840; color: #f0e8ff; padding: 10px 12px; border-radius: 8px; overflow: auto; font: 11px/1.5 Consolas, monospace; }
.rich code { background: #efe8f8; padding: 0 4px; border-radius: 4px; font-family: Consolas, monospace; }
.rich pre code { background: none; padding: 0; }
.rich img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.rich hr { border: 0; border-top: 2px dashed var(--line); margin: 16px 0; }

/* ── RSS feeds ── */
.rss-feed { margin: 8px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbf8ff; overflow: hidden; }
.rss-head { padding: 7px 12px; background: #ece6f6; font-weight: bold; }
.rss-head a { color: #5a4aa0; }
.rss-icon { display: inline-block; padding: 0 5px; border-radius: 4px; background: #f39a2c; color: #fff; font-size: 9px; font-weight: bold; vertical-align: 1px; }
.rss-feed ul { list-style: none; margin: 0; padding: 0; }
.rss-feed li { padding: 8px 12px; border-top: 1px solid #ebe4f4; }
.rss-feed li:first-child { border-top: 0; }
.rss-feed li p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.rss-date { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.rss-error { margin: 0; padding: 10px 12px; color: var(--ink-soft); font-style: italic; }

/* ── Admin rich text editor ── */
.rt-form > label:not(.check) { margin-bottom: 9px; }
.rte { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin: 3px 0 12px; overflow: hidden; }
.rte-bar {
  display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 5px 6px; background: #f3eefa;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
.rte-bar button, .rte-bar select, .rte-color {
  min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid transparent; border-radius: 5px; background: none;
  font: 12px var(--font); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.rte-bar select { border-color: var(--line); background: #fff; }
.rte-bar button:hover, .rte-color:hover { border-color: var(--line); background: #fff; }
.rte-bar button.on { background: var(--pink); border-color: var(--pink-d); color: #fff; }
.rte-bar button:disabled, .rte-bar select:disabled { opacity: .35; cursor: default; }
.rte-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
.rte-color { position: relative; margin: 0 !important; font-weight: bold; }
.rte-color span { border-bottom: 3px solid var(--pink-d); line-height: 1; }
.rte-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rte-src { margin-left: auto; }
.rte-area { min-height: 280px; max-height: 60vh; overflow: auto; padding: 14px 18px; outline: none; user-select: text; }
.rte-area:focus { box-shadow: inset 0 0 0 2px #ffd0e4; }
.rte-source { display: block; width: 100%; min-height: 280px; border: 0; padding: 12px; font: 11px/1.5 Consolas, monospace; resize: vertical; outline: none; }
.rte-help { padding: 5px 10px; background: #faf7fd; border-top: 1px solid #ebe4f4; color: var(--ink-soft); font-size: 10px; }
.rte-area .rss-embed {
  margin: 8px 0; padding: 12px 14px; border: 2px dashed #f39a2c; border-radius: 10px; background: #fff8ef; cursor: pointer;
  color: #8a5a20; font-weight: bold; user-select: none;
}
.rte-area .rss-embed::before { content: "📰 RSS-feed: " attr(data-rss); display: block; overflow-wrap: anywhere; }
.rte-area .rss-embed::after { content: "Viser de nyeste " attr(data-count) " indlæg · dobbeltklik for at ændre"; display: block; font-weight: normal; font-size: 10px; margin-top: 3px; }

/* the admin form styles make inputs full-width blocks; the toolbar needs them inline */
.editor .rte-bar select { display: inline-flex; width: auto; margin-top: 0; padding: 0 6px; }
.editor .rte-bar input[type=color] { margin: 0; padding: 0; }
.editor .rte-source { border: 0; border-radius: 0; margin: 0; }
.rt-form .form-foot { align-items: center; flex-wrap: wrap; }
.rt-form .form-foot label.check { white-space: nowrap; margin: 0 10px 0 0; }
#welcome-box .admin-link a { color: var(--pink-d); font-weight: bold; }

/* Optional welcome text under the logo, and the admin texts form */
.portal-intro { max-width: 760px; margin: -6px auto 20px; }
.texts-form fieldset { margin-bottom: 14px; }
.texts-form input::placeholder { color: #b0a6be; }
.reset-texts { margin-top: 12px; text-align: right; }

/* ── Cookie banner, footer links ── */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px;
  background: rgba(255, 252, 255, .97); border-top: 2px solid var(--pink); box-shadow: 0 -4px 18px rgba(60, 30, 90, .18);
}
.cookie-inner { max-width: 1000px; margin: 0 auto; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-inner p { margin: 3px 0 0; font-size: 12px; max-width: 680px; }
.cookie-inner a, .foot-links a { color: var(--pink-d); font-weight: bold; }
.cookie-actions { display: flex; gap: 8px; margin: 10px 0; }
.foot-links { margin-top: 5px; }
body:has(.cookie-banner) .site-foot { padding-bottom: 120px; }

/* ── Account page ── */
.account .page-panel { margin-bottom: 16px; }
.account .flash { padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; background: #e9fbef; border: 1px solid #7fd49a; color: #1f6a3a; font-weight: bold; }
.account .flash.error { background: #fff0f2; border-color: #f0a0b0; color: #b0203a; }
.account .btn.danger { border-color: #d0607a; color: #b0203a; }
.acct-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .acct-cols { grid-template-columns: 1fr; } }
.acct-form { margin: 0 0 8px; }
.acct-form.narrow { max-width: 360px; }
.acct-form label.check { display: flex; gap: 6px; align-items: flex-start; font-weight: normal; }
.acct-form label.check input { width: auto; margin-top: 2px; }
.setup { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.setup .qr { width: 205px; height: 205px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; }
.setup .secret { font-size: 14px; letter-spacing: 1px; background: #f3eefa; padding: 3px 6px; border-radius: 5px; display: inline-block; margin-top: 4px; }
.setup-steps { margin: 0 0 12px; padding-left: 20px; }
.codes-box { background: #fff8e0; border: 1px solid #f0d080; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 6px 0 0; }
.codes code { font-size: 14px; background: #fff; padding: 2px 6px; border-radius: 5px; border: 1px solid #f0d080; }
.ok-line { color: #1f6a3a; }
.warn-2fa { color: #b0203a !important; font-weight: bold; }
.link { background: none; border: 0; padding: 0; color: var(--pink-d); text-decoration: underline; cursor: pointer; }
