/* ---------------------------------------------------------------------------
   tec_help/css/screen.css
   Theme-Farben kommen als CSS-Variablen aus index.php:
   --nav-bg, --active-bg, --accent
--------------------------------------------------------------------------- */
:root {
  --text:   #1A1A2E;
  --muted:  #6B7280;
  --border: #E5E7EB;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; border: none; }
img.imgcontent { border-radius: 4px; margin: 12px 0; box-shadow: 0 2px 8px rgba(0,0,0,.1); padding: 0; }

/* ---------------------------------------------------------------------------
   HEADER
--------------------------------------------------------------------------- */
.site-header {
  background: var(--nav-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
}
.header-brand { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.header-label { font-size: 1rem; font-weight: 700; color: #fff; white-space: nowrap; }
.header-sep   { color: var(--accent); }
.header-topic { font-size: .88rem; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search-form  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.search-input {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  color: #fff;
  font-size: .88rem;
  padding: 6px 10px;
  width: 190px;
  outline: none;
}
.search-input::placeholder { color: rgba(255,255,255,.5); }
.search-input:focus { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); }
.search-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 2px;
  line-height: 1;
}

/* ---------------------------------------------------------------------------
   LAYOUT
--------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 52px);
}

/* ---------------------------------------------------------------------------
   SIDEBAR
--------------------------------------------------------------------------- */
.sidebar {
  border-right: 1px solid var(--border);
  background: #fafafa;
  overflow-y: auto;
}

.nav-parent { border-bottom: 1px solid var(--border); }

.nav-parent__link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  transition: background .15s;
  line-height: 1.3;
}
.nav-parent__link:hover            { background: #efefef; }
.nav-parent__link--active          { background: var(--active-bg); color: #fff; }
.nav-parent__link--active:hover    { background: var(--active-bg); }

.nav-arrow { font-size: .7rem; opacity: .7; flex-shrink: 0; }

.nav-children { background: #fff; }

.nav-child {
  display: block;
  padding: 8px 14px 8px 30px;
  font-size: .84rem;
  color: var(--muted);
  border-bottom: 1px solid #f3f3f3;
  transition: background .12s;
  line-height: 1.3;
}
.nav-child:hover             { background: #f5f5f5; color: var(--text); }
.nav-child--active           { color: var(--text); font-weight: 600; background: #f0f0f0; border-left: 3px solid var(--active-bg); padding-left: 27px; }

/* ---------------------------------------------------------------------------
   CONTENT
--------------------------------------------------------------------------- */
.content {
  padding: 28px 36px;
  max-width: 860px;
}

/* Tab-Leiste (Unterthemen zum aktuellen Formular) */
.help-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.help-tab {
  font-size: .88rem;
  color: var(--muted);
  padding: 4px 0;
}
.help-tab:hover        { color: var(--text); }
.help-tab--active      { color: var(--text); font-weight: 600; }

/* Help-Inhalt (aus DB / TinyMCE) */
.help-body h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  line-height: 1.3;
}
.help-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  line-height: 1.3;
}
.help-body h3 {
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 8px;
}
.help-body h4 {
  font-size: .9rem;
  font-weight: 600;
  color: #b91c1c;
  margin: 14px 0 6px;
}
.help-body p {
  font-size: .93rem;
  line-height: 1.75;
  margin-bottom: 12px;
  color: var(--text);
}
.help-body ul, .help-body ol {
  margin: 6px 0 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.help-body li { font-size: .9rem; line-height: 1.6; }
.help-body a  { color: #1f4591; text-decoration: underline; }
.help-body hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.help-body table { border-collapse: collapse; margin: 12px 0; width: 100%; }
.help-body td, .help-body th { border: 1px solid var(--border); padding: 6px 10px; font-size: .88rem; vertical-align: top; }
.help-body th { background: #f5f7fa; font-weight: 600; text-align: left; }
.help-body tr:nth-child(even) td { background: #fafafa; }

/* Bilder im Hilfe-Text */
.help-body img { border-radius: 4px; margin: 12px 0; box-shadow: 0 2px 8px rgba(0,0,0,.1); display: block; }

/* ---------------------------------------------------------------------------
   SUCHERGEBNISSE
--------------------------------------------------------------------------- */
.search-info { font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.search-info strong { color: var(--text); }

.search-result {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.search-result__title {
  font-size: .97rem;
  font-weight: 600;
  color: #1f4591;
  display: block;
  margin-bottom: 4px;
}
.search-result__title:hover { color: #2b6ad0; }
.search-result__kw { font-weight: 400; font-size: .82rem; color: var(--muted); }
.search-result__preview { font-size: .87rem; color: var(--muted); line-height: 1.55; }

.no-result { color: var(--muted); font-size: .93rem; padding: 24px 0; }

/* ---------------------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------------------- */
@media (max-width: 680px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--border); max-height: 40vh; }
  .content { padding: 20px 16px; }
  .header-topic { display: none; }
  .search-input { width: 130px; }
}
