/**
 * Button — Style Variations
 *
 * Spec: specs/block-variations/button.spec.json
 * Registers: primary-red-pill (default), outline-on-dark, text-link
 *
 * Targets the front-end markup (<a|button class="wp-block-button__link
 * is-style-{slug}">) AND the editor markup that mirrors it.
 */

/* ---------- Telephone links ---------- */

.wp-block-button__link[href^="tel:"] {
	--wp--preset--font-size--medium: var(--wp--preset--font-size--font-16px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--custom--spacing--icon-gap);
	min-width: min-content;
	padding: var(--wp--custom--spacing--button-block) var(--wp--custom--spacing--button-inline);
	background-color: transparent;
	color: var(--wp--preset--color--primary-charcoal);
	border: var(--wp--custom--borders--width--hair) solid var(--wp--preset--color--border-subtle);
	border-radius: var(--wp--custom--borders--radius--pill);
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--font-16px);
	font-weight: var(--wp--custom--font-weight--semi-bold);
	letter-spacing: var(--wp--custom--letter-spacing--button);
	line-height: var(--wp--custom--line-height--button);
	text-wrap: nowrap;
	white-space: nowrap;
}

.wp-block-button__link[href^="tel:"]::before {
	content: "";
	display: block;
	flex: 0 0 var(--wp--custom--icon-size--small);
	width: var(--wp--custom--icon-size--small);
	height: var(--wp--custom--icon-size--small);
	background-color: var(--wp--preset--color--primary-red);
	-webkit-mask: url("../../icons/phone.svg") no-repeat center / contain;
	mask: url("../../icons/phone.svg") no-repeat center / contain;
}

/* ---------- Primary (Red Pill) — default ---------- */

.wp-block-button.is-style-primary-red-pill .wp-block-button__link {
	background-color: var(--wp--preset--color--primary-red);
	color: var(--wp--preset--color--white);
	border: 0;
	border-radius: var(--wp--custom--borders--radius--pill);
	padding: 14px 22px;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: -0.075px;
	line-height: 1.55;
	box-shadow: 0 4px 6px rgba(37, 36, 36, 0.08);
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
    min-width: min-content;
    text-wrap: nowrap;
    
    &::after {
        content: "";
        display: block;
        flex: 0 0 15px;
        width: 15px;
        height: 15px;
        line-height: 0;
        background: url("../../icons/arrow-right-white.svg") center / contain no-repeat;
        transition: transform 0.15s ease;
    }
}

.wp-block-button.is-style-primary-red-pill .wp-block-button__link:hover,
.wp-block-button.is-style-primary-red-pill .wp-block-button__link:focus-visible {
	background-color: #b83430;
	transform: translateY(-1px);
	box-shadow: 0 6px 10px rgba(37, 36, 36, 0.12);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-primary-red-pill .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-red);
	outline-offset: 2px;
}

.wp-block-button.is-style-primary-red-pill .wp-block-button__link[aria-disabled="true"],
.wp-block-button.is-style-primary-red-pill .wp-block-button__link:disabled {
	background-color: var(--wp--preset--color--text-muted);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ---------- Outline (on dark) ---------- */

.wp-block-button.is-style-outline-on-dark .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--white);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--wp--custom--borders--radius--pill);
	padding: 16px 25px;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: -0.08px;
	line-height: 1.55;
	transition: background-color 0.15s ease, border-color 0.15s ease;
	text-decoration: none;
	display: inline-flex;
    justify-content: center;
	align-items: center;
	gap: 8px;
    min-width: min-content;
    text-wrap: nowrap;
}

.wp-block-button.is-style-outline-on-dark .wp-block-button__link[href^="tel:"] {
	font-family: var(--wp--preset--font-family--inter);
}

.wp-block-button.is-style-outline-on-dark .wp-block-button__link:hover,
.wp-block-button.is-style-outline-on-dark .wp-block-button__link:focus-visible {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.5);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline-on-dark .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--white);
	outline-offset: 2px;
}

/* ---------- Text Link (red, with chevron) ---------- */

.wp-block-button.is-style-text-link .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--primary-red);
	border: 0;
	border-radius: 0;
	padding: 0;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: -0.08px;
	line-height: 1.55;
	box-shadow: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	transition: color 0.15s ease;
}

.wp-block-button.is-style-text-link .wp-block-button__link::after {
	content: "→";
	font-size: 1em;
	line-height: 1;
}

.wp-block-button.is-style-text-link .wp-block-button__link:hover,
.wp-block-button.is-style-text-link .wp-block-button__link:focus-visible {
	color: #b83430;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Icon Button ----------
 * Square 44×44 button with a thin border and a centered glyph.
 * Used by the testimonials carousel controls (arrows) and any other
 * single-glyph action that needs to stand on its own.
 */
.wp-block-button.is-style-icon-button .wp-block-button__link,
.wp-block-button.is-style-icon-button .wp-block-button__link:hover,
.wp-block-button.is-style-icon-button .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--primary-charcoal, #1d1d1d);
	border: 1px solid var(--wp--preset--color--border-subtle, #d5d5d5);
	border-radius: 10px;
	width: 44px;
	height: 44px;
	padding: 0;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	line-height: 1;
	box-shadow: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wp-block-button.is-style-icon-button .wp-block-button__link:hover,
.wp-block-button.is-style-icon-button .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--surface-light, #f5f5f5);
	border-color: var(--wp--preset--color--primary-charcoal, #1d1d1d);
}
