/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  margin: 0 8px 10px 0;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--glow); background: var(--surface-strong); }
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: var(--on-accent); border-color: transparent; }
.btn-primary:hover { background: linear-gradient(90deg, var(--accent), var(--accent2)); filter: brightness(1.08); }
.btn-secondary { background: var(--surface-strong); }
.btn.disabled, .btn:disabled { opacity: 0.45; pointer-events: none; box-shadow: none; }
.btn.fas { font-weight: 900; }
.btn.far { font-weight: 400; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Karten, Listen, Meldungen ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px 22px;
}
.list-group { list-style: none; padding: 0; margin: 0; }
.list-group-item {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.list-group-flush .list-group-item:first-child { border-top: 0; }
.list-group-item-action { transition: background 0.2s; }
.list-group-item-action:hover { background: var(--surface-strong); text-decoration: none; }
.list-group-item.active { background: var(--surface-strong); }

.alert {
  margin: 0 0 1em;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
}
.alert p:last-child { margin-bottom: 0; }
.alert-info { border-left-color: var(--accent); }
.alert-warning { border-left-color: var(--warning); }
.alert-danger { border-left-color: var(--danger); }

.img-thumbnail {
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.img-responsive { max-width: 100%; height: auto; }

/* ---------- Tabellen ---------- */
.table { width: 100%; margin-bottom: 1.2em; }
.table th, .table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.table th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.table-bordered th, .table-bordered td { border: 1px solid var(--line); }
.table-striped tbody tr:nth-child(odd) { background: var(--surface); }
.table-responsive { overflow-x: auto; }

/* ---------- Formulare ---------- */
input:not([type="checkbox"], [type="radio"], [type="submit"], [type="hidden"], [type="file"]), select, textarea {
  max-width: 100%;
  padding: 0.55em 0.8em;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
select option { background: var(--bg2); color: var(--text); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
label { font-weight: 600; }
.form-group, .control-group { margin-bottom: 0.8rem; border-radius: var(--radius); }
.control-label { display: inline-block; margin-bottom: 0.3rem; }
.form-text { display: block; margin-top: 0.25rem; color: var(--muted); }
form button[type="submit"]:not(.btn), form input[type="submit"]:not(.btn) {
  padding: 0.65em 1.4em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: var(--on-accent);
  font-weight: 700;
}
.field { margin-bottom: 1rem; }
.field > label { display: block; margin-bottom: 0.3rem; }
.field > input:not([type="checkbox"], [type="radio"]), .field > select, .field > textarea { display: block; width: 100%; max-width: 30rem; }
.field-check { display: flex; align-items: center; gap: 0.6rem; }
.field-check > label { margin: 0; }
.field-check > .form-text { flex-basis: 100%; }
.has-error > input, .has-error > select, .has-error > textarea { border-color: var(--danger); }
.errorlist { list-style: none; padding: 0; margin: 0 0 0.5em; color: var(--danger); }

/* ---------- Dialog (nur Struktur, geöffnet wird er nirgends) ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg);
}
.modal.show { display: flex; }
.modal-dialog { max-width: 520px; width: 100%; padding: 0 var(--gutter); }
.modal-content { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg2); box-shadow: var(--shadow-media); }
.modal-header, .modal-footer { padding: 16px 20px; }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.modal-title { margin: 0; }

/* ---------- Warenkorb-Symbol ---------- */
.cosmatx-image-with-overlay-wrapper { position: relative; text-align: center; float: left; }
.cosmatx-image-overlay-text { position: absolute; left: 0; bottom: 40%; width: 100%; color: var(--accent2); }

/* ---------- Karussell ---------- */
.carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--media-bg);
  box-shadow: var(--shadow-media);
}
.carousel-inner { position: relative; }
.carousel-item { display: none; }
.carousel-item.active { display: block; animation: carousel-fade 0.7s ease; }
.carousel-item video, .carousel-item img { width: 100%; }
.carousel-indicators {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.carousel-indicators li { width: 12px; height: 12px; border-radius: 50%; background: var(--control-line); cursor: pointer; }
.carousel-indicators li.active { background: var(--accent); }
.carousel-control-prev, .carousel-control-next {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}
.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }
.carousel-control-prev:hover, .carousel-control-next:hover,
.carousel-control-prev:focus-visible, .carousel-control-next:focus-visible { opacity: 1; background: var(--surface-strong); text-decoration: none; }
.carousel-control-prev-icon::before, .carousel-control-next-icon::before { font-size: 2.4rem; line-height: 1; }
.carousel-control-prev-icon::before { content: "\2039"; }
.carousel-control-next-icon::before { content: "\203A"; }
@keyframes carousel-fade { from { opacity: 0; } to { opacity: 1; } }
.table td p { margin-top: 0; margin-bottom: 0; }
form.form { margin-bottom: 1.5rem; }
.table td { vertical-align: middle; }
.table td .btn { margin: 0; }
.table td p.text-md-right { white-space: nowrap; }
