/**
 * Billing Card Component Styles
 *
 * @package MphbGuestServices
 * @since 2.0.0
 */

.gs-billing-card {
	border-radius: 14px;
	border: 1px solid var(--gs-color-border, #e5e7eb);
	background: var(--gs-color-surface, #fff);
	box-shadow: var(--gs-shadow-md, 0 10px 30px rgba(15, 23, 42, 0.08));
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.gs-billing-hero {
	background-size: cover;
	background-position: center;
}

.gs-billing-body {
	padding: 10px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gs-summary-finance-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.gs-summary-finance-item {
	padding: 12px;
	border: 1px solid var(--gs-color-border, #e2e8f0);
	border-radius: 10px;
	background: var(--gs-color-surface-alt, #f8fafc);
}

.gs-summary-label {
	margin: 0;
	font-size: 12px;
	color: var(--gs-color-text-soft, #475569);
}

.gs-summary-value {
	margin: 2px 0 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--gs-color-text, #0f172a);
}

.gs-summary-negative {
	color: #b91c1c;
}

@media (max-width: 720px) {
	.gs-summary-finance-grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

/* ── Upcoming charges (still cancellable) ──
   Refined treatment: thin gold accent on the left edge + faint warm
   surface tint. No dashed border (reads as "draft / kraft paper" which
   clashes with the premium tone). Disclosure widget keeps the detail
   discoverable without dominating the card. */
.mphb-gs-shell .gs-billing-upcoming {
	margin: 0.75rem 1rem 1rem;
	padding: 0.65rem 0.85rem 0.65rem 0.95rem;
	border-radius: 8px;
	background: rgba(185, 157, 117, 0.05);
	border: 1px solid rgba(185, 157, 117, 0.18);
	border-left: 3px solid #b99d75;
}
.mphb-gs-shell .gs-billing-upcoming[open] {
	padding-bottom: 0.75rem;
}
.mphb-gs-shell .gs-billing-upcoming__summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	cursor: pointer;
	list-style: none;
	font-size: 0.92rem;
}
.mphb-gs-shell .gs-billing-upcoming__summary::-webkit-details-marker {
	display: none;
}
.mphb-gs-shell .gs-billing-upcoming__summary::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	margin-left: 0.25rem;
	opacity: 0.55;
	transition: transform 0.18s ease;
	flex-shrink: 0;
	align-self: center;
}
.mphb-gs-shell .gs-billing-upcoming[open] .gs-billing-upcoming__summary::after {
	transform: rotate(-135deg) translateY(0);
}
.mphb-gs-shell .gs-billing-upcoming__title {
	font-weight: 600;
	color: var(--gs-color-text, #1e3750);
	letter-spacing: 0.005em;
}
.mphb-gs-shell .gs-billing-upcoming__hint {
	margin: 0.4rem 0 0.55rem;
	font-size: 0.75rem;
	color: var(--gs-color-text-soft, #6b7280);
	line-height: 1.4;
}
.mphb-gs-shell .gs-billing-upcoming__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}
.mphb-gs-shell .gs-billing-upcoming__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.88rem;
	padding: 0.15rem 0;
}
.mphb-gs-shell .gs-billing-upcoming__row + .gs-billing-upcoming__row {
	border-top: 1px solid rgba(185, 157, 117, 0.12);
}
.mphb-gs-shell .gs-billing-upcoming__label,
.mphb-gs-shell .gs-billing-upcoming__label:link,
.mphb-gs-shell .gs-billing-upcoming__label:visited {
	color: var(--gs-color-text, #1e3750);
	text-decoration: none;
	cursor: default;
}
.mphb-gs-shell a.gs-billing-upcoming__label,
.mphb-gs-shell a.gs-billing-upcoming__label:link,
.mphb-gs-shell a.gs-billing-upcoming__label:visited {
	color: #836f53;
	text-decoration: underline;
	text-decoration-color: rgba(185, 157, 117, 0.45);
	text-underline-offset: 3px;
	cursor: pointer;
}
.mphb-gs-shell a.gs-billing-upcoming__label:hover,
.mphb-gs-shell a.gs-billing-upcoming__label:focus,
.mphb-gs-shell a.gs-billing-upcoming__label:focus-visible {
	color: #b99d75;
	text-decoration-color: #b99d75;
	outline: none;
}
.mphb-gs-shell .gs-billing-upcoming__amount {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--gs-color-text, #1e3750);
}
.mphb-gs-shell .gs-billing-upcoming__summary .gs-billing-upcoming__total-amount {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #b99d75;
	margin-left: auto;
}
/* Per-item breakdown under a category row. Indented sub-row with a
   discreet bullet so the guest can scan exactly what is engaged
   (e.g. 1× Huile d'olive). Quantity prefix mirrors the cross-surface
   "N×" pattern used by the provider portal and explorer home. */
.mphb-gs-shell .gs-billing-upcoming__item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.82rem;
	padding: 0.1rem 0 0.1rem 1.15rem;
	color: #6b6253;
	position: relative;
}
.mphb-gs-shell .gs-billing-upcoming__item::before {
	content: "\2022";
	position: absolute;
	left: 0.4rem;
	top: 0;
	color: rgba(185, 157, 117, 0.7);
	font-size: 0.9rem;
	line-height: 1.4;
}
.mphb-gs-shell .gs-billing-upcoming__row + .gs-billing-upcoming__item {
	border-top: none;
}
.mphb-gs-shell .gs-billing-upcoming__item + .gs-billing-upcoming__item {
	border-top: none;
}
.mphb-gs-shell .gs-billing-upcoming__item-label {
	color: inherit;
}
.mphb-gs-shell .gs-billing-upcoming__item-qty {
	font-weight: 600;
	color: #836f53;
	margin-right: 0.25rem;
	font-variant-numeric: tabular-nums;
}
.mphb-gs-shell .gs-billing-upcoming__item-amount {
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: #6b6253;
}

/* Dark theme — keep the gold accent, lift the text contrast above 4.5:1
   on the navy surface. Token --lw-* is light-mode-remapped, so use
   literal hex per the standalone theme rules. */
.mphb-gs-shell[data-pp-theme="dark"] .gs-billing-upcoming,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming {
	background: rgba(196, 165, 118, 0.08);
	border-color: rgba(196, 165, 118, 0.28);
	border-left-color: #c4a576;
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__title,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__amount,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__label,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__label:link,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__label:visited {
	color: #f4ecdc;
}
[data-pp-theme="dark"] .mphb-gs-shell a.gs-billing-upcoming__label,
[data-pp-theme="dark"] .mphb-gs-shell a.gs-billing-upcoming__label:link,
[data-pp-theme="dark"] .mphb-gs-shell a.gs-billing-upcoming__label:visited {
	color: #c4a576;
	text-decoration-color: rgba(196, 165, 118, 0.55);
}
[data-pp-theme="dark"] .mphb-gs-shell a.gs-billing-upcoming__label:hover,
[data-pp-theme="dark"] .mphb-gs-shell a.gs-billing-upcoming__label:focus,
[data-pp-theme="dark"] .mphb-gs-shell a.gs-billing-upcoming__label:focus-visible {
	color: #e6cfa3;
	text-decoration-color: #e6cfa3;
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__hint {
	color: rgba(244, 236, 220, 0.7);
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__row + .gs-billing-upcoming__row {
	border-top-color: rgba(196, 165, 118, 0.18);
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__summary .gs-billing-upcoming__total-amount {
	color: #e6cfa3;
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__item,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__item-amount {
	color: rgba(244, 236, 220, 0.78);
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__item::before {
	color: rgba(196, 165, 118, 0.75);
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-upcoming__item-qty {
	color: #c4a576;
}

/* ── Paiements reçus (mirror of "Upcoming charges") ──
   Emerald accent so the two stripes read as a single ledger — gold =
   what's still coming, emerald = what's already in. Same anatomy as
   .gs-billing-upcoming (details/summary + list), same rhythm, same
   chevron. Only the palette changes. Colors stay literal per the
   standalone theme's rule ("--lw-* tokens are light-mode-remapped
   into brand navy and would fight the emerald palette in that mode").
   The emerald hues chosen here mirror the tokens design-tokens.css
   already publishes for success states but with values that clear
   WCAG 4.5:1 for text on both the light card (#1b7a3d → 5.5:1 on
   #fff) and the dark card surface (#4ade80 → 8.4:1 on #1a1d23). */
.mphb-gs-shell .gs-billing-paid {
	margin: 0.75rem 1rem 1rem;
	padding: 0.65rem 0.85rem 0.65rem 0.95rem;
	border-radius: 8px;
	background: rgba(27, 122, 61, 0.05);
	border: 1px solid rgba(27, 122, 61, 0.18);
	border-left: 3px solid #1b7a3d;
}
.mphb-gs-shell .gs-billing-paid[open] {
	padding-bottom: 0.75rem;
}
.mphb-gs-shell .gs-billing-paid__summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	cursor: pointer;
	list-style: none;
	font-size: 0.92rem;
}
.mphb-gs-shell .gs-billing-paid__summary::-webkit-details-marker {
	display: none;
}
.mphb-gs-shell .gs-billing-paid__summary::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	margin-left: 0.25rem;
	opacity: 0.55;
	transition: transform 0.18s ease;
	flex-shrink: 0;
	align-self: center;
}
.mphb-gs-shell .gs-billing-paid[open] .gs-billing-paid__summary::after {
	transform: rotate(-135deg) translateY(0);
}
.mphb-gs-shell .gs-billing-paid__title {
	font-weight: 600;
	color: var(--gs-color-text, #1e3750);
	letter-spacing: 0.005em;
}
.mphb-gs-shell .gs-billing-paid__summary .gs-billing-paid__total-amount {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #1b7a3d;
	margin-left: auto;
}
.mphb-gs-shell .gs-billing-paid__list {
	list-style: none;
	margin: 0.4rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.mphb-gs-shell .gs-billing-paid__row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	column-gap: 0.6rem;
	row-gap: 0.15rem;
	font-size: 0.88rem;
	padding: 0.2rem 0;
}
.mphb-gs-shell .gs-billing-paid__row + .gs-billing-paid__row {
	border-top: 1px solid rgba(27, 122, 61, 0.12);
	padding-top: 0.4rem;
}
.mphb-gs-shell .gs-billing-paid__date {
	color: var(--gs-color-text-soft, #475569);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.mphb-gs-shell .gs-billing-paid__label {
	color: var(--gs-color-text, #1e3750);
	font-weight: 500;
}
.mphb-gs-shell .gs-billing-paid__amount {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--gs-color-text, #1e3750);
	text-align: right;
	white-space: nowrap;
}
.mphb-gs-shell .gs-billing-paid__meta {
	grid-column: 2 / -1;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	font-size: 0.78rem;
	color: var(--gs-color-text-soft, #6b7280);
}
.mphb-gs-shell .gs-billing-paid__ref {
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
}
.mphb-gs-shell .gs-billing-paid__desc {
	color: inherit;
}

/* Dark theme — same palette adapted for the navy card body. The
   emerald-400 hue clears 4.5:1 on the dark surface and mirrors the
   gold accent used by the "Upcoming charges" stripe at the same rhythm
   so both stripes still visually read as a matched pair. */
.mphb-gs-shell[data-pp-theme="dark"] .gs-billing-paid,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid {
	background: rgba(74, 222, 128, 0.08);
	border-color: rgba(74, 222, 128, 0.28);
	border-left-color: #4ade80;
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__title,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__label,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__amount {
	color: #f4ecdc;
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__date,
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__meta {
	color: rgba(244, 236, 220, 0.72);
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__summary .gs-billing-paid__total-amount {
	color: #86efac;
}
[data-pp-theme="dark"] .mphb-gs-shell .gs-billing-paid__row + .gs-billing-paid__row {
	border-top-color: rgba(74, 222, 128, 0.18);
}

/* Hero badge — "Settled + upcoming" pending variant. Warm sand tone
   (not green, not red) so the reader instantly registers "not closed
   yet" without alarm. Lives alongside .gs-badge-success and .gs-hero--
   rejected definitions in portal.css. */
.mphb-gs-shell .gs-hero-badge.gs-badge-pending {
	background: linear-gradient(135deg, #fdf3df 0%, #f6e5c3 100%) !important;
	border-color: #b99d75 !important;
	color: #6b4f23 !important;
	box-shadow: 0 4px 16px rgba(185, 157, 117, 0.28), 0 0 0 1px #b99d75 inset !important;
	letter-spacing: 0.04em;
}

/* Manager-priced freebie (`|original:X` override to 0) — replaces the bare
   "0,00 €" amount with an "Offert" badge, original price struck through
   via .gs-billing-line__price--original (portal.css). Reuses the shared
   .gs-badge layout (portal.css) with the success palette — same tokens as
   .gs-badge.is-approved, already vetted for WCAG contrast in both themes. */
.mphb-gs-shell .gs-badge-offert {
	background: var(--gs-color-success-bg);
	border-color: var(--gs-color-success-border);
	color: var(--gs-color-success-text, #15803d);
}

/* Split stays render one CTA per reservation; this caption tells the guest
   which balance each button settles. Only emitted when >1 CTA is present,
   so a normal single-booking stay is visually unchanged. */
.mphb-gs-shell .gs-billing-pay-cta__segment-label {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--gs-color-text-soft, rgba(0, 0, 0, 0.6));
}
.mphb-gs-shell .gs-billing-pay-cta__segment-label + .gs-billing-pay-cta {
	margin-top: 0.25rem;
	padding-top: 0;
	border-top: 0;
}

/* ── Services payment CTA ── */
.mphb-gs-shell .gs-billing-pay-cta {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	padding-inline: var(--gs-space-lg, 16px);
	border-top: 1px solid var(--gs-color-border, rgba(0, 0, 0, 0.08));
}
/* The tip panel is a flex column too: its centred pay button and toggle
   need a flex parent for align-self to apply. */
.mphb-gs-shell .gs-billing-pay-cta,
.mphb-gs-shell .gs-billing-tip-panel {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
/* Le toggle est un <a> (pas un <button>) pour échapper au reset
   global `.mphb-gs-shell button:not(...)` qui ajoutait fond+bordure.
   Style purement texte, sans cadre au focus/hover. */
/* Toggle row: chevron — link — chevron. Les chevrons sont des <span>
   séparés (en dehors du <a>) pour éviter qu'ils héritent du
   text-decoration: underline du lien. */
.mphb-gs-shell .gs-billing-pay-cta__toggle-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	align-self: center;
	padding: 0.5rem 0;
	color: #c4a576;
}
/* Pay button → toggle stays ≥ 16 px apart (column gap + padding + this). */
.mphb-gs-shell .gs-services-pay-cta + .gs-billing-pay-cta__toggle-wrap {
	margin-block-start: var(--gs-space-md, 12px);
}
.mphb-gs-shell a.gs-billing-pay-cta__toggle,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:link,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:visited {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	color: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	font-weight: 500;
	outline: none;
}
.mphb-gs-shell a.gs-billing-pay-cta__toggle:hover,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:focus,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:focus-visible,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:active {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	color: #d4b388;
}
/* Chevrons : same color, no underline (not inside the <a>), bigger
   and bolder than before to actually read as an affordance. */
.mphb-gs-shell .gs-billing-pay-cta__chevron {
	display: inline-block;
	font-size: 1.1rem;
	line-height: 1;
	color: inherit;
	transition: transform 0.18s ease;
	text-decoration: none;
	font-weight: 700;
}
/* Rotate both chevrons when the link inside the wrap is expanded
   — :has() lets the parent react to a state held on the child. */
.mphb-gs-shell .gs-billing-pay-cta__toggle-wrap:has(.gs-billing-pay-cta__toggle[aria-expanded="true"]) .gs-billing-pay-cta__chevron {
	transform: rotate(180deg);
}
.mphb-gs-shell .gs-billing-pay-cta__toggle-wrap:hover {
	color: #d4b388;
}
.mphb-gs-shell a.gs-billing-pay-cta__toggle:hover,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:focus,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:focus-visible,
.mphb-gs-shell a.gs-billing-pay-cta__toggle:active {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	color: #d4b388;
}
/* The card is white in the light theme (explicit, or auto on a light OS): the
   pale gold above falls to 2.3:1, so the toggles (tip, partial payment) and
   their chevrons take a fixed strong gold (4.53:1, hover 5.21:1). Fixed like
   the dark pale gold: the brand primary token can be set to any hue (blue in
   prod) and would leave the link the only off-gold element of the card.
   The dark theme keeps the pale gold. */
.mphb-gs-shell[data-theme="light"] .gs-billing-pay-cta__toggle-wrap {
	color: #996f0f;
}
.mphb-gs-shell[data-theme="light"] .gs-billing-pay-cta__toggle-wrap:hover,
.mphb-gs-shell[data-theme="light"] a.gs-billing-pay-cta__toggle:hover,
.mphb-gs-shell[data-theme="light"] a.gs-billing-pay-cta__toggle:focus,
.mphb-gs-shell[data-theme="light"] a.gs-billing-pay-cta__toggle:focus-visible,
.mphb-gs-shell[data-theme="light"] a.gs-billing-pay-cta__toggle:active {
	color: #8f6505;
}
@media (prefers-color-scheme: light) {
	.mphb-gs-shell[data-theme="auto"] .gs-billing-pay-cta__toggle-wrap {
		color: #996f0f;
	}
	.mphb-gs-shell[data-theme="auto"] .gs-billing-pay-cta__toggle-wrap:hover,
	.mphb-gs-shell[data-theme="auto"] a.gs-billing-pay-cta__toggle:hover,
	.mphb-gs-shell[data-theme="auto"] a.gs-billing-pay-cta__toggle:focus,
	.mphb-gs-shell[data-theme="auto"] a.gs-billing-pay-cta__toggle:focus-visible,
	.mphb-gs-shell[data-theme="auto"] a.gs-billing-pay-cta__toggle:active {
		color: #8f6505;
	}
}
.mphb-gs-shell .gs-services-pay-cta--partial {
	flex: 0 0 auto;
	padding: 0.55rem 1.1rem;
	font-size: 0.9rem;
}
.mphb-gs-shell .gs-services-pay-cta--partial::before {
	display: none;
}
.mphb-gs-shell .gs-billing-pay-cta__partial {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-block-start: var(--gs-space-md, 12px);
	padding: 0.75rem;
	background: rgba(185, 157, 117, 0.06);
	border: 1px solid rgba(185, 157, 117, 0.18);
	border-radius: 8px;
}
/* Respect the HTML `hidden` attribute — without this rule the
   display: flex above wins over the user-agent default and the
   partial-payment section stays visible even when JS sets [hidden]. */
.mphb-gs-shell .gs-billing-pay-cta__partial[hidden] {
	display: none;
}
.mphb-gs-shell .gs-billing-pay-cta__label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--gs-color-text-soft, #6b7280);
}
.mphb-gs-shell .gs-billing-pay-cta__row {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}
.mphb-gs-shell .gs-billing-pay-cta__input {
	flex: 1;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--gs-color-border, rgba(0, 0, 0, 0.15));
	border-radius: 6px;
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
	background: var(--gs-color-surface, #fff);
	color: var(--gs-color-text, #1e3750);
}
.mphb-gs-shell .gs-billing-pay-cta__hint {
	margin: 0;
	font-size: 0.75rem;
	color: var(--gs-color-text-soft, #6b7280);
	font-style: italic;
}
.mphb-gs-shell .gs-billing-pay-cta__error {
	margin: 0;
	padding: 0.5rem 0.75rem;
	background: rgba(239, 68, 68, 0.08);
	border-left: 3px solid #ef4444;
	border-radius: 4px;
	color: #ef4444;
	font-size: 0.85rem;
}

.mphb-gs-shell .gs-services-pay-cta {
	flex: 0 0 auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.02em;
	padding: 0.95rem 1.5rem;
	background: linear-gradient(135deg, #b99d75 0%, #a08661 100%);
	color: #1e3750 !important;
	border: none;
	border-radius: 10px;
	text-decoration: none !important;
	box-shadow:
		0 6px 14px -4px rgba(185, 157, 117, 0.55),
		0 2px 4px rgba(0, 0, 0, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
	cursor: pointer;
}
.mphb-gs-shell .gs-services-pay-cta::before {
	content: "";
	width: 1.05em;
	height: 1.05em;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3750' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='6' width='18' height='13' rx='2'/><path d='M3 10h18'/><path d='M7 15h3'/></svg>");
	background-size: contain;
	background-repeat: no-repeat;
	flex-shrink: 0;
}
.mphb-gs-shell .gs-services-pay-cta:hover,
.mphb-gs-shell .gs-services-pay-cta:focus-visible {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow:
		0 10px 20px -4px rgba(185, 157, 117, 0.6),
		0 3px 6px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
	color: #1e3750 !important;
	outline: none;
}
.mphb-gs-shell .gs-services-pay-cta:active {
	transform: translateY(0);
	filter: brightness(0.97);
	box-shadow:
		0 4px 8px -2px rgba(185, 157, 117, 0.45),
		inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.mphb-gs-shell .gs-services-pay-cta__amount {
	font-weight: 800;
	font-size: 1.05rem;
	padding-left: 0.4rem;
	border-left: 1px solid rgba(30, 55, 80, 0.25);
	margin-left: 0.2rem;
}

/* ── Download-invoice utility ─────────────────────────────────
   Secondary, muted action. Sits below the primary "Pay" CTA
   (or at the bottom of the card when nothing is due). Reads as
   a document-chip: paper icon + label + tiny PDF badge, with a
   soft one-line hint below. Deliberately quiet — the primary
   attention path stays on "Payer maintenant".
   Note : the .gs-billing-card hero is a branded dark surface in
   both shell themes, so we style the chip once (translucent gold
   on dark) rather than forking per data-pp-theme. */
.mphb-gs-shell .gs-billing-invoice {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(196, 165, 118, 0.22);
	padding-inline: var(--gs-space-lg, 16px);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.3rem;
}
.mphb-gs-shell a.gs-billing-invoice__link,
.mphb-gs-shell a.gs-billing-invoice__link:link,
.mphb-gs-shell a.gs-billing-invoice__link:visited {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	max-inline-size: 100%;
	padding: 0.5rem 0.85rem;
	background: rgba(196, 165, 118, 0.14);
	border: 1px solid rgba(196, 165, 118, 0.42);
	border-radius: 999px;
	color: #f0d9ad;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.mphb-gs-shell a.gs-billing-invoice__link:hover,
.mphb-gs-shell a.gs-billing-invoice__link:focus-visible {
	background: rgba(196, 165, 118, 0.22);
	border-color: rgba(196, 165, 118, 0.72);
	color: #fbe9c4;
	text-decoration: none;
	outline: none;
	transform: translateY(-1px);
}
.mphb-gs-shell a.gs-billing-invoice__link:active {
	transform: translateY(0);
}
.mphb-gs-shell a.gs-billing-invoice__link:focus-visible {
	box-shadow: 0 0 0 3px rgba(196, 165, 118, 0.35);
}
.mphb-gs-shell .gs-billing-invoice__icon {
	width: 1.05rem;
	height: 1.05rem;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0d9ad' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/><path d='M14 3v5h5'/><path d='M12 12v6'/><path d='M9 15l3 3 3-3'/></svg>");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
.mphb-gs-shell .gs-billing-invoice__label {
	white-space: normal;
	min-inline-size: 0;
}
.mphb-gs-shell .gs-billing-invoice__ext {
	display: inline-block;
	flex-shrink: 0;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 0.12rem 0.4rem;
	border-radius: 4px;
	background: rgba(196, 165, 118, 0.32);
	color: #fbe9c4;
}
.mphb-gs-shell .gs-billing-invoice__hint {
	margin: 0;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.62);
	font-style: italic;
	line-height: 1.35;
}

/* The card becomes white in the light theme, so keep the document action
   on the theme's dark text token. The icon mask follows currentColor while
   leaving the existing dark-theme image untouched. */
body[data-pp-theme="light"] .mphb-gs-shell a.gs-billing-invoice__link,
body[data-pp-theme="light"] .mphb-gs-shell a.gs-billing-invoice__link:link,
body[data-pp-theme="light"] .mphb-gs-shell a.gs-billing-invoice__link:visited,
body[data-pp-theme="light"] .mphb-gs-shell a.gs-billing-invoice__link:hover,
body[data-pp-theme="light"] .mphb-gs-shell a.gs-billing-invoice__link:focus-visible {
	color: var(--lw-text-dark);
}
body[data-pp-theme="light"] .mphb-gs-shell .gs-billing-invoice__icon {
	background-color: currentColor;
	background-image: none;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0d9ad' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/><path d='M14 3v5h5'/><path d='M12 12v6'/><path d='M9 15l3 3 3-3'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0d9ad' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/><path d='M14 3v5h5'/><path d='M12 12v6'/><path d='M9 15l3 3 3-3'/></svg>") center / contain no-repeat;
}
body[data-pp-theme="light"] .mphb-gs-shell .gs-billing-invoice__ext {
	color: inherit;
}

/* ========================================================================
 * Manager pricing (Task 6) — billing widget edit affordances
 *
 * Rendered only when `manager_pricing` is true (impersonation / WP admin —
 * see PortalContextBuilder + portal-billing.php). Tokens only, light AND
 * dark via the existing --gs-color-* system (already themed for both
 * explicit [data-theme] and prefers-color-scheme auto — see :root /
 * [data-theme="dark"] blocks in assets/portal.css).
 * ======================================================================== */

/* Pencil trigger — deliberately quiet: a plain glyph, no border, no fill,
   until hover/focus. It must read as a secondary affordance next to the
   price, never compete with it — the manager already knows it's there. */
.mphb-gs-shell .gs-billing-line__edit-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: var(--gs-color-text-muted);
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.mphb-gs-shell .gs-billing-line__edit-btn:hover,
.mphb-gs-shell .gs-billing-line__edit-btn:focus-visible {
	background: var(--gs-color-surface-hover);
	color: var(--gs-color-primary);
	outline: none;
}
.mphb-gs-shell .gs-billing-line__edit-btn:focus-visible {
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--gs-color-primary) 30%, transparent);
}

/* Header placeholder — keeps the modal's per-row columns aligned once the
   pencil column is added to body rows (header itself carries no label). */
.mphb-gs-shell .gs-billing-line__edit-col {
	flex: 0 0 1.75rem;
}
#gs-list-collapse-modal .mphb-gs-shell .gs-billing-line__edit-col,
.mphb-gs-shell #gs-list-collapse-modal .gs-billing-line__edit-col {
	display: block;
}

/* "Add a line" — a quiet outlined utility under the itemised list, matched
   in weight to the "Pay another amount" text-toggle already living in this
   card rather than competing with the gold "Pay now" CTA below it. Tokens
   only (--gs-color-*) — unlike the neighbouring .gs-billing-invoice chip,
   .gs-billing-body sits on the plain themed surface, not the branded hero
   gradient, so a hardcoded light-on-dark palette would be unreadable here
   in light mode. Centred on the card axis like every other billing action. */
.mphb-gs-shell .gs-billing-manager-add-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	align-self: center;
	margin-top: 0.75rem;
	padding: 0.5rem 0.85rem;
	border: 1px dashed var(--gs-color-border-active);
	border-radius: 10px;
	background: transparent;
	color: var(--gs-color-primary);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.mphb-gs-shell .gs-billing-manager-add-btn:hover,
.mphb-gs-shell .gs-billing-manager-add-btn:focus-visible {
	background: var(--gs-color-surface-hover);
	border-color: var(--gs-color-primary);
	outline: none;
}
.mphb-gs-shell .gs-billing-manager-add-btn__icon {
	font-weight: 700;
}

/* Edit / add-line dialog body — reuses the shared .gs-modal chrome
   (.gs-modal-overlay / .gs-modal__header / __body / __footer / __btn), so
   only the form-field internals need their own rules here. */
.mphb-gs-shell .gs-mgr-billing__line-label {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--gs-color-text);
}
.mphb-gs-shell .gs-mgr-billing__field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.mphb-gs-shell .gs-mgr-billing__field + .gs-mgr-billing__field {
	margin-top: 1rem;
}
.mphb-gs-shell .gs-mgr-billing__label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--gs-color-text-soft);
}
.mphb-gs-shell .gs-mgr-billing__amount-row {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
}
.mphb-gs-shell .gs-mgr-billing__input {
	flex: 1;
	min-width: 0;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--gs-color-border);
	border-radius: 8px;
	background: var(--gs-color-surface);
	color: var(--gs-color-text);
	font-size: 0.95rem;
	font-family: inherit;
}
.mphb-gs-shell .gs-mgr-billing__input:focus {
	outline: none;
	border-color: var(--gs-color-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gs-color-primary) 20%, transparent);
}
/* Free shortcut — success palette on purpose: it previews the "Offert"
   badge state the price cell switches to once this button is used. */
.mphb-gs-shell .gs-mgr-billing__free-btn {
	flex: 0 0 auto;
	padding: 0 0.9rem;
	border: 1px solid var(--gs-color-success-border);
	border-radius: 8px;
	background: var(--gs-color-success-bg);
	color: var(--gs-color-success-text, #15803d);
	font-size: 0.8rem;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: filter 0.15s ease;
}
.mphb-gs-shell .gs-mgr-billing__free-btn:hover,
.mphb-gs-shell .gs-mgr-billing__free-btn:focus-visible {
	filter: brightness(0.96);
	outline: none;
}
.mphb-gs-shell .gs-mgr-billing__note {
	margin-top: 0 !important;
	min-height: 2.25rem !important;
}

@media (max-width: 480px) {
	.mphb-gs-shell .gs-mgr-billing__amount-row {
		flex-wrap: wrap;
	}
	.mphb-gs-shell .gs-mgr-billing__free-btn {
		flex: 1 1 auto;
		padding: 0.55rem 0.9rem;
	}
}
.gs-billing-manager-settlement {
	margin-top: 16px;
	padding: 14px;
	border: 1px solid rgba(196, 154, 58, 0.35);
	border-radius: 10px;
}
.gs-billing-manager-settlement p { margin: 8px 0 0; font-size: 0.85rem; opacity: 0.75; }
.gs-billing-manager-settle-btn {
	width: 100%;
	padding: 11px 14px;
	border: 0;
	border-radius: 8px;
	background: var(--lw-gold, #c49a3a);
	color: #171717;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.gs-billing-manager-settle-btn:disabled { opacity: 0.55; cursor: wait; }

.gs-billing-discounts {
	display: flex;
	flex-direction: column;
	gap: var(--gs-space-xs);
	padding: var(--gs-space-sm) var(--gs-space-lg);
	margin-block-end: var(--gs-space-lg);
	border-bottom: 1px solid var(--gs-color-border-light, #f3f4f6);
}
.gs-billing-discount {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--gs-space-md);
	font-size: 13px;
	color: var(--gs-color-text-soft, #475569);
}
.gs-billing-discount__amount {
	font-weight: 600;
	color: var(--gs-color-success-text, #15803d);
	white-space: nowrap;
}

/* Bank transfer awaited — same gutters as the paid-history stripe above,
   gold accent like the "Upcoming charges" stripe. Top margin keeps the
   section at least 1rem (16px) from the previous block. */
.mphb-gs-shell .gs-billing-transfer {
	margin: 1rem 1rem 1rem;
	padding: 0.75rem 0.95rem;
	border-radius: 8px;
	border: 1px solid rgba(166, 124, 0, 0.3);
	border-left: 3px solid #a67c00;
}
.mphb-gs-shell .gs-billing-transfer__title {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
}
.mphb-gs-shell .gs-billing-transfer__amount {
	margin: 0 0 0.5rem;
	font-weight: 600;
}
.mphb-gs-shell .gs-billing-transfer__line {
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	overflow-wrap: anywhere;
}
