/**
 * Component: Button
 * ---------------------------------------------------------------------------
 * File: assets/css/components/button.css
 * PHP: gdq_button() in inc/template-tags.php
 *
 * One base class (.gdq-button) carries every shared rule (padding, radius,
 * font, transition, focus state); each variant only overrides what
 * actually differs (colour/border/fill) — this is what "no duplicated
 * CSS" means in practice: 5 variants share ~90% of their rules through
 * the base class rather than each variant repeating the shared 90%.
 *
 * Accessibility: focus-visible state inherited from base.css automatically
 * (button is a real <button>/<a>); icon-only variant REQUIRES its
 * aria-label to be set by the caller (enforced in PHP, not CSS).
 *
 * Responsive: buttons are inline-flex by default (sit naturally in a row);
 * a `.gdq-cta-banner__actions` context (defined in cta.css) stacks them
 * full-width on mobile — button.css itself has no breakpoint logic, since
 * "full width on mobile" is a CONTEXT decision (hero vs. card vs. banner),
 * not an intrinsic property of the button component.
 */

.gdq-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--gdq-space-1);
	padding: var(--gdq-space-2) var(--gdq-space-4);
	border-radius: var(--gdq-radius-sm);
	border: 1px solid transparent;
	font-size: var(--gdq-text-button-size);
	font-weight: var(--gdq-text-button-weight);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1;
	white-space: nowrap;
	transition: var(--gdq-transition-base);
	cursor: pointer;
}

.gdq-button__label {
	display: inline-block;
}

/* Icon sizing/colour inside any button variant — inherits currentColor,
   so switching variant automatically recolours the icon with no extra rule. */
.gdq-button svg {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}

/* ==========================================================================
   PRIMARY — filled gold, dark text
   ========================================================================== */
.gdq-button--primary {
	background-color: var(--gdq-color-accent);
	color: var(--gdq-color-bg-primary);
}

.gdq-button--primary:hover,
.gdq-button--primary:focus-visible {
	background-color: var(--gdq-color-accent-hover);
	color: var(--gdq-color-bg-primary);
	box-shadow: var(--gdq-shadow-glow-accent);
	transform: translateY(-1px);
}

/* ==========================================================================
   SECONDARY — outline
   ========================================================================== */
.gdq-button--secondary {
	background-color: transparent;
	border-color: var(--gdq-color-accent);
	color: var(--gdq-color-accent);
}

.gdq-button--secondary:hover,
.gdq-button--secondary:focus-visible {
	background-color: var(--gdq-color-accent);
	color: var(--gdq-color-bg-primary);
	transform: translateY(-1px);
}

/* ==========================================================================
   GHOST — no border, no fill, for use on already-busy backgrounds (e.g.
   inside a card that already has its own border) where a full outline
   button would be visually heavy.
   ========================================================================== */
.gdq-button--ghost {
	background-color: transparent;
	border-color: var(--gdq-color-border);
	color: var(--gdq-color-text-heading);
}

.gdq-button--ghost:hover,
.gdq-button--ghost:focus-visible {
	border-color: var(--gdq-color-accent);
	color: var(--gdq-color-accent);
}

/* ==========================================================================
   TEXT LINK — gold text + arrow, no container. Padding/border removed
   since this variant reads as a link, not a boxed button.
   ========================================================================== */
.gdq-button--text-link {
	padding: 0;
	background: none;
	border: none;
	color: var(--gdq-color-accent);
	text-transform: none;
	letter-spacing: normal;
	font-weight: 600;
}

.gdq-button--text-link:hover,
.gdq-button--text-link:focus-visible {
	color: var(--gdq-color-accent-hover);
}

/* Arrow slide-right on hover — the one motion detail specific to this
   variant, matching the Motion Specification (Design Spec §3.6a). */
.gdq-button--text-link svg {
	transition: transform var(--gdq-duration-fast) var(--gdq-ease-standard);
}

.gdq-button--text-link:hover svg,
.gdq-button--text-link:focus-visible svg {
	transform: translateX(3px);
}

/* ==========================================================================
   ICON BUTTON — square, icon-only, requires aria-label (enforced in PHP)
   ========================================================================== */
.gdq-button--icon-only {
	padding: var(--gdq-space-2);
	aspect-ratio: 1 / 1;
}

.gdq-button--icon-only svg {
	width: 20px;
	height: 20px;
}
