/*!
 * qort-phase9.css — Phase 9 scoped styles for /corporate-events/ + /junior/ + /matchmaking/.
 *
 * SITE-06 discipline: enqueued ONLY on Phase 9 surfaces via AssetRegistry::is_phase9_surface()
 * (Plan 09-03). All rules scoped under `.qort-phase9` body/main class for defence-in-depth.
 *
 * D-12 RTL: CSS logical properties only. NO physical directional properties
 * (mL/mR/pL/pR/taL/taR etc). Direction mirrors automatically when
 * LanguageAttributesFilter (Plan 09-03) adds dir="rtl" on /ar/ variants.
 *
 * UI-SPEC §Component Inventory: all qp9-* components styled here.
 *
 * Source of truth: .planning/phases/09-new-pages-seo/09-UI-SPEC.md
 */

/* ---------------------------------------------------------------------------
 * DESIGN TOKENS (UI-SPEC §Color + §Typography)
 * ------------------------------------------------------------------------ */
.qort-phase9 {
	--qp9-blue: #0062FF;
	--qp9-green: #1BB83D;
	--qp9-text: #111111;
	--qp9-bg: #FFFFFF;
	--qp9-bg-alt: #F5F7FB;
	--qp9-border: #E3E3E3;
	--qp9-muted: #BABABA;
	--qp9-muted-strong: #5f6368;
	--qp9-error: #D9480F;
	--qp9-amber: #FFB300;
	--qp9-font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--qp9-font-heading: "Futura PT", "Futura Std", "Barlow Condensed", "Arial Black", sans-serif;

	color: var(--qp9-text);
	font: 400 16px/1.5 var(--qp9-font-body);
}

