/**
 * Oyolloo Elements — button component.
 *
 * Figma reference: node 471:1160 (primary button).
 *   background #ffc700 · radius 8px · padding 16px 24px · gap 6px
 *   Inter Bold 16 / 24px · tracking -0.16px · uppercase · text #000
 *
 * All four variants share one box so a button swapped from solid to ghost keeps
 * its exact metrics.
 *
 * @package Oyolloo\Elements
 * @since   1.0.0
 */

.oe-btn {
	--oe-btn-bg: var(--oe-color-brand);
	--oe-btn-fg: var(--oe-color-black);
	--oe-btn-border: transparent;
	--oe-btn-bg-hover: var(--oe-color-brand-dark);
	--oe-btn-fg-hover: var(--oe-color-black);

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: var(--oe-space-sm) var(--oe-space-md);
	border: 0;
	border-radius: var(--oe-radius-md);
	box-shadow: inset 0 0 0 1px var(--oe-btn-border);
	background-color: var(--oe-btn-bg);
	--oe-btn-surface: var(--oe-btn-bg);
	color: var(--oe-btn-fg);
	font-family: var(--oe-font-body);
	font-size: var(--oe-button-size);
	font-weight: var(--oe-button-weight);
	line-height: 24px;
	letter-spacing: -0.16px;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color 200ms var(--oe-ease, ease),
		color 200ms var(--oe-ease, ease),
		box-shadow 200ms var(--oe-ease, ease),
		transform 200ms var(--oe-ease, ease);
}

.oe-btn:hover {
	background-color: var(--oe-btn-bg-hover);
	color: var(--oe-btn-fg-hover);
	transform: translateY(-1px);
}

.oe-btn:active {
	transform: translateY(0);
}

.oe-btn[disabled],
.oe-btn[aria-disabled="true"] {
	opacity: 0.5;
	pointer-events: none;
}

/* -- Variants ------------------------------------------------------------ */

.oe-btn--dark {
	--oe-btn-bg: var(--oe-color-black);
	--oe-btn-fg: var(--oe-color-white);
	--oe-btn-bg-hover: var(--oe-color-neutral-700);
	--oe-btn-fg-hover: var(--oe-color-white);
}

.oe-btn--light {
	--oe-btn-bg: var(--oe-color-white);
	--oe-btn-fg: var(--oe-color-black);
	--oe-btn-bg-hover: var(--oe-color-neutral-100);
}

/* Neutral secondary on light bands — Figma pairs it with the brand button in
   the retail band and the "View all" slot beside section headings. */
.oe-btn--soft {
	--oe-btn-bg: var(--oe-color-neutral-100);
	--oe-btn-fg: var(--oe-color-black);
	--oe-btn-border: var(--oe-color-neutral-300);
	--oe-btn-bg-hover: var(--oe-color-brand);
	--oe-btn-fg-hover: var(--oe-color-black);
}

/* Outlined — used on dark bands where a solid fill would be too loud. */
.oe-btn--ghost {
	--oe-btn-bg: transparent;
	--oe-btn-fg: currentColor;
	--oe-btn-border: currentColor;
	--oe-btn-bg-hover: var(--oe-color-brand);
	--oe-btn-fg-hover: var(--oe-color-black);
}

.oe-btn--ghost:hover {
	--oe-btn-border: var(--oe-color-brand);
}

/* Text-only, for the "View all" links beside section headings. */
.oe-btn--link {
	--oe-btn-bg: transparent;
	--oe-btn-fg: currentColor;

	padding: 0;
	box-shadow: none;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.oe-btn--link:hover {
	background-color: transparent;
	color: var(--oe-color-brand);
	transform: none;
}

/* -- Sizes --------------------------------------------------------------- */

.oe-btn--sm {
	padding: var(--oe-space-xs) var(--oe-space-sm);
	font-size: var(--oe-body-sm-size);
	line-height: 20px;
}

.oe-btn--lg {
	padding: var(--oe-space-md) var(--oe-space-lg);
}

/* Full-bleed on mobile, matching the stacked CTAs in the 393 frame. */
.oe-btn--block {
	display: flex;
	width: 100%;
}

@media (max-width: 767px) {
	.oe-btn--block-mobile {
		display: flex;
		width: 100%;
	}
}

/* -- Icon ---------------------------------------------------------------- */

.oe-btn .oe-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.oe-btn .oe-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
