/* Shared branding for tables and actions */
:root {
  --brand-red: #dc3545; /* match Members view */
  --brand-red-dark: #b02a37; /* match Members view */
  --brand-black: #212529; /* match Members view */
  --brand-white: #ffffff;
  --brand-border: #dee2e6;
}

/* Utility text color */
.text-brand { color: var(--brand-red) !important; }

/* Card look used in Members/Articles */
.card-brand {
  background: #fff;
  border: 2px solid var(--brand-border);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Modal header brand gradient */
.brand {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color: var(--brand-white);
}
.brand .btn-close { filter: invert(1) brightness(200%); }

/* Sticky header helper for tables */
.table-sticky-header thead th { position: sticky; top: 0; z-index: 1; }

/* Table header (brand) */
.table-head-brand > tr > th,
.table-head-brand th {
  background: var(--brand-red) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-red) !important;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Actions column centering */
.table td.actions-cell, .table th.actions-cell {
  text-align: center;
  vertical-align: middle;
}
.actions-group {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Small spacing for icon buttons */
.btn-icon-gap i { margin-right: .35rem; }

/* Soft brand badge (used in Members/Mail) */
.badge-soft-brand {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--brand-red);
  border: 1px solid rgba(220, 53, 69, 0.25);
}

/* Email preview frame styling */
.email-preview {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
}

/* Table container (scroll wrapper) */
.table-container {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

/* Remove scroll from orderTable and its DataTables wrapper in Overview_Karneval */
#orderTable_wrapper {
  overflow: visible !important;
}

#orderTable_wrapper .dataTables_scroll {
  overflow: visible !important;
}

#orderTable .table-container,
#orderTable.table-container {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* Remove scroll from the table-container that contains orderTable */
.table-container:has(#orderTable),
.table-container:has(#orderTable_wrapper) {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-height: none !important;
}

/* Soft status badges */
.badge-soft-success { background-color: rgba(25, 135, 84, .1); color: #198754; border: 1px solid rgba(25,135,84,.25); }
.badge-soft-danger  { background-color: rgba(220, 53, 69, .1); color: #dc3545; border: 1px solid rgba(220,53,69,.25); }
.badge-soft-muted   { background-color: rgba(33, 37, 41, .05); color: #212529; border: 1px solid rgba(33,37,41,.15); }

/* Brand buttons */
.btn-brand {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color: var(--brand-white);
  border: none;
}
.btn-brand:hover {
  background: linear-gradient(135deg, var(--brand-red-dark), #8b1e2b);
  color: var(--brand-white);
}
.btn-secondary-brand {
  background-color: var(--brand-black);
  color: var(--brand-white);
  border: none;
}
.btn-secondary-brand:hover { background-color: #000; color: var(--brand-white); }