/* AR-specific font stack per UI-SPEC §Typography §AR-specific */
.qort-phase9[lang="ar"],
[lang="ar"] .qort-phase9 {
	--qp9-font-heading: "Cairo", "Tajawal", system-ui, sans-serif;
	--qp9-font-body: "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ---------------------------------------------------------------------------
 * BRAND BAR — PAGE-07 signature (4px #0062FF under site-header)
 * ------------------------------------------------------------------------ */
.qp9-brand-bar {
	block-size: 4px;
	inline-size: 100%;
	background: var(--qp9-blue);
}

/* ---------------------------------------------------------------------------
 * CONTAINER + SECTIONS
 * ------------------------------------------------------------------------ */
.qort-phase9 .qp9-container {
	max-inline-size: 1200px;
	margin-inline: auto;
	padding-inline: 16px;
}

.qp9-section {
	padding-block: 48px;
}

.qp9-section--pale {
	background: var(--qp9-bg-alt);
}

.qp9-section-h2 {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-block-end: 24px;
	text-align: start;
	color: var(--qp9-text);
}

.qort-phase9[lang="ar"] .qp9-section-h2,
[lang="ar"] .qort-phase9 .qp9-section-h2 {
	text-transform: none;
	letter-spacing: 0;
}

@media (max-width: 768px) {
	.qp9-section {
		padding-block: 32px;
	}
}

/* ---------------------------------------------------------------------------
 * HERO
 * ------------------------------------------------------------------------ */
.qp9-page-hero {
	padding-block: 48px;
	background: linear-gradient(180deg, var(--qp9-bg-alt), var(--qp9-bg));
	text-align: start;
}

.qp9-page-hero h1 {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 44px;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--qp9-text);
	margin-block: 0 16px;
}

.qort-phase9[lang="ar"] .qp9-page-hero h1,
[lang="ar"] .qort-phase9 .qp9-page-hero h1 {
	text-transform: none;
	letter-spacing: 0;
}

.qp9-hero-sub {
	max-inline-size: 720px;
	color: var(--qp9-muted-strong);
	font-size: 16px;
	line-height: 1.5;
}

@media (max-width: 768px) {
	.qp9-page-hero {
		padding-block: 32px;
	}
	.qp9-page-hero h1 {
		font-size: 32px;
	}
}

/* ---------------------------------------------------------------------------
 * PACKAGE + AGE GROUP CARDS
 * ------------------------------------------------------------------------ */
.qp9-package-grid,
.qp9-age-group-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 768px) {
	.qp9-package-grid,
	.qp9-age-group-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

.qp9-package-card,
.qp9-age-group-card {
	border: 1px solid var(--qp9-border);
	border-radius: 12px;
	padding: 24px;
	background: var(--qp9-bg);
	display: flex;
	flex-direction: column;
}

.qp9-pack-cta,
.qp9-junior-cta {
	margin-top: auto !important;
}

.qp9-junior-cta {
	align-self: flex-start;
}

.qp9-package-card--featured {
	border-width: 2px;
	border-color: var(--qp9-blue);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.qp9-package-top-band {
	background: var(--qp9-bg-alt);
	padding: 12px 16px;
	border-radius: 8px;
	margin-block-end: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.qp9-pack-name {
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--qp9-text);
}

.qp9-price-block {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-block-end: 8px;
}

.qp9-price-value {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 32px;
	color: var(--qp9-green);
	font-feature-settings: "tnum";
	line-height: 1.1;
}

.qp9-price-denom {
	font-size: 14px;
	color: var(--qp9-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.qp9-min-group-note {
	font-size: 14px;
	color: var(--qp9-muted);
	font-style: italic;
	margin-block-end: 16px;
}

.qp9-inclusions {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 8px;
}

.qp9-inclusions li {
	padding-inline-start: 24px;
	position: relative;
	font-size: 16px;
	line-height: 1.5;
}

.qp9-inclusions li::before {
	content: "✓";
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	color: var(--qp9-green);
	font-weight: 700;
}

/* Age group chip */
.qp9-chip {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--qp9-bg-alt);
	color: var(--qp9-text);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-block-end: 12px;
}

.qp9-age-group-desc {
	font-size: 16px;
	line-height: 1.5;
	color: var(--qp9-text);
}

/* ---------------------------------------------------------------------------
 * PRICING TABLE (Junior)
 * ------------------------------------------------------------------------ */
.qp9-pricing-table {
	display: grid;
	gap: 0;
	border: 1px solid var(--qp9-border);
	border-radius: 12px;
	overflow: hidden;
	background: var(--qp9-bg);
}

.qp9-pricing-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1.5fr;
	gap: 16px;
	align-items: center;
	padding: 16px 24px;
	border-block-end: 1px solid var(--qp9-border);
}

.qp9-pricing-row:last-child {
	border-block-end: 0;
}

.qp9-pricing-row:nth-child(odd) {
	background: var(--qp9-bg-alt);
}

.qp9-pricing-label {
	font-weight: 700;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--qp9-text);
}

.qp9-pricing-price {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 24px;
	color: var(--qp9-green);
	font-feature-settings: "tnum";
}

.qp9-pricing-note {
	font-size: 14px;
	color: var(--qp9-muted-strong);
	line-height: 1.4;
}

.qp9-pricing-note--savings {
	color: var(--qp9-green);
	font-weight: 700;
}

@media (max-width: 640px) {
	.qp9-pricing-row {
		grid-template-columns: 1fr;
		gap: 4px;
		padding: 12px 16px;
	}
}

/* ---------------------------------------------------------------------------
 * INCLUDED LIST (Junior "What's Included")
 * ------------------------------------------------------------------------ */
.qp9-included-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.qp9-included-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 16px;
	line-height: 1.5;
}

