/* Cookie Policy page — preferences card, table, toggle (extends recallix-legal-page.css) */

.rx-legal-page__card {
  background: var(--rx-surface);
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.rx-legal-page__pref-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}

.rx-legal-page__pref-row:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rx-legal-page__pref-name {
  margin: 0 0 4px;
  font-size: var(--rx-text-body);
  font-weight: 600;
  line-height: 24px;
  color: var(--rx-foreground);
}

.rx-legal-page__pref-desc {
  margin: 0;
  font-size: var(--rx-text-small);
  line-height: 22px;
  color: var(--rx-foreground-body);
}

.rx-legal-page__badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: var(--rx-text-caption);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.rx-legal-page__toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.rx-legal-page__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.rx-legal-page__toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 200ms ease;
}

.rx-legal-page__toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 200ms ease;
}

.rx-legal-page__toggle input:checked + .rx-legal-page__toggle-slider {
  background: #2563eb;
}

.rx-legal-page__toggle input:checked + .rx-legal-page__toggle-slider::before {
  transform: translateX(20px);
}

.rx-legal-page__toggle input:focus-visible + .rx-legal-page__toggle-slider {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.rx-legal-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.rx-legal-page .rx-legal-page__save,
.rx-legal-page .rx-legal-page__save:hover,
.rx-legal-page .rx-legal-page__save:focus,
.rx-legal-page .rx-legal-page__save:focus-visible {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-family: var(--rx-font);
  font-size: var(--rx-text-small);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease;
}

.rx-legal-page .rx-legal-page__save:hover {
  background-color: #1d4ed8 !important;
}

.rx-legal-page .rx-legal-page__save:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.rx-legal-page__feedback {
  margin: 0;
  font-size: var(--rx-text-small);
  font-weight: 500;
  color: #067647;
}

.rx-legal-page__feedback[hidden] {
  display: none !important;
}

.rx-legal-page__card-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.rx-legal-page__card-footer[hidden] {
  display: none !important;
}

.rx-legal-page .rx-legal-page__pref-timestamp {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  font-size: var(--rx-text-caption);
  line-height: 18px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.rx-legal-page__pref-timestamp-label {
  font-size: var(--rx-text-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.rx-legal-page .rx-legal-page__pref-timestamp time {
  font-size: var(--rx-text-caption);
  font-weight: 400;
  color: #94a3b8;
}

.rx-legal-page__table-wrap {
  overflow-x: auto;
  background: var(--rx-surface);
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.rx-legal-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--rx-text-small);
  line-height: 24px;
}

.rx-legal-page__table th {
  padding: 14px 24px;
  text-align: left;
  font-size: var(--rx-text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

.rx-legal-page__table td {
  padding: 16px 24px;
  color: var(--rx-foreground-body);
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.rx-legal-page__table tbody tr:last-child td {
  border-bottom: none;
}

.rx-legal-page__table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--rx-text-caption);
  color: var(--rx-foreground);
  background: #f6f7f9;
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .rx-legal-page__card {
    padding: 24px 20px;
  }

  .rx-legal-page__pref-row {
    flex-direction: column;
    gap: 12px;
  }

  .rx-legal-page .rx-legal-page__save {
    width: 100%;
  }

  .rx-legal-page__table thead {
    display: none;
  }

  .rx-legal-page__table,
  .rx-legal-page__table tbody,
  .rx-legal-page__table tr,
  .rx-legal-page__table td {
    display: block;
    width: 100%;
  }

  .rx-legal-page__table tr {
    padding: 16px 20px;
    border-bottom: 1px solid #e4e7ec;
  }

  .rx-legal-page__table tr:last-child {
    border-bottom: none;
  }

  .rx-legal-page__table td {
    padding: 4px 0;
    border: none;
  }

  .rx-legal-page__table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--rx-text-caption);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
  }
}
