/**
 * 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-green: #3AAF56;
	--cd-grey: #858585;
	--cd-shadow: 0 2px 10px rgba(2, 48, 71, .12);
	--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 49px; grid-template-areas: "icon info pay more" "icon info save more"; gap: 4px 12px; align-items: center; background: #fff; border: 1.5px solid var(--cd-navy); border-radius: 12px; padding: 12px 14px; }
/* WEB-397 deal details: chevron column and the conditions panel. Full rules here, not only overrides: the panel opens on
   pages without course-detail-v2.css (/courses, city pages, search), where the panel otherwise landed in the 40px icon
   column and the chevron was an unstyled button. */
.ttgp-cd.ttgp-cd--sidebar .cd-deal.has-terms { cursor: pointer; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-more { grid-area: more; align-self: stretch; display: flex; align-items: center; justify-content: flex-end; padding-left: 8px; border-left: 1px solid rgba(2, 48, 71, .15); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: #EAF3F9; color: var(--cd-navy); font-size: 13px; line-height: 1; box-shadow: none; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-toggle:hover { background: var(--cd-light-blue); color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-toggle:focus-visible { outline: 2px solid var(--cd-navy); outline-offset: 2px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-toggle i { transition: transform .2s ease; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal.is-open .cd-deal-toggle { background: var(--cd-navy); color: #fff; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal.is-open .cd-deal-toggle i { transform: rotate(180deg); }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-panel { grid-column: 1 / -1; margin: 8px -14px -12px; overflow: hidden; border-radius: 0 0 11px 11px; transition: height .25s ease; cursor: auto; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-panel[hidden] { display: none; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-terms { margin: 0; padding: 12px 14px 12px 66px; border-top: 1px solid rgba(2, 48, 71, .12); background: #F4F9FC; font-size: 14px; line-height: 1.6; color: var(--cd-slate); opacity: 0; transition: opacity .2s ease; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal.is-open .cd-deal-terms { opacity: 1; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-terms li { position: relative; }
.ttgp-cd.ttgp-cd--sidebar .cd-deal-terms li::before { content: ""; position: absolute; left: -14px; top: calc(.8em - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: reduce) {
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-panel,
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-terms,
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-toggle,
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-toggle i { transition: none; }
}
.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-course-notes { font-size: 15px; line-height: 1.5; color: var(--cd-slate); }
.ttgp-cd.ttgp-cd--sidebar .cd-deals-course-notes li { position: relative; padding-left: 12px; }
.ttgp-cd.ttgp-cd--sidebar .cd-deals-course-notes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.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; }

/* Pass card (same block as the course page side column, tgp_cdv2_pass_card_html()) */
.ttgp-cd.ttgp-cd--sidebar .cd-pass-card { background: #fff; border-radius: 16px; box-shadow: var(--cd-shadow); padding: 24px; display: flex; flex-direction: column; gap: 12px; color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-card p { margin: 0; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-kicker { font-size: 16px; color: var(--cd-slate); }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-name { font: 800 30px/1.05 var(--cd-font); color: var(--cd-navy); text-wrap: balance; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-price strong { font: 900 40px/1.1 var(--cd-font); color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-perks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.4; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-perks li { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-perks i { color: var(--cd-green); font-size: 16px; margin-top: 2px; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-card .cd-btn { width: 100%; }
.ttgp-cd.ttgp-cd--sidebar .cd-pass-badges { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--cd-line); padding-top: 12px; }
.ttgp-cd.ttgp-cd--sidebar .cd-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 8px; font: 400 14px/1.3 var(--cd-font); color: var(--cd-slate); text-align: center; background: none; border: 0; border-radius: 0; box-shadow: none; min-height: 44px; text-transform: none; letter-spacing: 0; }
.ttgp-cd.ttgp-cd--sidebar .cd-badge-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--cd-light-blue); }
.ttgp-cd.ttgp-cd--sidebar .cd-badge-icon i { font-size: 18px; color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-badge-text { display: block; }
.ttgp-cd.ttgp-cd--sidebar .cd-badge strong { display: block; font: 700 16px/1.2 var(--cd-font); color: var(--cd-navy); }
.ttgp-cd.ttgp-cd--sidebar .cd-badge--info { cursor: pointer; }
.ttgp-cd.ttgp-cd--sidebar .cd-badge--info .cd-badge-text { text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: var(--cd-grey); }
.ttgp-cd.ttgp-cd--sidebar .cd-badge--info:hover,
.ttgp-cd.ttgp-cd--sidebar .cd-badge--info:focus { background: none; color: var(--cd-slate); }
.ttgp-cd.ttgp-cd--sidebar .cd-badge--info:focus-visible { outline: 2px solid var(--cd-teal); outline-offset: 2px; border-radius: 4px; }
.ttgp-cd.ttgp-cd--sidebar .cd-guarantee-pop { max-width: 300px; margin: auto; padding: 20px; border: 0; border-radius: 16px; box-shadow: 0 8px 24px rgba(2, 48, 71, .16); color: var(--cd-navy); font-size: 16px; line-height: 1.5; }
.ttgp-cd.ttgp-cd--sidebar .cd-guarantee-pop::backdrop { background: rgba(2, 48, 71, .25); }
.ttgp-cd.ttgp-cd--sidebar .cd-guarantee-pop p + p { margin-top: 8px; }
.ttgp-cd.ttgp-cd--sidebar .cd-guarantee-pop a { color: var(--cd-navy); font-weight: 600; }

/* Buttons */
.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 45px; padding: 12px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-panel { margin: 8px -12px -12px; }
	.ttgp-cd.ttgp-cd--sidebar .cd-deal-terms { padding: 12px 12px 12px 56px; }
	.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-deal-pay small { max-width: 84px; margin-left: auto; text-wrap: balance; } /* Same as the course page <=900px. */
	/* Wraps inside the name column instead of running under the price (the chevron column narrows it). */
	.ttgp-cd.ttgp-cd--sidebar .cd-pill-popular { display: block; width: max-content; max-width: 100%; margin: 4px 0 0; padding: 3px 8px; border-radius: 8px; font-size: 12px; line-height: 1.3; white-space: normal; }
}
