/* ZeroPortal Documentation — style.css */

:root {
  --topbar-h:       56px;
  --sidebar-w:      268px;
  --color-primary:  #1a2b45;
  --color-accent:   #2b7de9;
  --color-accent-h: #1d6ed8;
  --color-accent-bg:#e8f0fe;
  --color-sidebar:  #f7f8fa;
  --color-border:   #e3e7ed;
  --color-text:     #1e293b;
  --color-muted:    #64748b;
  --color-code-bg:  #f1f5f9;
  --color-white:    #ffffff;
  --font:     system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:'Cascadia Code', Consolas, 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

/* ── TOP BAR ─────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--color-primary);
  display: flex; align-items: center;
  padding: 0 1.25rem; gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.topbar-brand {
  display: flex; align-items: baseline; gap: .45rem; flex-shrink: 0;
  text-decoration: none;
}
.topbar-logo {
  font-size: 1.15rem; font-weight: 800; color: #fff;
  letter-spacing: -.03em;
}
.topbar-by {
  font-size: .7rem; color: rgba(255,255,255,.45);
  font-style: italic;
}

.topbar-sep {
  width: 1px; height: 22px;
  background: rgba(255,255,255,.2); flex-shrink: 0;
}

.topbar-nav {
  display: flex; align-items: center; gap: .1rem;
  flex: 1; overflow-x: auto; scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-block;
  padding: .35rem .7rem;
  color: rgba(255,255,255,.78);
  text-decoration: none; font-size: .82rem;
  border-radius: 4px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.13); color: #fff; }
.nav-link.active {
  background: rgba(255,255,255,.18); color: #fff; font-weight: 600;
}

.topbar-tools {
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0;
}
.lang-btn {
  padding: .28rem .65rem;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent; color: rgba(255,255,255,.88);
  border-radius: 4px; font-size: .78rem;
  font-family: var(--font); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lang-btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.6); }

/* ── LAYOUT ──────────────────────────────────────────── */
.layout {
  display: flex;
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; overflow-x: hidden;
  transition: width .2s ease;
}
.sidebar.hidden { width: 0; border-right: none; overflow: hidden; }

.sidebar-nav { padding: 1.1rem 0; }

.sidebar-group-label {
  display: block; padding: .9rem 1rem .3rem;
  font-size: .67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--color-muted);
}

.sidebar-link {
  display: block; padding: .42rem 1rem .42rem 1.35rem;
  color: var(--color-muted); text-decoration: none;
  font-size: .845rem; border-left: 2px solid transparent;
  transition: color .12s, background .12s, border-color .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
}
.sidebar-link:hover { color: var(--color-text); background: var(--color-accent-bg); }
.sidebar-link.active {
  color: var(--color-accent); font-weight: 600;
  border-left-color: var(--color-accent);
  background: var(--color-accent-bg);
}

/* ── CONTENT ─────────────────────────────────────────── */
.content {
  flex: 1; min-width: 0;
  padding: 2.5rem 3rem 4rem;
}
@media (max-width: 900px) {
  .content { padding: 1.5rem 1.25rem 3rem; }
}

.page-section  { display: none; }
.page-section.active { display: block; }

.sub-section   { display: none; }
.sub-section.active { display: block; }

/* ── TYPOGRAPHY ──────────────────────────────────────── */
.content h1 {
  font-size: 1.9rem; font-weight: 800;
  color: var(--color-primary); line-height: 1.2; margin-bottom: .6rem;
}
.content h2 {
  font-size: 1.35rem; font-weight: 700;
  color: var(--color-primary);
  margin: 2.25rem 0 .7rem;
  padding-top: 2rem; border-top: 1px solid var(--color-border);
}
.content h2:first-of-type { margin-top: 1.5rem; padding-top: 0; border-top: none; }
.content h3 {
  font-size: 1.05rem; font-weight: 600;
  color: var(--color-text); margin: 1.6rem 0 .5rem;
}
.content h4 {
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--color-muted); margin: 1.25rem 0 .4rem;
}
.content p {
  font-size: .9375rem; line-height: 1.72;
  color: var(--color-text); margin-bottom: .9rem;
}
.content ul, .content ol {
  margin: .4rem 0 1rem 1.4rem; line-height: 1.72;
}
.content li { font-size: .9375rem; margin-bottom: .3rem; }
.content a:not(.btn) { color: var(--color-accent); text-decoration: none; }
.content a:hover { text-decoration: underline; }

/* ── SECTION HEADER ──────────────────────────────────── */
.section-header {
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-border);
}
.section-subtitle {
  font-size: .95rem; color: var(--color-muted); margin-top: .3rem;
}