.qp9-included-list li::before {
	content: "✓";
	color: var(--qp9-green);
	font-weight: 700;
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.qp9-included-list {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------------------
 * FORMS (qp9-form — shared across all 3 pages)
 * ------------------------------------------------------------------------ */
.qp9-form {
	background: var(--qp9-bg);
	border: 1px solid var(--qp9-border);
	border-radius: 12px;
	padding: 24px;
	max-inline-size: 720px;
}

.qp9-form--junior {
	max-inline-size: 640px;
}

.qp9-form--matchmaking {
	max-inline-size: 560px;
}

.qp9-form-lead {
	font-size: 16px;
	line-height: 1.5;
	margin-block-end: 16px;
	color: var(--qp9-text);
}

.qp9-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.qp9-form-grid--single {
	grid-template-columns: 1fr;
}

.qp9-form-grid .qp9-field--full {
	grid-column: 1 / -1;
}

@media (max-width: 768px) {
	.qp9-form-grid {
		grid-template-columns: 1fr;
	}
}

.qp9-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.qp9-field label {
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--qp9-text);
}

.qort-phase9[lang="ar"] .qp9-field label,
[lang="ar"] .qort-phase9 .qp9-field label {
	text-transform: none;
	letter-spacing: 0;
}

.qp9-field-req {
	color: var(--qp9-error);
	font-weight: 400;
}

.qp9-field input,
.qp9-field textarea,
.qp9-field select {
	block-size: 44px;
	padding-inline: 16px;
	padding-block: 0;
	border: 1px solid var(--qp9-border);
	border-radius: 8px;
	background: var(--qp9-bg);
	color: var(--qp9-text);
	font: 16px/1.5 var(--qp9-font-body);
	inline-size: 100%;
	box-sizing: border-box;
}

.qp9-field textarea {
	block-size: auto;
	min-block-size: 96px;
	padding: 16px;
	resize: vertical;
}

.qp9-field input:focus-visible,
.qp9-field textarea:focus-visible,
.qp9-field select:focus-visible {
	outline: 2px solid var(--qp9-blue);
	outline-offset: 4px;
	border-color: var(--qp9-blue);
}

.qp9-field input[aria-invalid="true"],
.qp9-field textarea[aria-invalid="true"],
.qp9-field input.qp9-field--error,
.qp9-field textarea.qp9-field--error {
	border-color: var(--qp9-error);
}

.qp9-field-error {
	color: var(--qp9-error);
	font-size: 14px;
	line-height: 1.4;
	margin-block-start: 4px;
}

/* Radio chip group (skill level, time-of-day, contact channel) */
.qp9-chip-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.qp9-chip-group input[type="radio"] {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.qp9-chip-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-block-size: 44px;
	padding: 8px 16px;
	border: 1px solid var(--qp9-border);
	border-radius: 999px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	background: var(--qp9-bg);
	color: var(--qp9-text);
}

.qp9-chip-group input[type="radio"]:checked + .qp9-chip-label {
	background: var(--qp9-blue);
	color: var(--qp9-bg);
	border-color: var(--qp9-blue);
}

.qp9-chip-group input[type="radio"]:focus-visible + .qp9-chip-label {
	outline: 2px solid var(--qp9-blue);
	outline-offset: 4px;
}

/* Checkbox group (preferred days) */
.qp9-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.qp9-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid var(--qp9-border);
	border-radius: 8px;
	min-block-size: 44px;
	cursor: pointer;
	font-size: 14px;
}

.qp9-checkbox-label input[type="checkbox"] {
	inline-size: 16px;
	block-size: 16px;
	margin-inline-end: 8px;
}

/* Consent checkbox */
.qp9-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-block-start: 16px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--qp9-text);
}

.qp9-consent input[type="checkbox"] {
	inline-size: 18px;
	block-size: 18px;
	margin-block-start: 2px;
	flex-shrink: 0;
}

/* Submit button */
.qp9-submit {
	background: var(--qp9-blue);
	color: var(--qp9-bg);
	min-block-size: 44px;
	padding-inline: 24px;
	padding-block: 0;
	font: 700 16px/1.4 var(--qp9-font-body);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	margin-block-start: 16px;
}

.qort-phase9[lang="ar"] .qp9-submit,
[lang="ar"] .qort-phase9 .qp9-submit {
	text-transform: none;
	letter-spacing: 0;
}

.qp9-submit:hover {
	filter: brightness(0.92);
}

.qp9-submit:focus-visible {
	outline: 2px solid var(--qp9-blue);
	outline-offset: 4px;
}

.qp9-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Form success / error note area */
.qp9-form-note {
	margin-block-start: 16px;
	min-block-size: 24px;
}

.qp9-success {
	padding: 16px;
	border: 1px solid var(--qp9-green);
	border-radius: 8px;
	background: rgba(27, 184, 61, 0.06);
}

.qp9-success h3 {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 20px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-block: 0 8px;
	color: var(--qp9-text);
}

.qort-phase9[lang="ar"] .qp9-success h3,
[lang="ar"] .qort-phase9 .qp9-success h3 {
	text-transform: none;
	letter-spacing: 0;
}

.qp9-form-error {
	color: var(--qp9-error);
	font-size: 14px;
	line-height: 1.5;
	padding: 12px 16px;
	border: 1px solid var(--qp9-error);
	border-radius: 8px;
	background: rgba(217, 72, 15, 0.06);
}

/* ---------------------------------------------------------------------------
 * SKILL LEVEL PILLS
 * ------------------------------------------------------------------------ */
.qp9-skill-level-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	font: 700 14px/1.4 var(--qp9-font-body);
	color: var(--qp9-text);
}

