/*
 * Rebates & Deals (/tire-rebates/ and /tire-rebates/{slug}/, 2026-10-22) -
 * see class-cti-rebates.php. Mobile-first; uses the theme's tokens where
 * they exist, with fallbacks so the plugin still renders on another theme.
 * Colours: red #c70000 on white 5.9:1, white on red 5.9:1, ended banner
 * #4a3000 on #fff4e0 11:1, "Ends in" tag #8a0000 on #fdeaea 8.4:1 (WCAG AA).
 */

.cti-rebates {
	max-width: 960px;
	margin: 0 auto;
	color: var( --cst-text-dark, #1b1b1b );
}

.cti-rebates__h1 {
	margin: 0 0 12px;
	font-size: 28px;
	line-height: 1.25;
}

.cti-rebates__intro,
.cti-rebates__lead {
	margin: 0 0 24px;
	font-size: 17px;
	line-height: 1.55;
}

.cti-rebates__lead {
	font-weight: 600;
}

.cti-rebates h2 {
	margin: 32px 0 12px;
	font-size: 22px;
	line-height: 1.3;
}

/* Logo box: fixed size, the image scales inside it, so nothing moves while it loads. */
.cti-rebates__logo {
	display: flex;
	align-items: center;
	height: 56px;
	width: 220px;
	max-width: 100%;
	margin: 0 0 12px;
}

.cti-rebates__logo-img {
	display: block;
	max-height: 56px;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.cti-rebates__logo-text {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.02em;
}

/* Cards */
.cti-rebates__grid {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.cti-rebate-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: var( --radius-default, 8px );
}

.cti-rebates .cti-rebate-card__brand {
	margin: 0 0 4px;
	font-size: 20px;
}

.cti-rebate-card__amount {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
	color: var( --cst-red, #c70000 );
}

.cti-rebate-card__dates {
	margin: 0 0 12px;
	font-size: 15px;
}

.cti-rebate-card__ends {
	align-self: flex-start;
	margin: 0 0 12px;
	padding: 2px 10px;
	border-radius: 999px;
	background: #fdeaea;
	color: #8a0000;
	font-size: 14px;
	font-weight: 700;
}

.cti-rebate-card__cta {
	margin-top: auto;
}

/* Buttons - 48px tall tap targets */
.cti-rebates__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 20px;
}

.cti-rebates__btn,
.cti-rebates .cst-call-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	box-sizing: border-box;
	border-radius: 6px;
	border: 2px solid var( --cst-red, #c70000 );
	font-weight: 700;
	font-size: 16px;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

/* Beats Storefront's `.hentry .entry-content a` underline. */
.entry-content .cti-rebates a.cti-rebates__btn,
.entry-content .cti-rebates a.cti-rebates__btn:hover,
.entry-content .cti-rebates a.cti-rebates__btn:focus {
	text-decoration: none;
}

.cti-rebates a.cti-rebates__btn--primary {
	background: var( --cst-red, #c70000 );
	color: #fff;
}

.cti-rebates a.cti-rebates__btn--secondary {
	background: #fff;
	color: var( --cst-red, #c70000 );
}

.cti-rebates a.cti-rebates__btn--primary:hover,
.cti-rebates a.cti-rebates__btn--primary:focus {
	background: #7a0000;
	border-color: #7a0000;
	color: #fff;
}

.cti-rebates a.cti-rebates__btn--secondary:hover,
.cti-rebates a.cti-rebates__btn--secondary:focus {
	background: #fdeaea;
	color: #7a0000;
}

/* Note and ended/upcoming banner */
.cti-rebates__note {
	margin: 0 0 24px;
	padding: 12px 16px;
	border-left: 4px solid var( --cst-red, #c70000 );
	background: #f6f6f6;
	font-size: 15px;
	line-height: 1.5;
}

.cti-rebates__banner {
	margin: 0 0 24px;
	padding: 16px;
	border: 1px solid #b07a00;
	border-radius: var( --radius-default, 8px );
	background: #fff4e0;
	color: #4a3000;
}

.cti-rebates__banner p {
	margin: 0 0 8px;
}

.cti-rebates__banner p:last-child {
	margin: 0;
}

.cti-rebates__banner a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #4a3000;
	font-weight: 700;
}


/* Eligible tires table */
.cti-rebates__table {
	width: 100%;
	margin: 0 0 8px;
	border-collapse: collapse;
	font-size: 16px;
}

.cti-rebates__table th,
.cti-rebates__table td {
	padding: 10px 12px;
	border-bottom: 1px solid #d9d9d9;
	text-align: left;
	vertical-align: top;
}

.cti-rebates__table th {
	background: #f6f6f6;
	font-weight: 700;
}

.cti-rebates__table td:last-child,
.cti-rebates__table th:last-child {
	white-space: nowrap;
}

.cti-rebates__steps li,
.cti-rebates__fine li {
	margin: 0 0 8px;
	line-height: 1.55;
}

/* Standing offer (no active promos) */
.cti-rebates__standing {
	margin: 0 0 24px;
	padding: 24px;
	border-radius: var( --radius-default, 8px );
	background: linear-gradient( 160deg, #c70000 0%, #7a0000 100% );
	color: #fff;
	text-align: center;
}

.cti-rebates .cti-rebates__standing-title {
	margin: 0 0 12px;
	color: #fff;
}

.cti-rebates__standing ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.7;
}

@media ( min-width: 640px ) {
	.cti-rebates__h1 {
		font-size: 34px;
	}

	.cti-rebates__grid {
		grid-template-columns: repeat( 2, 1fr );
	}

	.cti-rebates__actions {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

@media ( min-width: 1024px ) {
	.cti-rebates__grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}
