/**
 * Deal sidebar v2 (inc/deal-sidebar-v2.php): content of the right-hand "Deal Details" panel on result cards.
 * Same look as the course detail page v2 deals panel (assets/css/course-detail-v2.css), rows always stacked
 * for the narrow panel. Scoped under .ttgp-cd.ttgp-cd--sidebar; loaded site-wide (the panel is in the footer).
 */

.ttgp-cd.ttgp-cd--sidebar {
	--cd-navy: #023047;
	--cd-orange: #FA8500;
	--cd-orange-hover: #E07700;
	--cd-orange-press: #C86B00;
	--cd-deep-green: #439560;
	--cd-teal: #039CBB;
	--cd-light-blue: #D9F2FF;
	--cd-slate: #35596C;
	--cd-line: #E4E3E3;
	--cd-font: 'League Spartan', sans-serif;

	display: flex;
	flex-direction: column;
	gap: 16px;
	font-family: var(--cd-font);
	font-size: 17px;
	line-height: 1.5;
	color: var(--cd-navy);
}

/* Reset theme / popup globals inside the panel. */
.ttgp-cd.ttgp-cd--sidebar *,
.ttgp-cd.ttgp-cd--sidebar *::before,
.ttgp-cd.ttgp-cd--sidebar *::after { box-sizing: border-box; }
.ttgp-cd.ttgp-cd--sidebar h3,
.ttgp-cd.ttgp-cd--sidebar p,
.ttgp-cd.ttgp-cd--sidebar ul,
.ttgp-cd.ttgp-cd--sidebar li { margin: 0; padding: 0; list-style: none; line-height: inherit; color: inherit; font-family: var(--cd-font); }
.ttgp-cd.ttgp-cd--sidebar a { color: var(--cd-teal); text-decoration: underline; text-underline-offset: 2px; }
.ttgp-cd.ttgp-cd--sidebar .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Head */
.ttgp-cd.ttgp-cd--sidebar .cd-sb-head { display: flex; flex-direction: column; gap: 4px; }
.ttgp-cd.ttgp-cd--sidebar .cd-sb-title { font: 800 26px/1.1 var(--cd-font); color: var(--cd-navy); }

/* Deals panel */
.ttgp-cd.ttgp-cd--sidebar .cd-sb-deals { background: var(--cd-light-blue); border-radius: 16px; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-list { display: flex; flex-direction: column; gap: 8px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "icon info pay" "icon info save"; gap: 4px 12px; align-items: center; background: #fff; border: 1.5px solid var(--cd-navy); border-radius: 12px; padding: 12px 14px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal.is-selected { box-shadow: 0 0 0 3px var(--cd-teal); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-icon.tgp-deal-icon { grid-area: icon; display: block; width: 40px; height: 40px; min-width: 0; margin: 0; border-radius: 8px; background-color: var(--cd-navy); background-repeat: no-repeat; background-position: center; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-info { grid-area: info; min-width: 0; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-name { font: 600 18px/1.2 var(--cd-font); color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-when { font-size: 15px; line-height: 1.45; color: var(--cd-slate); margin-top: 2px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-uses-inline { font-size: 15px; color: var(--cd-slate); margin-top: 4px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-uses-inline i { margin-right: 4px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-uses { display: none; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-pay { grid-area: pay; align-self: end; max-width: 150px; text-align: right; font: 900 28px/1 var(--cd-font); color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-pay small { display: block; margin-top: 4px; font: 400 13px/1.35 var(--cd-font); color: var(--cd-slate); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-save { grid-area: save; align-self: start; text-align: right; font: 700 20px/1.2 var(--cd-font); color: var(--cd-deep-green); }
/* Group-fee rows: "per player" on its own small line under "Save $43" (same as the course page, stacked). */
.ttgp-cd.ttgp-cd--sidebar .cd-deal-save-per { display: block; margin-top: 0; font: 400 14px/1.35 var(--cd-font); color: var(--cd-slate); }
.ttgp-cd.ttgp-cd--sidebar .cd-pill-popular { display: inline-block; margin: 2px 0 0 6px; vertical-align: 2px; background: var(--cd-navy); color: #fff; font: 700 13px/1.4 var(--cd-font); letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

/* Notes under the cards */
.ttgp-cd.ttgp-cd--sidebar .cd-deals-app-only,
.ttgp-cd.ttgp-cd--sidebar .cd-deals-print-only,
.ttgp-cd.ttgp-cd--sidebar .cd-deals-members,
.ttgp-cd.ttgp-cd--sidebar .cd-deals-note { display: flex; gap: 8px; align-items: flex-start; font-size: 16px; line-height: 1.5; color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-deals-note { border-top: 1px solid rgba(2, 48, 71, .12); padding-top: 10px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deals-app-only i,
.ttgp-cd.ttgp-cd--sidebar .cd-deals-print-only i,
.ttgp-cd.ttgp-cd--sidebar .cd-deals-members i,
.ttgp-cd.ttgp-cd--sidebar .cd-deals-note i { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 18.5px; font-size: 14px; line-height: 1; position: relative; top: 1px; } /* Same as the course page notes (16px text). */
.ttgp-cd.ttgp-cd--sidebar .cd-deals-note a { color: var(--cd-navy); font-weight: 600; }

/* Actions */
.ttgp-cd.ttgp-cd--sidebar .cd-sb-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; } /* Button keeps its own width, left-aligned. */
.ttgp-cd.ttgp-cd--sidebar .cd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 16px 20px; border-radius: 8px; background: var(--cd-orange); color: #fff; text-decoration: none; font: 700 16px/1 var(--cd-font); }
.ttgp-cd.ttgp-cd--sidebar .cd-btn:hover { background: var(--cd-orange-hover); color: #fff; }
.ttgp-cd.ttgp-cd--sidebar .cd-btn:active { background: var(--cd-orange-press); }
.ttgp-cd.ttgp-cd--sidebar .cd-sb-empty { font-size: 16px; color: var(--cd-slate); }

@media (max-width: 480px) {
	.ttgp-cd.ttgp-cd--sidebar .cd-sb-title { font-size: 22px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-deal { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 12px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-icon.tgp-deal-icon { width: 32px; height: 32px; border-radius: 6px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-name { font-size: 17px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-pay { font-size: 26px; max-width: 120px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-pill-popular { display: block; width: max-content; margin: 4px 0 0; }
}
