/* Ergänzt style.css / margins.css um Admin- und Hilfe-spezifische Elemente,
   ohne deren Klassen zu überschreiben. Alles bleibt innerhalb des einen
   #content-Elements, damit die Zentrierung von style.css (body { display:flex;
   justify-content:center }) nicht durch zusätzliche Boxen durcheinandergerät. */

/* Kopfzeile innerhalb der weißen Karte statt eigener Box daneben/darüber */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: -2px -15px 20px -15px;
  padding: 12px 15px;
  border-bottom: thin solid #e0e0e0;
}

.admin-nav a {
  color: #333;
  text-decoration: none;
}

.admin-nav a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.admin-nav-brand {
  font-weight: bold;
  color: var(--blue-dark);
}

.admin-nav-spacer {
  flex: 1;
}

.admin-nav-user {
  color: #666;
  font-size: 0.9em;
}

/* Primäre Aktionen etwas absetzen, damit nicht alles im selben Grauton verschwimmt */
button.primary,
button[type="submit"] {
  background-color: var(--blue);
  border-color: var(--blue-dark);
  color: white;
}

button.primary:hover,
button[type="submit"]:hover {
  background-color: var(--blue-dark);
}

/* Hilfe-Felder im Admin-Formular */
.hilfe-block-header {
  display: flex;
  align-items: center;
}

.hilfe-block .hilfe-entfernen {
  background-color: white;
  border-color: #c66;
  color: #a02020;
}

.hilfe-akkordeon {
  --akkordeon-text: var(--blue-dark);
  --akkordeon-accent: var(--blue);
  --akkordeon-hover-bg: #f5f8ff;
  --akkordeon-border: #e8edf5;

  border-radius: 10px;
  border: 1px solid #dde2ec;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  overflow: hidden;
  background: #fff;
}

.hilfe-akkordeon + .hilfe-akkordeon {
  margin-top: 10px;
}

.hilfe-akkordeon summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--akkordeon-text);
  background: #fff;
  border: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  user-select: none;
}

.hilfe-akkordeon summary::-webkit-details-marker {
  display: none;
}

.hilfe-akkordeon summary::after {
  content: "";
  display: block;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
  opacity: 0.6;
}

.hilfe-akkordeon[open] summary::after {
  transform: rotate(45deg);
}

.hilfe-akkordeon summary:hover {
  background: var(--akkordeon-hover-bg);
}

.hilfe-akkordeon[open] summary {
  background: var(--akkordeon-accent);
  color: #fff;
}

.hilfe-akkordeon[open] summary::after {
  opacity: 0.9;
}

.hilfe-akkordeon-inhalt {
  padding: 18px 18px 20px;
  border-top: 1px solid var(--akkordeon-border);
}

.hilfe-akkordeon--orange {
  --akkordeon-text: var(--orange-dark, #b35a00);
  --akkordeon-accent: var(--orange, #e6822e);
  --akkordeon-hover-bg: #fff6ef;
  --akkordeon-border: #f5e2d0;
}

.flash-success {
  border-color: #a0d4a0;
  background-color: #eaf7ea;
}

.flash-error {
  border-color: #e0a0a0;
  background-color: #fbeaea;
}

table th {
  background-color: #f2f2f2;
}

/* Datentabelle (Dashboard etc.) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: #f5f6f8;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #ebebeb;
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: #f9fafc;
}

/* Aktions-Dropdown (⋮-Menü) */
.action-menu {
  position: relative;
  display: inline-block;
}

.action-menu > summary {
  list-style: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 1.1rem;
  color: #555;
  user-select: none;
  transition: background var(--transition-fast);
}

.action-menu > summary::-webkit-details-marker { display: none; }

.action-menu > summary:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

/* === QR-Code-Seite === */
.qr-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.qr-image-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.qr-image-col img {
  display: block;
  border-radius: 8px;
  border: 1px solid #e0e3e9;
  padding: 12px;
  background: #fff;
}
.qr-options-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.qr-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.qr-option-label {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-090);
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.qr-option-row {
  display: flex;
  gap: 1.25rem;
}
.qr-option-row label {
  font-weight: normal;
  cursor: pointer;
}
.qr-link-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f4f5f7;
  border: 1px solid #e0e3e9;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}
.qr-link-box code {
  flex: 1;
  font-size: 0.8rem;
  word-break: break-all;
  color: #333;
  background: none;
}
.qr-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid #e0e3e9;
}
@media (max-width: 600px) {
  .qr-layout { grid-template-columns: 1fr; }
  .qr-image-col { align-items: stretch; }
  .qr-image-col img { width: 100%; height: auto; }
}

.action-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  overflow: hidden;
}

.action-menu-panel a {
  display: block;
  padding: 9px 16px;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.action-menu-panel a:hover {
  background: #f5f6f8;
  color: var(--blue);
}

.action-menu-panel a.danger {
  color: #b00020;
}

.action-menu-panel a.danger:hover {
  background: #fff5f5;
  color: #b00020;
}

.action-menu-panel .menu-divider {
  border: none;
  border-top: 1px solid #ebebeb;
  margin: 4px 0;
}
