/**
 * mphb-guest-services — RTL overrides for the guest / provider / manager portals.
 *
 * Enqueued only when is_rtl() is true (see PluginPortalAssetsTrait::enqueue_portal_assets).
 * Other locales (FR/EN/IT/DE) never load this file.
 */

/* ------------------------------------------------------------------
 * 1. Portal frame direction
 * ------------------------------------------------------------------ */

.gs-portal,
.gs-portal-page,
.mphb_sc_guest-portal,
.gs-manager-portal,
.gs-provider-portal {
	direction: rtl;
	text-align: right;
}

/* ------------------------------------------------------------------
 * 2. Navigation tabs / pills
 * ------------------------------------------------------------------ */

.gs-nav,
.gs-tabs,
.gs-pill-stepper {
	flex-direction: row-reverse;
}

.gs-tab,
.gs-pill {
	text-align: center; /* keep centered glyphs unflipped */
}

/* ------------------------------------------------------------------
 * 3. Cards / list-collapse chevrons
 * ------------------------------------------------------------------ */

.gs-restock__cat-summary::before,
.gs-list-collapse__toggle::after,
.gs-card__chevron {
	/* Single quote intentional (matches portal.css style) — flip to mirror chevron. */
	transform: scaleX(-1);
}

/* Open-state details still use the same glyph, just rotated 90deg in the LTR
 * stylesheet. Cancel our scaleX flip on open so the rotation reads naturally. */
.gs-restock__cat[open] > .gs-restock__cat-summary::before {
	transform: rotate(90deg);
}

/* ------------------------------------------------------------------
 * 4. Kiosk CTA arrows ('→' → '←')
 * ------------------------------------------------------------------ */

.gs-kiosk-pdj__cta::after,
.gs-kiosk-svc__cta::after {
	content: '\2190'; /* ← */
}

/* ------------------------------------------------------------------
 * 5. Modal close buttons / icons in corners
 * ------------------------------------------------------------------ */

.gs-modal__close,
.gs-toast__close,
.gs-confirm__close,
.gs-feedback-modal__close {
	right: auto;
	left: 12px;
}

/* ------------------------------------------------------------------
 * 6. Stepper +/- positions
 * ------------------------------------------------------------------ */

.gs-pill-stepper__minus,
.gs-stepper__minus {
	margin-right: 0;
	margin-left: 8px;
}
.gs-pill-stepper__plus,
.gs-stepper__plus {
	margin-left: 0;
	margin-right: 8px;
}

/* ------------------------------------------------------------------
 * 7. Forms (portal-scoped, so plugin admin LTR stays intact)
 * ------------------------------------------------------------------ */

.gs-portal input[type="text"],
.gs-portal input[type="email"],
.gs-portal input[type="search"],
.gs-portal textarea,
.gs-portal select {
	text-align: right;
	direction: rtl;
}

.gs-portal input[type="number"],
.gs-portal input[type="date"],
.gs-portal input[type="time"],
.gs-portal input[type="tel"] {
	direction: ltr;
	text-align: right;
}

/* ------------------------------------------------------------------
 * 8. Mixed-script numbers (prices / amounts)
 * ------------------------------------------------------------------ */

.gs-portal bdi,
.gs-portal .gs-price,
.gs-portal .gs-amount,
.gs-portal .gs-billing-card__total {
	direction: ltr;
	unicode-bidi: isolate;
}

/* ------------------------------------------------------------------
 * 9. Banners (offline / kiosk message)
 * ------------------------------------------------------------------ */

.gs-banner,
.gs-offline-banner,
.gs-kiosk-message-banner {
	direction: rtl;
	text-align: right;
}

.gs-banner__close,
.gs-offline-banner__close,
.gs-kiosk-message-banner__dismiss {
	right: auto;
	left: 12px;
}
