/* =========================================================================
   Header buttons (pills, like Linkfire links).
   Text and links come from config.json (js/header-buttons.js): up to
   three white link buttons, then the outlined Book Arshad button.
   ========================================================================= */

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

/* more than two buttons: one centred column, all the same width */
.cta.is-stacked {
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cta.is-stacked .btn {
  width: 500px;
  max-width: 100%;
}

/* The link itself is a plain rectangle; the pill (fill and outline) is
   drawn on ::before, which ignores the pointer. So the hover area never
   changes shape, and moving around the rounded ends can't switch hover
   on and off (that showed as a flicker). */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  /* equal room on both sides, so the icon on the left never pushes the
     centred text over */
  padding: 18px 56px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.btn[hidden] {
  display: none;
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid #fff;
  border-radius: 999px;
  pointer-events: none;
  transition: background-color 0.2s ease;
}

/* trimmed to the height of the capital letters, so the space above and
   below them is exactly equal */
.btn span {
  text-box: trim-both cap alphabetic;
}

/* icon pinned on the left: open-page for links, envelope for email */
.btn svg {
  position: absolute;
  left: 24px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
}

/* white button; on hover only the outline stays */
.btn-primary {
  color: #0b0b0b;
}

.btn-primary::before {
  background-color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
}

.btn-primary:hover::before,
.btn-primary:focus-visible::before {
  background-color: rgba(255, 255, 255, 0);
}

/* outlined button (Book Arshad); on hover it fills */
.btn-ghost {
  color: #fff;
}

.btn-ghost::before {
  background-color: rgba(255, 255, 255, 0);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: #0b0b0b;
}

.btn-ghost:hover::before,
.btn-ghost:focus-visible::before {
  background-color: #fff;
}

/* ---------- Phones: one full-width button per line ---------- */

@media (max-width: 560px) {
  .cta {
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 500px;
    margin: 24px auto 0;
  }

  .cta .btn,
  .cta.is-stacked .btn {
    width: 100%;
  }

  .btn {
    min-height: 46px;
    padding: 16px 48px;
    font-size: 11px;
    letter-spacing: 2px;
  }

  .btn svg {
    left: 20px;
    width: 16px;
    height: 16px;
  }
}

/* short phones: tighter, so all buttons fit above the icons */
@media (max-height: 640px) and (max-width: 560px) {
  .cta {
    margin-top: 16px;
  }

  .cta.is-stacked {
    gap: 12px;
  }

  .btn {
    min-height: 40px;
    padding-top: 13px;
    padding-bottom: 13px;
  }
}
