/*
  ----------------------------------------
  Application (Global styles)
  ----------------------------------------
*/

@layer styles {
  /* Desktop nav links */
  .desktop {
    display: flex;
    position: relative;
    align-items: center;
    height: 100%;
    min-height: var(--height-md);

    .nav-link,
    .nav-button {
      position: relative;
      font-family: var(--font-heading);
      padding: 0 0.4rem;
      font-size: calc(var(--text-base) - 0.18rem);
      display: flex;
      align-items: center;
      height: 100%;
      text-decoration: none;
      color: var(--white);
      font-style: italic;
      font-weight: 600;
      transition: color 0.3s ease-in-out;
    }

    .nav-button {
      background-color: var(--brand-1);
      color: var(--black);
      transition: background-color 0.3s ease-in-out;
    }

    .nav-link:hover {
      color: var(--brand-1);
    }

    .nav-link.active::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 2px;
      background-color: var(--brand-1);
    }
  }

  /* Mobile menu */
  .mobile {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    padding-top: var(--space-md);
    gap: 0.8rem;

    .nav-link {
      display: block;
      padding: 0.4rem 3rem;
      font-size: var(--text-lg);
      font-weight: var(--font-semibold);
      text-decoration: none;
      color: var(--white);

      &:active {
        background-color: var(--brand-1);
      }
    }
  }

  /* Crud Header (for tables, forms – also used in custom scaffolds /erb/scaffold/*) */
  .crud-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--space-2xl);

    h3 {
      margin: 0;
    }
  }
}
