/* Privilege Config screen styles (Figma 600:15960).
 *
 * All colour, spacing and typography values use --wa-* tokens exclusively.
 * A raw hex here would not follow a theme change; an INVENTED token name would
 * resolve to nothing while every static check still passed — the failure mode
 * the design-system Playwright spec exists to catch.
 */

.privilege-config {
  padding: var(--wa-space-xl);
  max-width: 1600px;
  background: var(--wa-color-surface-lowered);
}

.privilege-config__header {
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-s);
  margin-bottom: var(--wa-space-l);
}

.privilege-config__breadcrumb {
  font-size: var(--wa-font-size-s);
  color: var(--wa-color-text-quiet);
}

.privilege-config__title {
  font-size: var(--wa-font-size-xl);
  font-weight: var(--wa-font-weight-bold);
  color: var(--wa-color-text-normal);
  margin: 0;
}

.privilege-config__subtitle,
.privilege-config__event {
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-m);
}

.privilege-config__empty {
  background: var(--wa-color-surface-default);
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-l);
  padding: var(--wa-space-xl);
  text-align: center;
}

.privilege-config__table-wrap {
  overflow-x: auto;
  background: var(--wa-color-surface-default);
  border-radius: var(--wa-border-radius-l);
  border: 1px solid var(--wa-color-surface-border);
}

.privilege-config__table {
  width: 100%;
  border-collapse: collapse;
}

.privilege-config__table th {
  background: var(--wa-color-surface-lowered);
  font-weight: var(--wa-font-weight-bold);
  text-align: left;
  padding: var(--wa-space-m);
  border-bottom: 1px solid var(--wa-color-surface-border);
}

.privilege-config__table td {
  padding: var(--wa-space-m);
  border-bottom: 1px solid var(--wa-color-surface-border);
}

.privilege-config__table tr:last-child td {
  border-bottom: none;
}

/* This is the only visual feedback during a drag, because the row is moved in
 * the DOM rather than ghosted. */
.privilege-config__row--dragging {
  opacity: 0.5;
}

.privilege-config__drag {
  white-space: nowrap;
  width: 1%;
}

.privilege-config__drag .fa {
  cursor: grab;
}

/* font-variant-numeric is a plain CSS value because there is no token for it. */
.privilege-config__rate {
  font-variant-numeric: tabular-nums;
}

/* A discount and a premium must be distinguishable without reading the sign,
 * and colour is not the ONLY carrier — the sign is still rendered in the text. */
.privilege-config__rate--discount {
  color: var(--wa-color-green);
}

.privilege-config__rate--premium {
  color: var(--wa-color-yellow-60);
}

.privilege-config__order-form {
  display: none;
}

.privilege-config__section {
  margin-top: var(--wa-space-xl);
}

.privilege-config__section-title {
  font-size: var(--wa-font-size-l);
  font-weight: var(--wa-font-weight-bold);
}

.privilege-config__section-subtitle {
  color: var(--wa-color-text-quiet);
}

.privilege-config__cards {
  display: flex;
  gap: var(--wa-space-m);
  flex-wrap: wrap;
}

.privilege-config__card {
  flex: 1 1 340px;
  background: var(--wa-color-surface-default);
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-l);
  padding: var(--wa-space-l);
}

.privilege-config__card-title {
  font-weight: var(--wa-font-weight-bold);
}

.privilege-config__card-body {
  color: var(--wa-color-text-quiet);
}

.privilege-config__badges {
  display: flex;
  gap: var(--wa-space-s);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .privilege-config {
    padding: var(--wa-space-m);
  }

  .privilege-config__cards {
    flex-direction: column;
  }
}
