/* DinnerSpots.de — Entwickler-Doku (/entwickler, /entwickler/api) */

.docs { padding-bottom: 3rem; }
@media (min-width: 1024px) {
  .docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; align-items: start; }
}

/* Inhaltsverzeichnis */
.docs-toc { margin-bottom: 1.5rem; }
.docs-toc details { background: var(--card); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.docs-toc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; font-size: 14px; font-weight: 700; cursor: pointer; }
.docs-toc summary::-webkit-details-marker { display: none; }
.docs-toc details[open] summary .ic { transform: rotate(180deg); }
.docs-toc ol { list-style: none; margin: 0; padding: 0 .5rem .75rem; }
.docs-toc li a { display: block; padding: .3rem .5rem; border-radius: var(--r-sm); font-size: 13px; line-height: 19px; font-weight: 600; color: var(--muted); }
.docs-toc li a:hover { color: var(--coral); background: var(--coral-soft); }
.docs-toc li.sub a { padding-left: 1.25rem; font-weight: 500; }
@media (min-width: 1024px) {
  .docs-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; margin-bottom: 0; }
  .docs-toc details { background: none; box-shadow: none; }
  .docs-toc summary { padding: 0 .5rem .5rem; cursor: default; pointer-events: none; color: var(--muted-2); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
  .docs-toc summary .ic { display: none; }
  .docs-toc ol { padding: 0; border-left: 2px solid var(--line); }
  .docs-toc li a { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-left: -2px; border-left: 2px solid transparent; }
  .docs-toc li a:hover { border-left-color: var(--coral); }
}

