/* =========================
SGDTips Deal Card - v9
========================= */
.sgdt-deal-card {
	position: relative;
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr);
	grid-template-rows: auto auto;
	background: #ffffff;
	border: 0.5px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	margin: 10px 0;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
	font-family: var(--td_default_google_font_2, 'Roboto', sans-serif);
}
.sgdt-deal-card p,
.sgdt-deal-card ul {
	margin: 0 !important;
}

.sgdt-deals-section {
	margin: 18px 0 24px;
}

.sgdt-deals-section-title {
	margin-top: 30px;
	margin-bottom: 20px;
	font-size: 27px;
	line-height: 38px;
	font-family: var(--td_default_google_font_2, 'Roboto', sans-serif);
	color: var(--td_text_color, #111111);
	font-weight: 500;
}

.sgdt-deals-list {
	margin: 0;
}

.sgdt-deals-pill-nav {
	position: relative;
	margin: 0 0 6px;
}

.sgdt-deals-pill-nav::before,
.sgdt-deals-pill-nav::after {
	position: absolute;
	z-index: 1;
	top: 0;
	bottom: 8px;
	width: 76px;
	pointer-events: none;
}

.sgdt-deals-pill-nav.has-overflow-left::before {
	left: 0;
	content: '';
	background: linear-gradient(
		to left,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.18) 18%,
		rgba(255, 255, 255, 0.34) 32%,
		rgba(255, 255, 255, 0.50) 46%,
		rgba(255, 255, 255, 0.64) 49%,
		rgba(255, 255, 255, 0.80) 52%,
		rgba(255, 255, 255, 0.94) 53%,
		#ffffff 54%,
		#ffffff 100%
	);
}

.sgdt-deals-pill-nav.has-overflow-right::after {
	right: 0;
	content: '';
	background: linear-gradient(
		to right,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.18) 18%,
		rgba(255, 255, 255, 0.34) 32%,
		rgba(255, 255, 255, 0.50) 46%,
		rgba(255, 255, 255, 0.64) 49%,
		rgba(255, 255, 255, 0.80) 52%,
		rgba(255, 255, 255, 0.94) 53%,
		#ffffff 54%,
		#ffffff 100%
	);
}

.sgdt-deals-brand-filter {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 0 0 8px;
	margin: 0;
	max-width: 100%;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
}

.sgdt-deals-pill-arrow {
	position: absolute;
	z-index: 2;
	top: calc(50% - 4px);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #0171CE;
	cursor: pointer;
	appearance: none;
}

.sgdt-deals-pill-arrow[hidden] {
	display: none;
}

.sgdt-deals-pill-arrow::before {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 29px;
	height: 29px;
	content: '';
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background-color: transparent;
	transition: background-color 140ms ease;
}

.sgdt-deals-pill-arrow::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	content: '';
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
}

.sgdt-deals-pill-arrow-left {
	left: 1px;
}

.sgdt-deals-pill-arrow-left::after {
	transform: translate(-35%, -50%) rotate(-135deg);
}

.sgdt-deals-pill-arrow-right {
	right: 1px;
}

.sgdt-deals-pill-arrow-right::after {
	transform: translate(-65%, -50%) rotate(45deg);
}

.sgdt-deals-pill-arrow.is-active::before {
	background-color: rgba(17, 24, 39, 0.055);
}

.sgdt-deals-pill-arrow:focus-visible {
	outline: 2px solid #0171CE;
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.sgdt-deals-pill-arrow:hover::before {
		background-color: rgba(17, 24, 39, 0.055);
	}
}

.sgdt-deals-brand-pill,
.sgdt-deals-offer-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	max-width: 190px;
	border: 1px solid #0171CE;
	border-radius: 999px;
	background: #ffffff;
	color: #0171CE;
	cursor: pointer;
	font-family: var(--td_default_google_font_2, 'Roboto', sans-serif);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.2;
	overflow: hidden;
	padding: 7px 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sgdt-deals-brand-pill:focus-visible {
	outline: 2px solid #0171CE;
	outline-offset: 2px;
}

.sgdt-deals-brand-pill.is-active {
	border-color: #0171CE;
	background: #0171CE;
	color: #ffffff;
}

.sgdt-deals-filterable-card[hidden] {
	display: none !important;
}

.sgdt-deals-section-cta {
	margin: 12px 0 0;
	text-align: center;
}

.sgdt-deals-section-cta a {
	color: #0171CE;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.sgdt-deals-section-cta a:hover {
	text-decoration: underline;
}

.sgdt-deal-value {
	grid-column: 1;
	grid-row: 1;
	padding: 12px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 10px;
}
.sgdt-deal-value.sgdt-deal-value-compact {
	padding-left: 4px;
	padding-right: 4px;
}

