/* The settings screen: a list of sections down the left, one of them open. */

.settings-card {
  border: 1px solid var(--c-neutral-2);
  border-radius: 12px;
  display: grid;
  align-items: stretch;
  overflow: hidden;
}

.settings-content {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  row-gap: 20px;
  min-width: 0;
}

.settings-head h1 {
  font: var(--t-h7-500);
  color: var(--c-white);
  margin: 0 0 6px;
}

/* One provider, one card. */
.connection-card {
  border: 1px solid var(--c-neutral-2);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}

.connection-card-quiet {
  color: var(--text-muted);
}

.connection-head {
  display: flex;
  align-items: center;
  column-gap: 10px;
}

.connection-head h2 {
  font: var(--t-body-primary-400);
  color: var(--c-white);
  margin: 0;
}

.connection-action {
  margin-left: auto;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-neutral-7);
  flex: none;
}

.dot-on {
  background: var(--c-green);
}

.badge-connected {
  color: var(--c-green);
  border-color: var(--c-green-darker);
}

/* Account, scopes, last sync: a label column and an answer column, so the
   three read as facts rather than as a paragraph. */
.connection-facts {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-neutral-2);
}

.connection-facts > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: 16px;
}

.connection-facts dt {
  font: var(--t-body-small-300);
  color: var(--text-muted);
}

.connection-facts dd {
  margin: 0;
  font: var(--t-body-small-400);
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.connection-facts .mono {
  font: var(--t-code-400);
  color: var(--text-body);
}

.connection-choices {
  display: flex;
  flex-direction: column;
  row-gap: 20px;
}

.connection-choices em {
  font-style: normal;
  margin-left: 6px;
}

.banner-error {
  display: flex;
  align-items: center;
  column-gap: 16px;
  border-color: var(--c-red-dark);
}

.banner-error .button {
  margin-left: auto;
  flex: none;
}




/* A button is as wide as its words. In a column of full-width fields it
   stretches to the column unless it is told not to. */
.settings-section > .button,
.settings-section > a.button {
  align-self: flex-start;
}

/* What to do when a provider needs setting up first. Numbered, because it is
   three steps in an order, and the addresses inside are meant to be copied. */
.steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  row-gap: 10px;
  font: var(--t-body-small-300);
  color: var(--text-body);
}

.steps code {
  font: var(--t-code-300);
  color: var(--c-white);
  background: var(--c-neutral-1);
  border-radius: 4px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

/* An address that exists to be copied, with the button that copies it. */
.copy-row {
  display: flex;
  align-items: center;
  column-gap: 12px;
}

.copy-row code {
  font: var(--t-code-300);
  color: var(--c-white);
  background: var(--c-neutral-1);
  border: 1px solid var(--c-neutral-3);
  border-radius: 8px;
  padding: 10px 14px;
  overflow-wrap: anywhere;
  flex: 1 1 auto;
}

/* The space warning sits above whatever page it is on: words on the left,
   the way to Settings on the right, as the calendar's error banner reads. */
.storage-warning {
  flex-direction: row;
  align-items: center;
  margin-bottom: 24px;
}

.storage-warning > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  row-gap: 6px;
}
