/* =============================================================================
 * Button — carbon copy of the Figma "Button" component set.
 * Design source: Assets/Buttons.png + provided Figma CSS.
 * Requires: design-tokens.css.
 *
 * Structure (see views/partials/button.ejs):
 *   <button class="btn btn--primary btn--md">
 *     <span class="btn__icon">…plus…</span>
 *     <span class="btn__label">Button</span>
 *     <span class="btn__icon">…chevron…</span>
 *   </button>
 *
 * Variants : .btn--primary | .btn--secondary | .btn--outline | .btn--ghost | .btn--gold
 * Sizes    : .btn--sm (32px) | .btn--md (36px) | .btn--lg   (+ .btn--icon circle)
 * States   : :hover / :active / :focus-visible / :disabled | .is-disabled
 *
 * Spec notes: radius 12px (rounded rect, NOT pill); 1px rgba(255,255,255,.2)
 * border on filled/outline variants; Figma font is DM Sans.
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  background-color: transparent; /* reset the UA <button> default (ButtonFace) */
  font-family: 'DM Sans', var(--font-sans);
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--color-content-accent);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
 * Sizes  (Small = 32px, Default = 36px; Large is an extrapolation)
 * -------------------------------------------------------------------------- */
.btn--sm {
  height: 32px;
  padding: 4px 12px;
  gap: 2px;
  font-size: 14px;
}
.btn--md {
  height: 36px;
  padding: 6px 12px;
  gap: 6px;
  font-size: 16px;
}
.btn--lg {
  height: 44px;
  padding: 10px 16px;
  gap: 8px;
  font-size: 16px;
}

/* Full-width */
.btn--block { display: flex; width: 100%; }

/* -----------------------------------------------------------------------------
 * Variant: Primary — gold gradient, black text/icons.
 * -------------------------------------------------------------------------- */
.btn--primary {
  background-image: linear-gradient(310.14deg, #b7af69 12.98%, #cdb140 92.6%, #cdb664 131.58%);
  color: #000000;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--primary:active { filter: brightness(0.93); }

/* -----------------------------------------------------------------------------
 * Variant: Secondary — light glass fill.
 * -------------------------------------------------------------------------- */
.btn--secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn--secondary:hover { background-color: rgba(255, 255, 255, 0.16); }
.btn--secondary:active { background-color: rgba(255, 255, 255, 0.08); }

/* -----------------------------------------------------------------------------
 * Variant: Outline — near-transparent fill + subtle white border.
 * -------------------------------------------------------------------------- */
.btn--outline {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.004) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  font-weight: 400;
}
.btn--outline:hover { background-color: rgba(255, 255, 255, 0.06); color: #ffffff; }
.btn--outline:active { background-color: rgba(255, 255, 255, 0.1); }

/* -----------------------------------------------------------------------------
 * Variant: Ghost — no fill, no border (Style=Icon).
 * -------------------------------------------------------------------------- */
.btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-color: transparent;
  font-weight: 400;
}
.btn--ghost:hover { background-color: rgba(255, 255, 255, 0.06); color: #ffffff; }
.btn--ghost:active { background-color: rgba(255, 255, 255, 0.1); }

/* -----------------------------------------------------------------------------
 * Variant: Gold — translucent gold gradient, white text (Style=Test /
 * "Preview Props").
 * -------------------------------------------------------------------------- */
.btn--gold {
  background-image: linear-gradient(310.14deg, rgba(183, 175, 105, 0.4) 12.98%, rgba(205, 177, 64, 0.4) 92.6%, rgba(205, 182, 100, 0.4) 131.58%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn--gold:hover { filter: brightness(1.1); }
.btn--gold:active { filter: brightness(0.95); }

/* -----------------------------------------------------------------------------
 * Icon-only — circular dark-glass button (Button Circle / Dark / Glass).
 * Placed after variants so its surface wins if combined.
 * -------------------------------------------------------------------------- */
.btn--icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  gap: 0;
  border-radius: 9999px;
  background: rgba(23, 23, 23, 0.51);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 4px rgba(0, 0, 0, 0.05), 0 10px 10px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--icon.btn--sm { width: 32px; height: 32px; padding: 6px; }
.btn--icon.btn--lg { width: 44px; height: 44px; padding: 10px; }
.btn--icon:hover { background: rgba(40, 40, 40, 0.6); }

/* -----------------------------------------------------------------------------
 * State: Disabled — faded, non-interactive.
 * -------------------------------------------------------------------------- */
.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: none;
  box-shadow: none;
}

/* -----------------------------------------------------------------------------
 * Slots — keep icons crisp and vertically centered next to the label.
 * -------------------------------------------------------------------------- */
.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn__label {
  display: inline-block;
}