.qp9-skill-level-pill::before {
	content: "";
	display: block;
	inline-size: 8px;
	block-size: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.qp9-skill-level-pill--beginner {
	background: rgba(27, 184, 61, 0.08);
}

.qp9-skill-level-pill--beginner::before {
	background: var(--qp9-green);
}

.qp9-skill-level-pill--intermediate {
	background: rgba(255, 179, 0, 0.08);
}

.qp9-skill-level-pill--intermediate::before {
	background: var(--qp9-amber);
}

.qp9-skill-level-pill--advanced {
	background: rgba(217, 72, 15, 0.08);
}

.qp9-skill-level-pill--advanced::before {
	background: var(--qp9-error);
}

.qp9-skill-levels {
	display: grid;
	gap: 16px;
}

.qp9-skill-level-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.qp9-skill-level-desc {
	font-size: 16px;
	line-height: 1.5;
	color: var(--qp9-text);
}

/* ---------------------------------------------------------------------------
 * HOW IT WORKS (Matchmaking 4-step)
 * ------------------------------------------------------------------------ */
.qp9-how-it-works {
	display: grid;
	gap: 24px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.qp9-how-it-works li {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 16px;
	align-items: start;
}

.qp9-step-badge {
	inline-size: 40px;
	block-size: 40px;
	border-radius: 50%;
	background: var(--qp9-blue);
	color: var(--qp9-bg);
	display: grid;
	place-items: center;
	font: 700 14px/1.4 var(--qp9-font-body);
	font-feature-settings: "tnum";
}

.qp9-step-title {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 20px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-block: 0 4px;
	color: var(--qp9-text);
}

.qort-phase9[lang="ar"] .qp9-step-title,
[lang="ar"] .qort-phase9 .qp9-step-title {
	text-transform: none;
	letter-spacing: 0;
}

.qp9-step-body {
	font-size: 16px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * OPEN GAMES FEED (Matchmaking SSR from OpenGamesFeedRenderer)
 * ------------------------------------------------------------------------ */
.qp9-open-games-feed {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.qp9-open-games-feed--empty {
	padding: 32px;
	border: 1px dashed var(--qp9-border);
	border-radius: 12px;
	background: var(--qp9-bg);
	text-align: start;
}

.qp9-open-games-feed--empty h3 {
	font-family: var(--qp9-font-heading);
	font-weight: 700;
	font-size: 20px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--qp9-text);
	margin-block: 0 8px;
}

.qort-phase9[lang="ar"] .qp9-open-games-feed--empty h3,
[lang="ar"] .qort-phase9 .qp9-open-games-feed--empty h3 {
	text-transform: none;
	letter-spacing: 0;
}

.qp9-open-game-card {
	border: 1px solid var(--qp9-border);
	border-radius: 12px;
	padding: 16px;
	background: var(--qp9-bg);
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: center;
}

@media (max-width: 640px) {
	.qp9-open-game-card {
		grid-template-columns: 1fr;
	}
}

.qp9-open-game-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.qp9-open-game-datetime {
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--qp9-text);
	font-feature-settings: "tnum";
}

.qp9-open-game-court {
	font-size: 16px;
	font-weight: 700;
	color: var(--qp9-text);
}

.qp9-open-game-cta {
	padding: 12px 20px;
	border: 1px solid var(--qp9-blue);
	border-radius: 8px;
	color: var(--qp9-blue);
	background: transparent;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	min-block-size: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.qp9-open-game-cta:hover {
	background: rgba(0, 98, 255, 0.06);
}

.qp9-open-game-cta:focus-visible {
	outline: 2px solid var(--qp9-blue);
	outline-offset: 4px;
}

/* ---------------------------------------------------------------------------
 * COMMUNITY NOTE (Matchmaking footnote)
 * ------------------------------------------------------------------------ */
.qp9-community-note {
	font-style: italic;
	font-size: 14px;
	line-height: 1.5;
	color: var(--qp9-muted-strong);
	text-align: start;
}

/* ---------------------------------------------------------------------------
 * FOOTER NOTE (Corporate)
 * ------------------------------------------------------------------------ */
.qp9-footer-note {
	font-style: italic;
	font-size: 14px;
	color: var(--qp9-muted-strong);
	line-height: 1.5;
	margin-block-start: 16px;
}

/* ---------------------------------------------------------------------------
 * HERO IMAGES (responsive, aspect-preserving)
 * ------------------------------------------------------------------------ */
.qp9-hero-media {
	display: block;
	max-inline-size: 100%;
	inline-size: 100%;
	block-size: auto;
	border-radius: 12px;
	margin-block-start: 24px;
}

.qp9-pack-icon {
	color: var(--qp9-blue);
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
 * ACCESSIBILITY — REDUCED MOTION
 * ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.qort-phase9 *,
	.qort-phase9 *::before,
	.qort-phase9 *::after {
		transition: none !important;
		animation: none !important;
	}
}
