@use '@/styles/mastodon/mixins';

.wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-md);
  padding: var(--space-3xl);
  font-family: Inter, sans-serif;
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  overflow-wrap: break-word;
  color: var(--color-text-primary);
  background-color: var(--color-bg-blend);

  h1 {
    @include mixins.type-heading-lg;
  }

  p {
    @include mixins.type-body;
  }

  strong {
    font-weight: bold;
  }

  * {
    min-width: 0;
  }

  nav {
    display: block;
    grid-template-rows: min-content;
    font-size: var(--fs-sm);

    input {
      display: block;
      box-sizing: border-box;
      width: 100%;
      margin-block-end: var(--space-md);
      padding: var(--space-xs) var(--space-md);
      color: var(--color-text-primary);
      background: transparent;
      border: 1px solid var(--color-border-primary);
      border-radius: var(--radius-xs);
      font: inherit;

      &:focus {
        border-color: var(--color-border-brand);
        outline: 1px solid var(--color-border-brand);
      }
    }

    a {
      display: block;
      padding: var(--space-xs) var(--space-md);
      border-radius: var(--radius-xs);
      color: var(--color-text-secondary);
      @include mixins.type-body-compact;

      &[aria-current='page'] {
        color: var(--color-text-primary);
        background-color: var(--color-bg-highlight);
      }
    }

    aside {
      display: grid;
      grid-template-areas:
        'title button'
        'subtitle button';
      grid-template-columns: 1fr min-content;
      align-items: center;
      gap: var(--space-3xs) var(--space-xs);
      margin-block-start: var(--space-md);
      padding: var(--space-sm) var(--space-md);
      border-radius: var(--radius-md);
      border: 1px solid var(--color-border-primary);

      h2 {
        grid-area: title;
        @include mixins.type-body;

        line-height: var(--lh-tighter);
      }

      .subtitle {
        grid-area: subtitle;
        @include mixins.type-label-sm;

        color: var(--color-text-secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .menuButton {
        grid-area: button;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        border: none;
        background-color: transparent;
        border-radius: var(--radius-round);

        &:hover {
          background-color: var(--color-bg-highlight);
        }
      }
    }
  }

  main {
    padding: var(--space-3xl);
    background-color: var(--color-bg-primary);
    border-radius: var(--radius-md);
  }

  .overlay {
    position: absolute;
    inset: auto var(--space-md) var(--space-md) auto;
    width: 30%;
    height: 35%;
    padding: var(--space-md);
    background-color: var(--color-bg-primary);
    border-radius: var(--radius-xl);

    @include mixins.elevation-2;
  }
}