/* Fließtext */
.docs-body { min-width: 0; max-width: 780px; }
.docs-body > section { padding-top: .5rem; }
.docs-body > section + section { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.docs-body h2 { font-size: 22px; line-height: 30px; letter-spacing: -.01em; margin: 0 0 .75rem; }
.docs-body h3 { font-size: 17px; line-height: 25px; margin: 1.75rem 0 .5rem; }
.docs-body h4 { font-size: 14px; line-height: 21px; margin: 1.25rem 0 .4rem; }
.docs-body p, .docs-body li { color: #374151; font-size: 15px; line-height: 26px; }
.docs-body p + p { margin-top: .75rem; }
.docs-body ul, .docs-body ol { padding-left: 1.2rem; margin: .5rem 0; }
.docs-body li + li { margin-top: .2rem; }
.docs-body a:not(.btn):not(.docs-way) { color: var(--coral-strong); font-weight: 600; }
.docs-body a:not(.btn):not(.docs-way):hover { text-decoration: underline; }
.docs-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .86em; background: var(--field); border-radius: 5px; padding: .1em .35em; overflow-wrap: anywhere; }
.docs-body .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* Code-Blöcke */
.docs-code { position: relative; margin: .9rem 0 1.1rem; }
.docs-code .docs-code-label { display: block; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); margin-bottom: .35rem; }
.docs-code pre {
  margin: 0; padding: 1rem 1.1rem; padding-right: 4.75rem;
  background: #1E272E; color: #E8ECEF; border-radius: var(--r-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px; line-height: 21px; overflow-x: auto; tab-size: 2;
}
.docs-code pre code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.docs-code .c { color: #8FA3B0; }
.docs-copy {
  position: absolute; right: .5rem; bottom: .5rem;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .6rem; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .1); color: #E8ECEF; font-size: 12px; font-weight: 600;
}
.docs-copy:hover { background: rgba(255, 255, 255, .2); }
.docs-copy.is-done { background: var(--success); color: #fff; }

/* Endpunkte */
.docs-body .ep { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2rem 0 .5rem; font-size: 15px; }
.ep code { background: none; padding: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.ep-m { display: inline-block; min-width: 4.1rem; text-align: center; padding: .15rem .5rem; border-radius: 6px; font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .04em; color: #fff; }
.ep-get { background: #15803D; }
.ep-post { background: var(--coral-strong); }
.ep-patch { background: #B45309; }
.ep-put { background: #1D4ED8; }
.ep-delete { background: #9F1239; }
.ep-scope { margin-left: auto; font-size: 11px; line-height: 16px; font-weight: 700; padding: .15rem .55rem; border-radius: var(--pill); background: var(--field); color: var(--charcoal); }

/* Tabellen */
.docs-table-wrap { overflow-x: auto; margin: .75rem 0 1.25rem; border-radius: var(--r-md); box-shadow: var(--sh-1); background: var(--card); }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 21px; }
.docs-table th, .docs-table td { text-align: left; vertical-align: top; padding: .6rem .85rem; border-bottom: 1px solid var(--line); }
.docs-table th { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--field); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td { color: #374151; }
.docs-table td:first-child { white-space: nowrap; }
.docs-table td code { font-size: 12.5px; }
@media (max-width: 639px) {
  .docs-table th, .docs-table td { padding: .55rem .65rem; }
  .docs-table td:first-child { white-space: normal; }
  /* Endpunkt-Liste: Methode + Pfad über der Beschreibung */
  .docs-table.is-stack tr { display: block; padding: .55rem .65rem; border-bottom: 1px solid var(--line); }
  .docs-table.is-stack tr:last-child { border-bottom: 0; }
  .docs-table.is-stack td { display: block; padding: 0; border: 0; }
  .docs-table.is-stack td + td { margin-top: .3rem; }
  .docs-table.is-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .docs-table.is-stack td[data-label]::before { content: attr(data-label) ": "; font-size: 12px; font-weight: 700; color: var(--muted); }
}

/* Hinweise */
.docs-note { display: flex; gap: .7rem; align-items: flex-start; margin: 1rem 0; padding: .85rem 1rem; border-radius: var(--r-md); background: #EFF4FB; color: #1E3A5F; font-size: 14px; line-height: 22px; }
.docs-note > .ic { color: #2F6DB5; margin-top: 1px; }
.docs-note p { color: inherit; font-size: inherit; line-height: inherit; }
.docs-note.is-warn { background: var(--award-bg); color: var(--award-fg); }
.docs-note.is-warn > .ic { color: var(--award-fg); }

/* Drei Wege (Übersicht) */
.docs-body .docs-ways { display: grid; gap: .75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .docs-body .docs-ways { grid-template-columns: repeat(3, 1fr); } }
.docs-body .docs-ways li { margin: 0; }
.docs-ways .docs-way { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1rem 1.1rem; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1); color: var(--ink); font-weight: 400; transition: box-shadow .15s; }
.docs-ways .docs-way:hover { box-shadow: var(--sh-2), 0 0 0 1px rgba(231, 76, 60, .35); color: var(--ink); }
.docs-ways .ic { color: var(--coral); }
.docs-ways strong { font-size: 15px; }
.docs-ways span { font-size: 13px; line-height: 20px; color: var(--muted); }

/* Link-Baukasten */
.linkkit { margin: 1rem 0 1.5rem; padding: 1.1rem; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-2); }
@media (min-width: 640px) { .linkkit { padding: 1.4rem 1.5rem; } }
.linkkit-row { display: grid; gap: .35rem; margin-bottom: 1rem; }
.linkkit-row > label, .linkkit-row > .linkkit-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.linkkit input[type="text"] { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); font-size: 15px; }
.linkkit input[type="text"]:focus { outline: none; border-color: var(--coral); background: #fff; box-shadow: 0 0 0 3px rgba(231, 76, 60, .15); }
.linkkit input[aria-invalid="true"] { border-color: var(--coral-strong); background: var(--coral-soft); }
.linkkit-err { font-size: 13px; color: var(--coral-strong); font-weight: 600; }
.linkkit-chans { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; margin: 0; padding: 0; }
.linkkit-chans label { position: relative; }
.linkkit-chans input { position: absolute; opacity: 0; pointer-events: none; }
.linkkit-chans span { display: inline-flex; align-items: center; padding: .4rem .8rem; border-radius: var(--pill); background: var(--field); font-size: 13px; font-weight: 600; color: var(--charcoal); cursor: pointer; user-select: none; }
.linkkit-chans input:checked + span { background: var(--charcoal); color: #fff; }
.linkkit-chans input:focus-visible + span { outline: 3px solid rgba(231, 76, 60, .45); outline-offset: 2px; }
.linkkit-color { display: flex; align-items: center; gap: .6rem; }
.linkkit-color input[type="color"] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
.linkkit-color code { font-size: 13px; }
.linkkit-out { margin-top: .25rem; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--coral-soft); }
.linkkit-out output { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.5px; line-height: 21px; color: var(--ink); overflow-wrap: anywhere; }
.linkkit-out output.is-empty { font-family: var(--font); color: var(--muted); }
.linkkit-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.linkkit-actions .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.docs-body .linkkit-hint { margin-top: .75rem; font-size: 13px; line-height: 20px; color: var(--muted); }
.docs-body .linkkit-hint strong { color: var(--ink); }
