/* ==========================================================
   Secondary (horizontal) menu for the raffle pages, shown under the
   page title. Load AFTER styles.css:
   <link rel="stylesheet" href="styles.css">
   <link rel="stylesheet" href="subnav.css">

   Phones: a wrapping row of buttons.
   640px and wider: tabs, with a line under the whole row and a
   highlighted underline on the page you are on.
   ========================================================== */

/* The panel that holds the page title and the menu */
.page-head h1 {
  margin: 0 0 0.75rem;
}

/* An intro line under the menu */
.page-head p {
  margin: 1rem 0 0;
}

.sub-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sub-nav a {
  display: block;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(31, 58, 95, 0.3);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-decoration: none;
}

.sub-nav a:hover {
  background: rgba(31, 58, 95, 0.1);
}

.sub-nav a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* The page you are on */
.sub-nav a[aria-current="page"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: bold;
}

@media (min-width: 640px) {
  .sub-nav ul {
    gap: 0.25rem;
    border-bottom: 2px solid rgba(31, 58, 95, 0.2);
  }

  .sub-nav a {
    padding: 0.6rem 1.1rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: -2px;     /* sits on top of the line under the row */
  }

  .sub-nav a:hover {
    border-bottom-color: rgba(31, 58, 95, 0.4);
  }

  .sub-nav a[aria-current="page"] {
    background: transparent;
    color: var(--color-primary);
    border-bottom-color: var(--color-accent);
  }
}
