/* Shared UI: Surfaces, Help-Akkordeon, Zurück-Button */

/* ---- Surface utilities ---- */
.cc-panel {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  min-width: 0;
  box-sizing: border-box;
}

.cc-card {
  margin: 0;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  box-sizing: border-box;
}

.cc-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(62, 207, 255, 0.12);
  color: var(--accent);
}

.cc-icon-box svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Gruppenfilter-Hinweis (Forum, Poll, Termine, Clanmembers, Popups) */
.cc-groups-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  vertical-align: middle;
  background-color: var(--accent);
  -webkit-mask: url("../../images/general/shared/icon-groups.svg") center / contain no-repeat;
  mask: url("../../images/general/shared/icon-groups.svg") center / contain no-repeat;
}

/* ---- Help details ---- */
.cc-help-details {
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.cc-help-details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color var(--ease);
}

.cc-help-details > summary::-webkit-details-marker {
  display: none;
}

.cc-help-details > summary:hover {
  background: rgba(62, 207, 255, 0.06);
}

.cc-help-details > summary::after {
  content: "";
  width: 0.55em;
  height: 0.55em;
  margin-left: auto;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.cc-help-details[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.cc-help-icon {
  /* alias of .cc-icon-box */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(62, 207, 255, 0.12);
  color: var(--accent);
}

.cc-help-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cc-help-summary-main {
  font-weight: 700;
  color: var(--text);
}

.cc-help-summary-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.cc-help {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cc-help p {
  margin: 0 0 10px;
}

.cc-help p:last-child {
  margin-bottom: 0;
}

.cc-help strong {
  color: var(--text);
}

.cc-help code {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inset);
  color: var(--text);
  font-size: 0.88em;
  word-break: break-all;
}

/* ---- Back button (ghost, distinct from primary actions) ---- */
.cc-back {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 0;
}

/* Inline next to primary actions (e.g. Speichern + Zurück) */
.ga-form-actions .cc-back-btn,
.iis-form-actions .cc-back-btn,
.ism-form-actions .cc-back-btn,
.ifr-form-actions .cc-back-btn,
.iua-form-actions .cc-back-btn {
  flex: 0 0 auto;
}

.cc-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background-color var(--ease);
}

.cc-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(62, 207, 255, 0.06);
  text-decoration: none;
}

.cc-back-btn svg,
.cc-back-icon {
  display: block;
  width: 16px;
  height: 16px;
  max-width: none;
  flex: 0 0 auto;
  fill: none;
}

button.cc-back-btn {
  font: inherit;
}

@media (max-width: 760px) {
  .cc-back-btn {
    width: 100%;
  }
}

/* ---- Top-100 Forumposter tabs (shared include) ---- */
.tfp-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tfp-tabs-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tfp-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tfp-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inset);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: border-color var(--ease), background-color var(--ease), color var(--ease);
}

.tfp-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tfp-tab.is-active {
  border-color: var(--accent);
  background: rgba(62, 207, 255, 0.12);
  color: var(--accent);
}

@media (max-width: 640px) {
  .tfp-tabs {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Flash-/Statusmeldungen (ersetzt legacy <font class="error|…">) */
.cc-flash {
  display: block;
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.cc-flash--error { color: var(--red); }
.cc-flash--success { color: var(--green); }
.cc-flash--info { color: var(--orange); }

.cc-center {
  text-align: center;
}

.cc-text-xs { font-size: 0.75rem; }
.cc-text-sm { font-size: 0.875rem; }
.cc-text-lg { font-size: 1.125rem; }
.cc-text-xl { font-size: 1.35rem; }
.cc-text-title { font-size: 1.5rem; font-weight: 700; }
.cc-text-bold { font-weight: 700; }

.cc-dberror {
  width: 98%;
  margin: 0 auto;
  padding: 10px;
  border: 2px solid var(--red);
  background: color-mix(in srgb, var(--red) 85%, #000);
  color: #fff;
  text-align: left;
  box-sizing: border-box;
}

.cc-dberror-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.cc-dberror-lead {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.cc-dberror-back {
  cursor: pointer;
  color: #fff;
  text-decoration: underline;
}

.gallery_comment_badge {
  background-color: var(--surface) !important;
  color: var(--text);
}

.album_tags_span.is-active {
  background-color: var(--green);
}
