/* Shared button system. Used by all blocks via .rehab-btn + variant.
   Sizing per the approved treatment-page design (June 2026): 15px / 500 /
   1.05rem 2.25rem. The PHP-rendered homepage keeps its own .rehab-home-btn system. */

.rehab-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--rehab-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: all 0.3s var(--rehab-ease);
	white-space: nowrap;
	border-radius: 0;
}

.rehab-btn:focus-visible {
	outline: 2px solid var(--rehab-sage-text);
	outline-offset: 3px;
}

/* Primary action — filled with brand sage */
.rehab-btn--luxury {
	background-color: var(--rehab-sage);
	color: var(--rehab-warm-charcoal);
	padding: 1.05rem 2.25rem;
	box-shadow: 0 10px 24px -10px rgba(138, 150, 116, 0.7);
}

.rehab-btn--luxury:hover {
	background-color: var(--rehab-sage-dark);
	color: var(--rehab-color-cream);
	transform: translateY(-1px);
	box-shadow: 0 14px 30px -10px rgba(138, 150, 116, 0.85);
	text-decoration: none;
}

/* Core button block (core/button) drawn as the primary action, so a page
   built from plain core blocks (migrated content, REH-317) gets the brand
   button rather than WordPress's dark pill. No published Diamond or Anker page
   uses core/button, so this changes nothing there. */
.wp-block-button__link.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--rehab-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	text-decoration: none;
	border: none;
	border-radius: 0;
	padding: 1.05rem 2.25rem;
	background-color: var(--rehab-sage);
	color: var(--rehab-warm-charcoal);
	transition: all 0.3s var(--rehab-ease);
}

.wp-block-button__link.wp-element-button:hover,
.wp-block-button__link.wp-element-button:focus-visible {
	background-color: var(--rehab-sage-dark);
	color: var(--rehab-color-cream);
	text-decoration: none;
}

/* Outline — transparent with charcoal border */
.rehab-btn--outline {
	background: transparent;
	color: var(--rehab-warm-charcoal);
	border: 1px solid rgba(186, 195, 161, 0.4);
	padding: 0.625rem 1.5rem;
}

.rehab-btn--outline:hover {
	background: rgba(186, 195, 161, 0.1);
	border-color: rgba(186, 195, 161, 0.6);
	text-decoration: none;
}

/* Ghost — for placement over images */
.rehab-btn--ghost {
	background: transparent;
	color: var(--rehab-color-cream);
	border: 1px solid rgba(255, 255, 255, 0.4);
	padding: 0.625rem 1.5rem;
	backdrop-filter: blur(8px);
}

.rehab-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
}

/* Size modifiers */
.rehab-btn--sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.rehab-btn--lg { padding: 1.125rem 2.75rem; font-size: 1rem; }
.rehab-btn--block { width: 100%; }

/* Mobile safety — long uppercase button labels (e.g. "SCHEDULE A FREE
   ASSESSMENT") with white-space: nowrap will overflow narrow viewports.
   Allow wrapping at ≤480px so the label breaks onto a second line rather
   than pushing past the container. max-width is what lets it wrap at all
   when the button is a non-shrinking flex item (.rehab-article__talk-btn is
   flex-shrink:0): without it the label still sizes to one line and overflows
   the card — seen on Imani, whose wide Montserrat caps are longer. REH-316. */
@media (max-width: 480px) {
	.rehab-btn {
		max-width: 100%;
		white-space: normal;
		line-height: 1.3;
		text-align: center;
	}
}
