/*
 * Buttons, in the Runwell Digital style: pill-shaped, dark ink background with white text, turning blue (with a soft
 * drop shadow, and no movement) on hover. Loaded after Bootstrap on both the public site and /Admin, so it restyles the Bootstrap
 * button classes already used everywhere:
 *   primary  = .btn-tw, .btn-dark            (dark -> blue)
 *   ghost    = .btn-outline-secondary, .btn-outline-dark   (outlined -> dark on hover)
 * Danger/warning buttons keep their colours (they should look different), just with the same shape.
 */
:root {
  --btn-ink: #1a2b3c;
  --btn-blue: #0a64e8;
  --btn-blue-light: #55bfff;
  --btn-line: #cfd8e3;
  --btn-ease: cubic-bezier(.2, .7, .2, 1);
}

.btn:not(.btn-link) {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.2;
  transition: background-color .25s, border-color .25s, color .25s, box-shadow .25s;
}
.btn.btn-sm:not(.btn-link) { padding: .5rem 1.1rem; font-size: .88rem; }
.btn.btn-lg:not(.btn-link) { padding: 1rem 2rem; font-size: 1.05rem; }

/* primary: dark, blue on hover */
.btn.btn-tw, .btn.btn-dark {
  background-color: var(--btn-ink); border-color: var(--btn-ink); color: #fff;
}
.btn.btn-tw:hover, .btn.btn-tw:focus-visible, .btn.btn-dark:hover, .btn.btn-dark:focus-visible {
  background-color: var(--btn-blue); border-color: var(--btn-blue); color: #fff;
  box-shadow: 0 8px 22px -6px rgba(10, 100, 232, .55);
}
.btn.btn-tw:active, .btn.btn-dark:active { box-shadow: 0 3px 10px -4px rgba(10, 100, 232, .55); background-color: var(--btn-blue); border-color: var(--btn-blue); color: #fff; }

/* ghost: outlined, fills dark on hover */
.btn.btn-outline-secondary, .btn.btn-outline-dark {
  background-color: transparent; border-color: var(--btn-line); color: var(--btn-ink);
}
.btn.btn-outline-secondary:hover, .btn.btn-outline-secondary:focus-visible,
.btn.btn-outline-dark:hover, .btn.btn-outline-dark:focus-visible {
  background-color: var(--btn-ink); border-color: var(--btn-ink); color: #fff; box-shadow: 0 8px 22px -8px rgba(26, 43, 60, .5);
}

/* on a dark photo the dark button would vanish: use the light variant there (white, light blue on hover) */
.tw-hero .btn.btn-tw { background-color: #fff; border-color: #fff; color: var(--btn-ink); }
.tw-hero .btn.btn-tw:hover, .tw-hero .btn.btn-tw:focus-visible { background-color: var(--btn-blue-light); border-color: var(--btn-blue-light); color: var(--btn-ink); box-shadow: 0 8px 22px -6px rgba(85, 191, 255, .6); }

.btn:disabled, .btn.disabled { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .btn:not(.btn-link) { transition: none; }
}

/* Keyboard focus: a clear ring on top of the hover look, so it is never the colour change alone */
.btn:focus-visible { outline: 3px solid var(--btn-blue, #0a64e8); outline-offset: 3px; }
.tw-hero .btn:focus-visible, .tw-hero-link:focus-visible { outline-color: #fff; }
