/*
 * OK Digital Deals -- card styles for the WordPress blog. SEO Hub #16117.
 *
 * The same cards as scanwp.net/deals/, so a reader moving between the Black
 * Friday post and the listing page sees one thing and not two. Ported from
 * public/css/deals.css rather than shared, because the blog and the Laravel app
 * are separate codebases on separate halves of the site and a shared file would
 * be one more thing to keep in step across a deploy. If you change a card here,
 * change it there.
 *
 * Everything is namespaced `.okd-`, deliberately not the `.deal-` names the
 * Laravel side uses: this CSS lands inside the ScanWPBlog theme next to eight
 * years of post styles, and a generic class name would collide with something.
 *
 * Type scale matches the Laravel pages: 18px body (Avi, 2026-10-13).
 */

.okd-deals {
	margin: 28px 0;
	font-size: 18px;
	line-height: 1.6;
	color: #2b3038;
}

.okd-deals-group {
	margin: 32px 0 14px !important;
}

.okd-deal-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -9px;
}

.okd-deal {
	flex: 1 1 340px;
	/* flex-basis plus a max-width: a lone card in a category must not stretch
	   the full content width and look broken. */
	max-width: 540px;
	margin: 0 9px 18px;
	border: 1px solid #e3e7eb;
	border-radius: 7px;
	background: #fff;
	padding: 18px 18px 14px;
	display: flex;
	flex-direction: column;
}

.okd-is-live {
	border-color: #bfe3e5;
	box-shadow: 0 1px 3px rgba(0, 173, 181, 0.12);
}

.okd-is-upcoming {
	border-color: #d5def2;
}

/* An ended or not-yet-announced offer keeps its card by design and is simply
   quieter. It is never hidden: the page keeps the links it earned. */
.okd-is-expired,
.okd-is-pending {
	background: #fcfcfd;
}

.okd-deal-head {
	display: flex;
	align-items: flex-start;
	margin-bottom: 12px;
}

.okd-deal-logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
	margin-right: 12px;
	flex: 0 0 auto;
}

.okd-deal-title {
	flex: 1 1 auto;
	min-width: 0;
}

/* !important throughout the headings: the theme styles h2-h5 inside post
   content, and without these the vendor name inherits a 32px post heading and
   the card falls apart. */
.okd-deal-vendor {
	font-size: 21px !important;
	font-weight: 700 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: #1b2027 !important;
	line-height: 1.3 !important;
}

.okd-deal-meta {
	font-size: 14px;
	color: #7b828c;
	margin: 3px 0 0 !important;
}

.okd-flag {
	flex: 0 0 auto;
	margin-left: 10px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	padding: 3px 8px;
	border-radius: 3px;
	white-space: nowrap;
}

.okd-live     { background: #e3f6f7; color: #06767c; }
.okd-upcoming { background: #eef2fb; color: #3f5ba8; }
.okd-expired  { background: #f1f2f4; color: #6b7280; }
.okd-pending  { background: #f7f3e8; color: #8a7640; }

.okd-deal-headline {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 10px !important;
	color: #1b2027;
}

.okd-muted {
	font-weight: 400;
	color: #6b7280;
}

/* The vendor's banner. Full card width, own aspect ratio kept: these arrive at
   whatever size the vendor exported, usually 1200x628, and forcing a height
   would letterbox or crop somebody's artwork. */
.okd-deal-banner {
	margin: 0 0 12px;
}

.okd-deal-banner img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.okd-deal-blurb {
	font-size: 16px;
	color: #4b5563;
	margin-bottom: 12px;
}

.okd-deal-blurb p,
.okd-deal-terms p {
	margin: 0 0 8px !important;
}

.okd-deal-blurb p:last-child,
.okd-deal-terms p:last-child {
	margin-bottom: 0 !important;
}

.okd-deal-terms {
	font-size: 16px;
	margin: 0 0 12px;
	border-top: 1px solid #eef1f3;
	padding-top: 10px;
}

.okd-deal-terms summary {
	cursor: pointer;
	font-weight: 600;
	color: #0b8e95;
	font-size: 15px;
}

/* Pushes the facts and the button down, so cards of different text lengths
   still line their buttons up across a row. */
.okd-deal-foot {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid #eef1f3;
}

.okd-deal-facts {
	font-size: 14px;
	color: #6b7280;
	margin-bottom: 11px;
}

.okd-deal-facts span {
	display: inline-block;
	margin-right: 12px;
}

.okd-dates {
	color: #06767c;
	font-weight: 600;
}

.okd-code code {
	background: #f1f4f5;
	border: 1px dashed #c3cbd2;
	border-radius: 3px;
	padding: 1px 6px;
	font-size: 14px;
	color: #1b2027;
}

/* The last-checked line is the point of the whole system, so it is legible
   rather than fine print, and it changes colour once it is out of date. */
.okd-verified {
	color: #4b5563;
}

.okd-verified.okd-stale {
	color: #a3690f;
}

.okd-deal-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.okd-btn {
	display: inline-block;
	background: #ff5722;
	color: #fff !important;
	font-weight: 600;
	font-size: 16px;
	padding: 9px 18px;
	border-radius: 4px;
	text-decoration: none !important;
	margin-right: 14px;
}

.okd-btn:hover {
	background: #e94d1c;
	color: #fff !important;
}

.okd-btn-quiet {
	background: #eef1f3;
	color: #41474f !important;
}

.okd-btn-quiet:hover {
	background: #e2e6ea;
	color: #41474f !important;
}

.okd-link {
	font-size: 15px;
}

@media (max-width: 640px) {
	.okd-deal-grid {
		margin: 0;
	}

	.okd-deal {
		flex: 1 1 100%;
		max-width: 100%;
		margin: 0 0 14px;
	}

	.okd-btn {
		display: block;
		text-align: center;
		margin-right: 0;
		margin-bottom: 9px;
		width: 100%;
	}
}
