/* ==========================================================================
   tabs.css — Services Tab Switcher (Dark pill bar + panel visibility)
   Part of the Romain Recovery theme stylesheet.
   ========================================================================== */

/* ==========================================================================
   1. Tab Bar — Dark pill container, centered
   ========================================================================== */

.services-tabs-wrapper {
	display: flex;
	justify-content: center;
	margin-bottom: var(--wp--preset--spacing--60);
	position: relative;
	z-index: 1;
}

.services-tabs {
	display: inline-flex;
	gap: 6px;
	background: var(--glass-dark);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--border-dark);
	border-top: 1px solid var(--border-dark-top);
	border-radius: var(--radius-pill);
	padding: 6px;
	position: relative;
	overflow: hidden;
}

/* Grain overlay — now centralized in glass.css */

/* ==========================================================================
   2. Tab Button — Pill-shaped, Space Grotesk
   ========================================================================== */

.services-tab {
	position: relative;
	z-index: 2;
	appearance: none;
	-webkit-appearance: none;
	border: none;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--wp--preset--color--dark-muted);
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	padding: 12px 36px;
	cursor: pointer;
	white-space: nowrap;
	min-height: 44px;
	min-width: 44px;
	transition: color 0.3s ease;
}

/* Hover on inactive tab */
.services-tab:hover:not([aria-selected="true"]) {
	color: var(--wp--preset--color--surface);
}

/* Focus visible */
.services-tab:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* ==========================================================================
   3. Active Tab — Green text
   ========================================================================== */

.services-tab[aria-selected="true"] {
	color: var(--wp--preset--color--accent);
}

/* ==========================================================================
   3b. Sliding Indicator — Moves behind the active tab
   ========================================================================== */

.services-tab-indicator {
	position: absolute;
	z-index: 1;
	top: 6px;
	bottom: 6px;
	border-radius: var(--radius-pill);
	background: var(--accent-08);
	transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}

/* Bottom glow bar on the indicator */
.services-tab-indicator::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 12%;
	right: 12%;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, var(--wp--preset--color--accent), transparent);
	box-shadow: 0 0 8px var(--accent-50),
	            0 0 20px var(--accent-25),
	            0 2px 30px var(--accent-15);
}

/* ==========================================================================
   4. Tab Panels — Show/hide
   ========================================================================== */

.services-tab-panel {
	display: none;
}

.services-tab-panel.is-active {
	display: block;
}

/* ==========================================================================
   5. Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.services-tab,
	.services-tab-indicator,
	.service-card-options-row {
		transition: none;
	}
}

/* ==========================================================================
   6. Service Card — Multi-price options list (e.g. Bien-être classique)
   ========================================================================== */

.service-card-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--border-dark);
	padding-top: var(--wp--preset--spacing--40);
}

.service-card-options-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	border-radius: 8px;
	transition: background 0.2s ease;
}

.service-card-options-row:hover {
	background: var(--accent-05);
}

.service-card-options-row .option-duration {
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 0.875rem;
	color: var(--wp--preset--color--dark-muted);
}

.service-card-options-row .option-price {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-weight: 700;
	font-size: 1rem;
	color: var(--wp--preset--color--accent);
}

/* ==========================================================================
   7. Service Card — Team pricing notes
   ========================================================================== */

.service-card-team-note {
	font-size: 0.8rem;
	color: var(--wp--preset--color--dark-muted);
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: 0;
	line-height: 1.4;
}

.service-card-team-example {
	font-size: 0.8rem;
	font-style: italic;
	color: var(--wp--preset--color--contrast-muted);
	margin-top: 4px;
	margin-bottom: 0;
}

/* ==========================================================================
   8. Service Card — Layout: equal-height cards in both tabs
   ========================================================================== */

/* All columns stretch to equal height (Individuelle + Équipe) */
.services-individual-grid,
.services-tab-panel .wp-block-columns {
	align-items: stretch;
}

/* Cards fill their column height fully, with room for the anchored CTA.
   !important overrides inline padding-bottom from the pattern markup. */
.services-individual-grid > .wp-block-column > .service-card,
.services-tab-panel .wp-block-columns > .wp-block-column > .service-card {
	position: relative;
	width: 100%;
	height: 100%;
	padding-bottom: calc(var(--wp--preset--spacing--50) + 70px) !important;
	box-sizing: border-box;
}

/* Anchor the CTA button at the bottom of each card */
.services-individual-grid .service-card > .wp-block-buttons:last-child,
.services-tab-panel .service-card > .wp-block-buttons:last-child {
	position: absolute;
	bottom: var(--wp--preset--spacing--50);
	left: var(--wp--preset--spacing--50);
	margin-top: 0 !important;
}

/* ==========================================================================
   9. Service Card — Accent border (Bien-être classique)
   ========================================================================== */

.service-card-accent {
	border: 2px solid var(--accent-45) !important;
	box-shadow:
		0 0 0 1px var(--accent-08),
		0 8px 32px var(--accent-08);
}

/* ==========================================================================
   10. Service Card — Featured card (Combo)
   ========================================================================== */

.service-card-featured {
	position: relative;
	overflow: hidden;
	border: 2px solid rgba(26, 255, 163, 0.55) !important;
	box-shadow:
		0 0 0 1px var(--accent-12),
		0 8px 32px var(--accent-12),
		0 0 60px var(--accent-06);
}

.service-card-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--dark);
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	padding: 6px 14px;
	border-radius: 0 16px 0 12px;
	white-space: nowrap;
	z-index: 2;
}

.service-card-badge::before {
	content: "🏆";
	font-size: 0.75rem;
}

.service-card-subtitle {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--accent) !important;
	line-height: 1.2;
}

.service-card-price--xl {
	font-size: clamp(2.25rem, 3.5vw, 3rem) !important;
}
