/*
 * Offer page (single-offer.php) and the offers list (archive-offer.php).
 *
 * The offer page is laid out by assets/css/seminar-detail.css; these are the
 * offer's own touches on top: the price, the badge on the photo, the status
 * colours, the gradient button and the ended note. Then the list's cards.
 * Plain CSS, outside the frozen Tailwind build.
 */

/* Rose for the card flag: sale-coloured, and white text on it clears AA. */
.od {
	--sd-accent: #E11D48;
	--sd-accent-dark: #BE123C;
}

/* ----- Status ----- */

.od-status.is-scheduled {
	background: rgb(245 158 11 / 0.15);
	color: #FCD34D;
}

.od-status.is-scheduled .sd-status__dot {
	background: #FBBF24;
}

.od-status.is-ended {
	background: rgb(225 29 72 / 0.15);
	color: #FDA4AF;
}

.od-status.is-ended .sd-status__dot {
	background: #FB7185;
}

.od-flag.is-running {
	background: #059669;
}

.od-flag.is-scheduled {
	background: #B45309;
}

/* ----- Price ----- */

.od-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 0.9rem;
	margin: 1.5rem 0 0;
}

.od-price strong {
	color: #FFFFFF;
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.od-price del {
	color: #94A3B8;
	font-size: 1.15rem;
	font-weight: 600;
}

.od-price__save {
	align-self: center;
	padding: 0.3rem 0.75rem;
	border-radius: 9999px;
	background: rgb(225 29 72 / 0.2);
	color: #FDA4AF;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.od-ticket__old {
	display: block;
	margin-top: 0.15rem;
	color: #94A3B8;
	font-size: 0.95rem;
	font-weight: 600;
}

.sd-rows del {
	color: #64748B;
	font-weight: 600;
}

.sd-rows .od-rows__save {
	color: #E11D48;
}

/* ----- Badge on the photo and on the cards ----- */

.od-badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 1;
	padding: 0.45rem 1rem;
	border-radius: 9999px;
	background: #F59E0B;
	box-shadow: 0 12px 24px -12px rgb(0 0 0 / 0.6);
	color: #0F172A;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.3;
}

/* ----- Button: the site's gradient, white label ----- */

.sd-btn.od-btn,
.sd-btn.od-btn:visited,
.sd-btn.od-btn:hover,
.sd-btn.od-btn:focus-visible {
	color: #FFFFFF;
}

.sd-btn.od-btn:focus-visible {
	outline: 2px solid #22D3EE;
	outline-offset: 3px;
}

/* ----- Ended note ----- */

.od-note {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	max-width: 40rem;
	margin: 1.5rem 0 0;
	padding: 0.9rem 1rem;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 0.9rem;
	background: rgb(255 255 255 / 0.06);
	color: #CBD5E1;
	font-size: 0.95rem;
	line-height: 1.6;
}

.od-note .material-symbols-outlined {
	color: #FDA4AF;
	font-size: 1.25rem;
}

/* ---------------------------------------------------------------------------
 * Offers list
 * ------------------------------------------------------------------------ */

.od-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.od-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.od-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2rem;
	}
}

.od-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #E2E8F0;
	border-radius: 1.25rem;
	background: #FFFFFF;
	box-shadow: 0 18px 40px -30px rgb(15 23 42 / 0.4);
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.od-card:hover {
	border-color: #C7D2FE;
	box-shadow: 0 24px 48px -28px rgb(79 70 229 / 0.45);
	transform: translateY(-3px);
}

.od-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #0F172A;
}

.od-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.od-card:hover .od-card__img {
	transform: scale(1.04);
}

.od-card__ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #FBBF24;
	font-size: 3.5rem;
}

.od-card__soon {
	position: absolute;
	top: 1rem;
	right: 1rem;
	padding: 0.35rem 0.85rem;
	border: 1px solid rgb(255 255 255 / 0.25);
	border-radius: 9999px;
	background: rgb(15 23 42 / 0.65);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #FFFFFF;
	font-size: 0.75rem;
	font-weight: 700;
}

.od-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 1.25rem 1.25rem 1.4rem;
}

.od-card__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.od-card__title a {
	color: #0F172A;
	text-decoration: none;
}

.od-card__title a:hover {
	color: #4F46E5;
}

.od-card__text {
	margin: 0.5rem 0 0;
	color: #475569;
	font-size: 0.92rem;
	line-height: 1.6;
}

.od-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.6rem;
	margin: 0.9rem 0 0;
}

.od-card__price strong {
	color: #4F46E5;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.1;
}

.od-card__price del {
	color: #64748B;
	font-size: 0.95rem;
	font-weight: 600;
}

.od-card__date {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.75rem 0 0;
	color: #64748B;
	font-size: 0.82rem;
	font-weight: 600;
}

.od-card__date .material-symbols-outlined {
	color: #E11D48;
	font-size: 1.1rem;
}

.od-card__btn {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 0.35rem;
	margin-top: auto;
	padding-top: 1.1rem;
	color: #4F46E5;
	font-size: 0.92rem;
	font-weight: 800;
	text-decoration: none;
}

.od-card__btn .material-symbols-outlined {
	font-size: 1.15rem;
	transition: transform 0.25s ease;
}

.od-card__btn:hover .material-symbols-outlined {
	transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
	.od-card,
	.od-card__img,
	.od-card__btn .material-symbols-outlined {
		transition: none;
	}

	.od-card:hover,
	.od-card:hover .od-card__img,
	.od-card__btn:hover .material-symbols-outlined {
		transform: none;
	}
}
