@layer components {
  /* Price alerts on this device: offered after saving an alert, on Mine
     produkter, and switched in Min konto. The alert dialog's language
     throughout: its shell, its stacked rows, its switch.
  /* ------------------------------------------------------------------------ */

  /* The offer after saving: a short dialog, a sheet from the bottom on
     phones like the alert dialog itself. */
  .alert-dialog--compact {
    @media (width >= 640px) {
      inline-size: min(28rem, calc(100% - 2rem));
    }
  }

  /* The saved alert's confirmation, in the thumbnail's place. */
  .alert-dialog__check {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-positive-subtle);
    block-size: 2.75rem;
    color: var(--color-positive);
    inline-size: 2.75rem;

    .material-icons {
      font-size: 1.5rem;
    }
  }

  .push-offer__question {
    display: flex;
    align-items: flex-start;
    font-size: var(--text-lg);
    font-weight: 700;
    gap: 0.6rem;
    letter-spacing: -0.01em;
    line-height: 1.35;

    .material-icons {
      flex-shrink: 0;
      color: var(--color-primary);
      font-size: 1.5rem;
    }
  }

  .push-offer__question--failed .material-icons {
    color: var(--color-negative);
  }

  /* Mine produkter: one line above the lists */
  .push-banner {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.6rem 0.6rem 0.9rem;
    border-radius: 1rem;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-soft);
    gap: 0.75rem;
    margin-block-end: -0.75rem;
  }

  .push-banner__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-positive-subtle);
    block-size: 2.25rem;
    color: var(--color-primary);
    inline-size: 2.25rem;

    .material-icons {
      font-size: 1.25rem;
    }
  }

  .push-banner__text {
    flex-grow: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    min-inline-size: 0;
  }

  .push-banner__button {
    flex-shrink: 0;
  }

  .push-banner__close {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    block-size: 2.25rem;
    color: var(--color-tag);
    inline-size: 2.25rem;

    &:hover {
      background-color: var(--color-shade);
      color: var(--color-ink);
    }
  }

  /* Min konto: email and this device, stacked like the alert's modes */
  .account__section {
    border-block-start: 1px solid var(--color-border);
    margin-block-start: var(--block-space);
    padding-block-start: var(--block-space);
  }

  .push-setting__channels {
    display: flex;
    flex-direction: column;
    margin-block-start: var(--block-space-half);
  }

  .push-setting__channel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border: var(--border);
    gap: 1rem;

    &:first-child {
      border-radius: var(--border-radius) var(--border-radius) 0 0;
    }

    &:last-child {
      border-radius: 0 0 var(--border-radius) var(--border-radius);
    }

    &:only-child {
      border-radius: var(--border-radius);
    }

    & + & {
      border-block-start: 0;
    }
  }

  label.push-setting__channel {
    cursor: pointer;

    &:has(:disabled) {
      cursor: default;
    }
  }

  /* Blocked, outside the home screen or unsupported: the help below says why. */
  .push-setting .alert-recurring__switch:disabled {
    cursor: default;
    opacity: 0.45;
  }

  .push-setting__name {
    display: flex;
    flex-direction: column;
    font-size: 0.9375rem;
    font-weight: 600;
    min-inline-size: 0;
  }

  .push-setting__detail {
    color: var(--color-tag);
    font-size: var(--text-sm);
    font-weight: 400;
    overflow-wrap: anywhere;
  }

  .push-setting__always {
    flex-shrink: 0;
    color: var(--color-tag);
    font-size: var(--text-sm);
  }

  .push-setting__help {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    color: oklch(var(--lch-gray-600));
    font-size: var(--text-sm);
    gap: 0.25rem 1rem;
    line-height: 1.5;
    margin-block-start: var(--block-space-half);
  }

  .push-setting__test {
    color: var(--color-tag);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2em;

    &:hover {
      color: var(--color-ink);
    }
  }
}