.sgdt-deal-value-main {
	display: block;
	max-width: 100%;
	overflow: hidden;
	font-size: 1.35rem;
	line-height: 1.05;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #111827;
	text-transform: uppercase;
	white-space: nowrap;
}
.sgdt-deal-value-sub {
	display: block;
	max-width: 100%;
	overflow: hidden;
	font-size: 0.95rem;
	line-height: 1.1;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #111827;
	text-transform: uppercase;
	white-space: nowrap;
}
.sgdt-deal-value-main.sgdt-deal-value-size-md {
	font-size: 1.25rem;
}
.sgdt-deal-value-main.sgdt-deal-value-size-lg {
	font-size: 1.15rem;
}
.sgdt-deal-value-main.sgdt-deal-value-size-xl {
	font-size: 1.05rem;
}
.sgdt-deal-value-main.sgdt-deal-value-size-xxl {
	font-size: 0.95rem;
}
.sgdt-deal-value-sub.sgdt-deal-value-size-md {
	font-size: 0.9rem;
}
.sgdt-deal-value-sub.sgdt-deal-value-size-lg {
	font-size: 0.85rem;
}
.sgdt-deal-value-sub.sgdt-deal-value-size-xl {
	font-size: 0.8rem;
}
.sgdt-deal-value-sub.sgdt-deal-value-size-xxl {
	font-size: 0.75rem;
}
.sgdt-deal-brand-logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	width: 100%;
}
.sgdt-deal-brand-logo {
	display: block;
	max-width: 100%;
	max-height: 54px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.sgdt-deal-top-pick-label {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 30px;
	box-sizing: border-box;
	overflow: visible;
}
/* Ribbon body: covers the value column and follows the card corner radius. */
.sgdt-deal-top-pick-label::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	z-index: -1;
	width: 130px;
	height: 30px;
	background: #DFECFF;
	border-top-left-radius: 10px;
	border-bottom-right-radius: 5px;
}
/* Ribbon tail: extends across the content column at a reduced height. */
.sgdt-deal-top-pick-label::after {
	content: "";
	position: absolute;
	top: 0;
	left: 130px;
	right: 0;
	z-index: -1;
	height: 6px;
	background: #DFECFF;
	border-top-right-radius: 10px;
}
/* Keep the star and TOP PICK text centred as one unit inside the ribbon body. */
.sgdt-deal-top-pick-label-inner {
	position: absolute;
	top: 0;
	left: 0;
	width: 130px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	color: #003868;
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.1;
	text-transform: uppercase;
	white-space: nowrap;
}
.sgdt-deal-top-pick-label-inner span {
	color: #fcb61a;
	font-size: 0.82rem;
	line-height: 1;
}
.sgdt-deal-content {
	grid-column: 2;
	grid-row: 1;
	padding: 10px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sgdt-deal-content h3 {
	margin: 0;
	font-size: 1.18rem;
	line-height: 1.35;
	font-weight: 600;
	color: #111827;
}
.sgdt-deal-desc {
	margin: 0 0 2px;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #374151;
}
.sgdt-deal-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 34px;
	padding: 6px 14px;
	background: #0171CE;
	color: #ffffff !important;
	border-radius: 20px;
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
	box-sizing: border-box;
	transition: opacity 0.15s;
	gap: 6px;
	margin-bottom: 2px;
}
.sgdt-deal-button::after {
	content: "";
	display: inline-block;
	width: 11px;
	height: 11px;
	border-right: 1.5px solid #ffffff;
	border-top: 1.5px solid #ffffff;
	transform: rotate(45deg);
	flex-shrink: 0;
}
.sgdt-deal-button:hover {
	opacity: 0.88;
}

/* DEAL DETAILS */
.sgdt-deal-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 12px;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #374151;
}

.sgdt-deal-details li {
	margin: 0;
	min-width: 0;
}

.sgdt-deal-details strong {
	font-weight: 600;
}

/* FOOTER */
.sgdt-deal-footer {
	grid-column: 1 / -1;
	grid-row: 2;
	display: flex;
	align-items: center;
	border-top: 1px solid #e5e7eb;
	padding: 6px 14px;
}
.sgdt-deal-footer-terms {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 0.75rem;
	font-weight: 400;
	color: #0171CE;
	text-align: left;
}

/* OVERLAY */
.sgdt-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.38);
	z-index: 99998;
}
.sgdt-overlay.active {
	display: block;
}

/* DESKTOP POPUP */
.sgdt-popup {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(560px, 92vw);
	max-height: 85vh;
	background: #fff;
	border-radius: 12px;
	z-index: 99999;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	font-family: var(--td_default_google_font_2, 'Roboto', sans-serif);
}
.sgdt-popup.active {
	display: flex;
}

/* MOBILE BOTTOM SHEET */
.sgdt-sheet {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	border-radius: 14px 14px 0 0;
	z-index: 99999;
	flex-direction: column;
	max-height: 60vh;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.13);
	font-family: var(--td_default_google_font_2, 'Roboto', sans-serif);
}
.sgdt-sheet.active {
	display: flex;
}

/* SHARED MODAL */
.sgdt-modal-header {
	padding: 14px 18px 10px;
	flex-shrink: 0;
}
.sgdt-modal-title {
	margin: 0 0 4px;
	font-size: 1.18rem;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
}
.sgdt-modal-desc {
	margin: 0;
	font-size: 0.9rem;
	color: #374151;
	line-height: 1.4;
}