/* ── CODE ────────────────────────────────────────────── */
code {
  font-family: var(--font-mono); font-size: .83em;
  background: var(--color-code-bg); padding: .12em .38em;
  border-radius: 3px; color: #c0392b;
}
pre {
  font-family: var(--font-mono); font-size: .84rem;
  background: #1e2a3a; color: #abb2bf;
  padding: 1.2rem 1.5rem; border-radius: 7px;
  overflow-x: auto; margin: .7rem 0 1.2rem; line-height: 1.62;
}
pre code { background: none; padding: 0; color: inherit; font-size: 1em; }

/* PS syntax */
pre .ps-kw   { color: #c678dd; }
pre .ps-cmd  { color: #61afef; }
pre .ps-par  { color: #e06c75; }
pre .ps-str  { color: #98c379; }
pre .ps-cmt  { color: #5c6370; font-style: italic; }
pre .ps-var  { color: #e5c07b; }
pre .ps-num  { color: #d19a66; }
pre .ps-op   { color: #56b6c2; }

/* INI/config syntax */
pre .cfg-sec { color: #61afef; font-weight: 600; }
pre .cfg-key { color: #e06c75; }
pre .cfg-val { color: #98c379; }
pre .cfg-cmt { color: #5c6370; font-style: italic; }

/* SQL syntax */
pre .sql-kw  { color: #c678dd; }
pre .sql-str { color: #98c379; }
pre .sql-cmt { color: #5c6370; font-style: italic; }

/* ── CALLOUTS ─────────────────────────────────────────── */
.callout {
  padding: .85rem 1.1rem; border-radius: 6px; margin: 1rem 0;
  font-size: .905rem; line-height: 1.62; border-left: 3px solid;
}
.callout p { margin-bottom: 0; font-size: inherit; }
.callout-info { background: #eff6ff; border-color: var(--color-accent); color: #1e40af; }
.callout-warn { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.callout-tip  { background: #f0fdf4; border-color: #16a34a; color: #14532d; }

/* ── TABLES ──────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: .9rem 0 1.4rem; font-size: .9rem; }
th {
  text-align: left; padding: .55rem .75rem;
  background: var(--color-code-bg); border-bottom: 2px solid var(--color-border);
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted);
}
td { padding: .55rem .75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
tr:hover td { background: #fafafa; }

/* ── FEATURE GRID ────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .9rem; margin: 1.5rem 0;
}
.feature-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-white);
  transition: box-shadow .15s;
}
.feature-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.feature-card-icon {
  width: 2.2rem; height: 2.2rem; margin-bottom: .6rem;
  color: var(--color-accent);
}
.feature-card-icon svg { display: block; width: 100%; height: 100%; }
.feature-card h3 { font-size: .9rem; margin: 0 0 .35rem; color: var(--color-primary); }
.feature-card p  { font-size: .83rem; margin: 0; color: var(--color-muted); line-height: 1.5; }

/* ── BADGES ──────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .18em .55em;
  border-radius: 12px; font-size: .72em; font-weight: 700; line-height: 1;
}
.badge-new      { background: #dcfce7; color: #15803d; }
.badge-improved { background: #dbeafe; color: #1d4ed8; }
.badge-fixed    { background: #fef3c7; color: #92400e; }
.badge-version  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

/* ── RELEASE BLOCK ───────────────────────────────────── */
.release-block {
  border: 1px solid var(--color-border); border-radius: 8px;
  padding: 1.4rem; margin-bottom: 1.5rem;
}
.release-version {
  display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem;
}
.release-version h2 { margin: 0; padding: 0; border: none; font-size: 1.2rem; }
.release-date { font-size: .83rem; color: var(--color-muted); }

/* ── DOWNLOAD CARD ───────────────────────────────────── */
.download-card {
  display: flex; align-items: center; gap: 1.5rem;
  border: 2px solid var(--color-accent); border-radius: 10px;
  padding: 1.75rem 2rem; max-width: 540px; margin: 1.5rem 0;
}
.download-icon {
  flex-shrink: 0; width: 3.5rem; height: 3.5rem;
  color: var(--color-accent);
}
.download-icon svg { display: block; width: 100%; height: 100%; }
.download-info h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.download-info p  { margin: 0 0 .8rem; color: var(--color-muted); font-size: .875rem; }

.btn {
  display: inline-block; padding: .55rem 1.2rem;
  border-radius: 5px; font-size: .88rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover {
  background: var(--color-accent-h); text-decoration: none;
  box-shadow: 0 3px 10px rgba(43,125,233,.35);
}
.btn-secondary {
  background: transparent; color: var(--color-muted);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-bg-alt); text-decoration: none; }

/* ── ROADMAP ─────────────────────────────────────────── */
.roadmap-item {
  display: flex; gap: 1rem; padding: .85rem 0;
  border-bottom: 1px solid var(--color-border);
}
.roadmap-status { flex-shrink: 0; width: 90px; font-size: .75rem; font-weight: 700; padding-top: .18rem; }
.status-planned    { color: #6b7280; }
.status-inprogress { color: #d97706; }
.status-done       { color: #16a34a; }
.roadmap-desc { font-size: .9rem; line-height: 1.55; }

/* ── CMDLET DOC ──────────────────────────────────────── */
.cmdlet-name {
  font-size: 1.7rem; font-weight: 800;
  font-family: var(--font-mono); color: var(--color-primary);
  margin-bottom: .5rem; word-break: break-all;
}
.cmdlet-synopsis { font-size: 1rem; color: var(--color-muted); font-style: italic; }

.param-list { display: grid; gap: .65rem; margin: .5rem 0 1.4rem; }
.param-entry {
  border: 1px solid var(--color-border); border-radius: 6px;
  padding: .8rem 1rem;
}
.param-name { font-family: var(--font-mono); font-weight: 700; color: var(--color-accent); font-size: .875rem; }
.param-type { font-family: var(--font-mono); font-size: .78rem; color: var(--color-muted); margin-left: .4rem; }
.param-req  {
  display: inline-block; margin-left: .4rem;
  padding: .1em .4em; background: #fee2e2; color: #991b1b;
  border-radius: 3px; font-size: .67rem; font-weight: 700; text-transform: uppercase;
}
.param-desc { margin-top: .35rem; font-size: .875rem; color: var(--color-text); line-height: 1.5; }

/* ── ARCH DIAGRAM ────────────────────────────────────── */
.arch-diagram {
  background: #1e2a3a; color: #abb2bf;
  font-family: var(--font-mono); font-size: .8rem;
  padding: 1.4rem; border-radius: 8px;
  overflow-x: auto; line-height: 1.55; margin: 1rem 0 1.4rem;
  white-space: pre;
}

/* ── STEPS LIST ──────────────────────────────────────── */
.step-list { list-style: none; margin: .5rem 0 1.2rem; padding: 0; counter-reset: step; }
.step-list li {
  display: flex; gap: .85rem; padding: .7rem 0;
  border-bottom: 1px solid var(--color-border); counter-increment: step; font-size: .9375rem;
}
.step-list li::before {
  content: counter(step);
  flex-shrink: 0; width: 1.6rem; height: 1.6rem;
  background: var(--color-accent); color: #fff;
  border-radius: 50%; font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: .15rem;
}

/* ── LANGUAGE TOGGLE ─────────────────────────────────── */
body.lang-en .text-de { display: none; }
body.lang-de .text-en { display: none; }

/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  text-align: center; padding: 2.5rem 1.5rem 1.5rem;
  color: var(--color-muted); font-size: .8rem;
  border-top: 1px solid var(--color-border); margin-top: 3rem;
}
.footer a { color: var(--color-muted); }
.footer a:hover { color: var(--color-accent); text-decoration: underline; }

/* ── CONTACT SIDEBAR (right) ─────────────────────────── */
.sidebar-contact {
  width: 210px; flex-shrink: 0;
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  padding: 1.5rem 1rem;
  border-left: 1px solid var(--color-border);
  background: var(--color-sidebar);
  overflow-y: auto;
}
@media (max-width: 1200px) { .sidebar-contact { display: none; } }

.contact-card { display: flex; flex-direction: column; gap: .7rem; }

.contact-name {
  font-size: .78rem; font-weight: 700;
  color: var(--color-primary); line-height: 1.4;
}
.contact-addr {
  font-size: .78rem; color: var(--color-muted); line-height: 1.6;
}
.contact-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--color-muted);
  text-decoration: none;
}
.contact-row:hover { color: var(--color-accent); }
.contact-row svg {
  width: 1rem; height: 1rem; flex-shrink: 0;
  stroke: var(--color-accent);
}
.contact-row a {
  color: inherit; text-decoration: none; font-size: .78rem;
}
.contact-row a:hover { color: var(--color-accent); text-decoration: underline; }
#contact-email a { color: var(--color-muted); }

/* ── NEWSLETTER SIDEBAR ──────────────────────────────── */
.newsletter-card {
  margin-top: 1.2rem;
  padding: 1rem .8rem 1rem;
  border-top: 1px solid var(--color-border);
  border-radius: 6px;
  background-image: url('../Images/Logos/MadDayNewsletter.jpg');
  background-size: cover;
  background-position: center top;
  position: relative;
}
.newsletter-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 6px;
  background: rgba(0,0,0,.35);
}
.newsletter-title {
  font-size: .78rem; font-weight: 700;
  color: #fff; margin-bottom: .6rem;
  position: relative;
}
#mc_embed_signup { position: relative; }
/* Override Mailchimp defaults for sidebar width */
#mc_embed_signup {
  background: transparent !important;
  width: 100% !important;
  font-size: .75rem !important;
  font-family: inherit !important;
  clear: none !important;
}
#mc_embed_signup .mc-field-group {
  width: 100% !important; padding: 0 0 .4rem !important; min-height: 0 !important;
}
#mc_embed_signup .mc-field-group label {
  display: block; font-size: .72rem; margin-bottom: .2rem;
  color: rgba(255,255,255,.8);
}
#mc_embed_signup .mc-field-group input {
  width: 100% !important; box-sizing: border-box;
  font-size: .75rem; padding: .3rem .5rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  background: rgba(255,255,255,.12);
  color: #fff;
}
#mc_embed_signup .mc-field-group input::placeholder { color: rgba(255,255,255,.4); }
#mc_embed_signup .button {
  width: 100%; font-size: .75rem; padding: .35rem .5rem;
  background: var(--color-accent); color: #fff;
  border: none; border-radius: 4px; cursor: pointer;
  margin-top: .3rem;
}
#mc_embed_signup .button:hover { background: var(--color-accent-h); }
#mc_embed_signup h2 { display: none; }
#mc_embed_signup .indicates-required { display: none; }
#mc_embed_signup .foot { padding: 0 !important; }
#mc_embed_signup .optionalParent { margin-top: .4rem; }
#mc_embed_signup .response { font-size: .72rem; margin: .3rem 0; }
#mc_embed_signup #mce-success-response { color: #81c784; }
#mc_embed_signup #mce-error-response { color: #ef9a9a; }
#mc_embed_signup .refferal_badge { width: 120px !important; height: auto !important; }
/* ── COOKIE MODAL ────────────────────────────────────── */
#cookie-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.cookie-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(2px);
}
.cookie-modal-dialog {
  position: relative; z-index: 1;
  background: var(--color-white); border-radius: 12px;
  padding: 2rem 2.25rem; max-width: 460px; width: calc(100% - 2rem);
  box-shadow: 0 16px 48px rgba(0,0,0,.3);
  text-align: center;
}
.cookie-modal-icon {
  width: 2.8rem; height: 2.8rem;
  color: var(--color-accent); margin: 0 auto 1rem;
  display: block;
}
.cookie-modal-dialog h2 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: .75rem;
  color: var(--color-primary);
}
.cookie-modal-dialog p {
  font-size: .9rem; line-height: 1.65; color: var(--color-muted); margin-bottom: 0;
}
.cookie-modal-dialog code {
  background: var(--color-code-bg); color: #c0392b;
  padding: .1em .35em; border-radius: 3px; font-size: .82em;
}
.cookie-modal-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 1rem; margin-top: 1.5rem;
}
.cookie-modal-policy {
  font-size: .82rem; color: var(--color-accent);
  text-decoration: none; margin-right: auto;
}
.cookie-modal-policy:hover { text-decoration: underline; }

/* ── OUTPUT TABLE (PS) ───────────────────────────────── */
.output-props { display: grid; gap: .4rem; margin: .5rem 0 1.2rem; }
.output-prop {
  display: flex; gap: 1rem; padding: .4rem .8rem;
  background: var(--color-code-bg); border-radius: 4px; font-size: .875rem;
}
.output-prop-name { font-family: var(--font-mono); font-weight: 600; flex-shrink: 0; min-width: 180px; color: var(--color-accent); }
.output-prop-type { font-family: var(--font-mono); color: var(--color-muted); font-size: .8rem; }

/* ── DOWNLOAD COUNT ──────────────────────────────────── */
.download-count-row {
  font-size: .82rem; color: var(--color-muted);
  margin: .3rem 0 .5rem;
}
.download-count-row strong { color: var(--color-primary); }

/* ── SCREENSHOT GALLERY ──────────────────────────────── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin: 1rem 0 1.5rem;
}
.lightbox-thumb {
  cursor: zoom-in;
  border-radius: 6px; overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow .15s, transform .15s;
}
.lightbox-thumb:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); }
.lightbox-thumb img { display: block; width: 100%; height: auto; }
.screenshot-caption {
  font-size: .78rem; color: var(--color-muted);
  padding: .35rem .6rem; background: var(--color-bg-alt);
}

/* ── LIGHTBOX ────────────────────────────────────────── */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.88); z-index: 2000;
  align-items: center; justify-content: center; cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 92vw; max-height: 90vh;
  border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.5);
  cursor: default; object-fit: contain;
}
#lightbox-close {
  position: absolute; top: 1rem; right: 1.4rem;
  color: #fff; font-size: 2.2rem; line-height: 1;
  cursor: pointer; opacity: .7;
  background: none; border: none; padding: 0;
}
#lightbox-close:hover { opacity: 1; }

/* ── DOCUMENTATION IMAGES ────────────────────────────── */
.doc-img {
  display: block;
  max-width: 70%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
