@layer components {
  /* Notifications list
  /* ------------------------------------------------------------------------ */

  .notifications-list {
    --panel-size: 45ch;

    .tray__item {
      position: relative;

      &[aria-selected] {
        outline: 0;

        .card {
          border-radius: 0.25ch;
          outline: var(--focus-ring-size) solid var(--focus-ring-color);
          outline-offset: var(--focus-ring-offset);
        }
      }
    }

    .card {
      @media (prefers-color-scheme: dark) {
        box-shadow: 0 0 0 1px var(--color-ink-lighter);
      }
    }

    .card__header {
      column-gap: var(--inline-space-half);
    }

    .card__notification-unread-indicator {
      font-size: var(--text-small);
    }

    &:has(.card--notification) {
      .notifications-list__empty-message {
        display: none;
      }
    }
  }

  /* Read items
  /* ------------------------------------------------------------------------ */

  .notifications-list--read {
    &:not(:has(.card--notification)) {
      display: none;
    }

    .card {
      box-shadow: 0 0 0 1px var(--color-ink-lighter);
    }

    .card__notification-unread-indicator {
      --btn-background: transparent;

      &:before {
        opacity: 0;
      }

      .icon {
        opacity: 1;
      }
    }
  }


 /* Help
 /* ------------------------------------------------------------------------ */
  .notifications-help {
    h2 {
      font-size: var(--text-medium);
      margin: 0;
    }

    .icon {
      --icon-size: 1.2em;

      vertical-align: text-top;
    }

    ol {
      margin-block: var(--block-space-half) var(--block-space);

      &:last-of-type {
        margin-block-end: var(--block-space-half);
      }
    }
  }

  .notifications-help__explainer {
    padding: var(--block-space);
  }

  .notifications__on-message {
    display: none;

    .notifications--on & {
      display: block;
    }
  }

  .notifications__off-message {
    display: block;

    .notifications--on & {
      display: none;
    }
  }

  .notifications__status {
    --panel-padding: var(--block-space);
  }
}

