/*
 * Settings. Groups of rows in cards, as the phone's You tab, and what its side
 * panels add. Every colour is a variable from theme.css. Nothing has a fixed
 * height that holds words: text wraps and boxes grow.
 */

.settings {
  display: grid;
  gap: var(--gap-3);
  max-width: 880px;
}

.settings .page__head {
  margin-bottom: 0;
}

.settings > .notice {
  margin-bottom: 0;
}

/* One group: its title, then its rows. */
.set-group .card__head {
  padding-bottom: 4px;
}

.set-rows {
  display: grid;
  padding: 0 0 6px;
}

/* One row: what it is, its value, and a way in. The whole row is the button. */
.set-row {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr 24px;
  align-items: center;
  gap: var(--gap-2);
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.set-rows > .set-row:first-child {
  border-top: 0;
}

.set-row:hover {
  background: var(--hover);
}

.set-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.set-row__label {
  font-weight: 600;
}

.set-row__value {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.set-row__value--dim {
  font-style: italic;
}

.set-row__chev svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.set-row--danger .set-row__label {
  color: var(--red);
}

/* The panels. */
.set-heading {
  margin: var(--gap-2) 0 6px;
  font-size: var(--size-body);
  font-weight: 700;
}

.set-strong {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}

.set-quiet {
  color: var(--ink-2);
  margin: 0 0 var(--gap-2);
}

.set-failed {
  display: grid;
  gap: 12px;
  justify-items: start;
}

/* Language: two choices. */
.set-choices {
  display: grid;
  gap: 8px;
}

.set-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.set-choice[aria-pressed="true"] {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.set-choice svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.2;
}

/* Time zone: the search and the list. */
.set-zones {
  display: grid;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.set-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.set-zones > .set-zone:first-child {
  border-top: 0;
}

.set-zone:hover {
  background: var(--hover);
}

.set-zone.is-selected {
  background: var(--chip);
}

.set-zone__text {
  display: grid;
  gap: 2px;
}

.set-zone__city {
  font-weight: 600;
}

.set-zone__sub {
  color: var(--ink-2);
  font-size: var(--size-small);
}

.set-zone__in {
  color: var(--green);
  font-weight: 600;
  font-size: var(--size-small);
}

/* Notifications: a label and its switch. */
.set-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-2);
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.set-switch:first-of-type {
  border-top: 0;
}

.set-toggle {
  min-width: 96px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.set-toggle.is-on {
  border-color: var(--green);
  background: var(--green);
  color: var(--on-fill);
}

/* Email: one block per code. */
.set-code {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.set-code__label {
  font-weight: 600;
}

.set-code__entry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.set-code__entry .field-input {
  width: 160px;
  letter-spacing: 0.2em;
}

/* Billing. */
.set-banner {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 14px var(--gap-2);
  border-radius: var(--radius);
  background: var(--amber);
  color: var(--on-fill);
  margin-bottom: var(--gap-2);
}

.set-banner p {
  margin: 0;
}

.set-banner .btn {
  background: var(--card);
  color: var(--ink);
}

.set-checkout {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-top: 12px;
}

.set-checkout .notice {
  margin-bottom: 0;
}

.set-invoices {
  display: grid;
}

.set-invoice {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.set-delete-foot {
  margin-top: var(--gap-3);
}

.set-danger-text {
  color: var(--red);
}

.set-delete .field-input {
  margin-top: 8px;
}

/* The account menu's own three for office staff. */
.account__item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account__item:hover {
  background: var(--hover);
}
