@layer components {
  .footer {
    [data-theme="dark"] & {
      border-top-color: #374151;
      color: #9ca3af;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) & {
        border-top-color: #374151;
        color: #9ca3af;
      }
    }
  }

  .footer__copyright {
    margin: 0;
  }

  .footer__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .footer__link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;

    &:hover {
      color: #111827;

      [data-theme="dark"] & { color: #f9fafb; }

      @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) & { color: #f9fafb; }
      }
    }
  }

  .footer--dark {
    background: rgb(247, 247, 247);
    color: rgb(106, 106, 106);

    & h3 {
      color: rgb(34, 34, 34);
    }
  }
  .footer--flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    /* border-top: 1px solid #e5e7eb; */
    margin-top: auto;
    font-size: 1rem;
    color: #6b7280;
  }

  .footer--table {
    padding: 1.25rem 1.5rem;

    & .footer__row {
      display: block;
    }

    & .footer__row--flex {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
      padding-top: 1.25rem;
      border-top: 1px solid #e5e7eb;
      margin-top: auto;
      font-size: 1rem;
      color: #6b7280;
    }
  }
}

@layer components {
  .contact-page {
    max-width: 640px;
    margin: 3rem auto;
    padding: 0 1.5rem;
  }

  .contact-page__header {
    margin-bottom: 2rem;
  }

  .contact-page__title {
    margin-bottom: 0.5rem;
  }

  .contact-page__form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;

    [data-theme="dark"] & {
      background: #1f2937;
      border-color: #374151;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) & {
        background: #1f2937;
        border-color: #374151;
      }
    }
  }

  .legal-page {
    max-width: 740px;
    margin: 3rem auto;
    padding: 0 1.5rem 4rem;
  }

  .legal-page__header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;

    [data-theme="dark"] & { border-bottom-color: #374151; }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) & { border-bottom-color: #374151; }
    }
  }

  .legal-page__title {
    margin-bottom: 0.5rem;
  }

  .legal-page__section {
    margin-bottom: 2rem;
  }

  .legal-page__section-title {
    margin-bottom: 0.75rem;
  }

  .legal-page__list {
    margin: 0.5rem 0 0.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .legal-page__link {
    color: var(--primary-color, #ff2800);
    text-decoration: underline;
    text-underline-offset: 2px;

    &:hover { opacity: 0.8; }
  }
}