/* deal-details inside modal header */
.sgdt-modal-details {
	margin-top: 8px !important;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 12px;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #374151;
}
.sgdt-modal-details li {
	margin: 0;
	min-width: 0;
}
.sgdt-modal-details strong {
	font-weight: 600;
}

/* mobile sheet: 1 column */
.sgdt-sheet .sgdt-modal-details {
	grid-template-columns: 1fr;
}

.sgdt-modal-divider {
	height: 1px;
	background: #e5e7eb;
	flex-shrink: 0;
	margin: 0;
}
.sgdt-modal-cta {
	padding: 12px 18px;
	flex-shrink: 0;
}
.sgdt-modal-cta[hidden],
.sgdt-deal-button[hidden] {
	display: none !important;
}
.sgdt-modal-cta .sgdt-deal-button {
	font-size: 0.9rem;
	min-height: 40px;
	margin-bottom: 0;
}
.sgdt-modal-terms-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px 6px;
	flex-shrink: 0;
}
.sgdt-modal-terms-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: #111827;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.sgdt-modal-body {
	overflow-y: auto;
	padding: 0 18px 14px;
	flex: 1;
	font-size: 0.9rem;
	color: #374151;
	line-height: 1.5;
}
.sgdt-modal-body ul {
	margin: 6px 0 0 !important;
	padding-left: 16px;
}
.sgdt-modal-body li {
	margin-bottom: 4px;
}

/* desktop order */
.sgdt-popup .sgdt-modal-cta {
	order: 2;
}
.sgdt-popup .sgdt-modal-divider {
	order: 3;
}
.sgdt-popup .sgdt-modal-terms-bar {
	order: 4;
}
.sgdt-popup .sgdt-modal-body {
	order: 5;
}

/* VALUE BAR - mobile sheet */
.sgdt-sheet-value-bar {
	flex-shrink: 0;
	background: #01519a;
	padding: 0 48px 0 18px;
	min-height: 52px;
	display: flex;
	align-items: center;
	border-radius: 14px 14px 0 0;
	position: relative;
}
.sgdt-sheet-value-bar-text {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.2;
}

/* CLOSE BUTTON */
.sgdt-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
	padding: 4px;
}
.sgdt-sheet-value-bar .sgdt-modal-close {
	color: rgba(255, 255, 255, 0.85);
	top: 50%;
	transform: translateY(-50%);
}

/* MOBILE SHEET - CTA sticky at bottom */
@media (max-width: 640px) {
	.sgdt-sheet .sgdt-modal-cta {
		order: 99;
		border-top: 1px solid #e5e7eb;
		padding: 12px 8px 18px;
	}
	.sgdt-sheet .sgdt-modal-terms-bar {
		padding: 10px 8px 6px;
	}
	.sgdt-sheet .sgdt-modal-body {
		padding: 0 8px 14px;
	}
	.sgdt-sheet .sgdt-modal-header {
		padding: 14px 8px 10px;
	}
}

@media (min-width: 641px) {
	.sgdt-sheet {
		display: none !important;
	}
}
@media (max-width: 640px) {
	.sgdt-popup {
		display: none !important;
	}
}

@media (max-width: 480px) {
	.sgdt-deal-card {
		grid-template-columns: 120px minmax(0, 1fr);
	}
	.sgdt-deal-top-pick-label::before {
		width: 120px;
	}
	.sgdt-deal-top-pick-label::after {
		left: 120px;
	}
	.sgdt-deal-top-pick-label-inner {
		width: 120px;
	}
	.sgdt-deal-value {
		padding: 10px 8px;
	}
	.sgdt-deal-value.sgdt-deal-value-compact {
		padding-left: 2px;
		padding-right: 2px;
	}
	.sgdt-deal-value-main {
		font-size: 1.25rem;
	}
	.sgdt-deal-value-sub {
		font-size: 0.9rem;
	}
	.sgdt-deal-value-main.sgdt-deal-value-size-md {
		font-size: 1.15rem;
	}
	.sgdt-deal-value-main.sgdt-deal-value-size-lg {
		font-size: 1.05rem;
	}
	.sgdt-deal-value-main.sgdt-deal-value-size-xl {
		font-size: 0.95rem;
	}
	.sgdt-deal-value-main.sgdt-deal-value-size-xxl {
		font-size: 0.85rem;
	}
	.sgdt-deal-value-sub.sgdt-deal-value-size-md {
		font-size: 0.85rem;
	}
	.sgdt-deal-value-sub.sgdt-deal-value-size-lg {
		font-size: 0.8rem;
	}
	.sgdt-deal-value-sub.sgdt-deal-value-size-xl {
		font-size: 0.75rem;
	}
	.sgdt-deal-value-sub.sgdt-deal-value-size-xxl {
		font-size: 0.7rem;
	}
	.sgdt-deal-brand-logo {
		max-height: 48px;
	}
	.sgdt-deal-content {
		padding: 10px 12px;
		gap: 5px;
	}
	.sgdt-deal-details {
		grid-template-columns: 1fr;
	}
}
