/**
 * Self Study Courses Listing overrides.
 *
 * @package HTA\LiveEvent\Public\Components\SelfStudyCourses
 */

.hta-ssc-listing {
	padding-top: 0;
}

/* Hide slider sections when grid is set as default layout */
.hta-ssc-listing .hta-ssc-type-layout--hidden-default {
	display: none;
}

.hta-ssc-listing .hta-workshop-card--no-media .hta-workshop-card__post-type-row {
	padding-top: 16px;
}

.hta-ssc-listing .hta-workshop-card--no-media .hta-workshop-card__title {
	margin-top: 8px;
}

.hta-ssc-listing .hta-workshop-card--no-media .hta-workshop-card__post-type {
	color: #4A5568;
}

/* Ensure 5 filter columns in same row for SSC filters */
#hta-ssc-filter-row {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
	margin-bottom: 20px;
}

@media (max-width: 1200px) {
	#hta-ssc-filter-row {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	#hta-ssc-filter-row {
		grid-template-columns: 1fr;
	}
}

.hta-ssc-coming-soon-wrapper {
	margin-top: 48px;
	padding: 20px;
	background: #FFFFFF;
	border: 1px solid #D9D9D9;
	border-radius: 14px;
	position: relative;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.hta-ssc-coming-soon-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.hta-ssc-coming-soon-nav {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.hta-ssc-coming-soon-nav button {
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hta-ssc-coming-soon-nav button img {
	width: 28px;
	height: 28px;
	max-width: 28px;
	max-height: 28px;
	object-fit: contain;
	display: block;
}

.hta-ssc-coming-soon-carousel {
	position: relative;
	min-height: 0;
	width: 100%;
	max-width: 100%;
}

.hta-ssc-coming-soon-slide {
	display: block;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	pointer-events: none;
}

.hta-ssc-coming-soon-slide.active {
	opacity: 1;
	visibility: visible;
	position: relative;
	pointer-events: auto;
}

.hta-ssc-coming-soon-slide.is-hidden {
	display: none !important;
	opacity: 0;
	visibility: hidden;
}

.hta-ssc-coming-soon-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.hta-ssc-coming-soon-card {
	display: flex;
	gap: 20px;
	align-items: stretch;
	text-decoration: none;
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 20px;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	color: inherit;
	min-height: 180px;
}

.hta-ssc-coming-soon-card:hover {
	box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
	transform: translateY(-4px);
}

.hta-ssc-coming-soon-card.is-hidden {
	display: none !important;
}

.hta-ssc-coming-soon-card__media {
	max-width: fit-content;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hta-ssc-coming-soon-card__media img {
	width: 100%;
	height: auto;
	display: block;
	vertical-align: top;
	align-self: center;
	object-fit: cover;
	object-position: center;
}

.hta-ssc-coming-soon-card__media-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 156px;
	padding: 16px;
	color: #334155;
	font-weight: 600;
	text-align: center;
}

.hta-ssc-coming-soon-card__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	justify-content: center;
}

.hta-ssc-coming-soon-card__meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.hta-ssc-coming-soon-card__status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 110px;
	height: 28px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
	box-sizing: border-box;
	line-height: 28px;
	text-align: center;
}

.hta-ssc-coming-soon-card__status--coming-soon {
	background-color: #3b82f6;
	color: #FFFFFF;
}

.hta-ssc-coming-soon-card__status--waitlist {
	background: #e0e7ff;
	color: #3730a3;
}

.hta-ssc-coming-soon-card__status--upcoming {
	background: #dcfce7;
	color: #166534;
}

.hta-ssc-coming-soon-card__language {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #0f172a;
	font-weight: 600;
}

.hta-ssc-coming-soon-card__language-flag {
	width: 28px;
	height: 20px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid rgba(15, 23, 42, 0.1);
}

.hta-ssc-coming-soon-card__language-code {
	font-size: 14px;
	text-transform: uppercase;
}

.hta-ssc-coming-soon-card__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.35;
	color: #0f172a;
}

.hta-ssc-coming-soon-card__message {
	margin: 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.6;
}

.hta-ssc-coming-soon-empty {
	display: none;
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #fef3c7;
	color: #92400e;
	font-weight: 600;
}

.hta-ssc-coming-soon-empty.is-visible {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hta-ssc-type-results.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.hta-ssc-type-layout {
	display: flex;
	flex-direction: column;
	gap: 40px;
	margin-top: 48px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* Default layout for sections (no filters) - no background, no border */
.hta-ssc-section {
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	width: 100%;
	max-width: 100%;
}

/* Unified grid layout (when filters are applied) */
.hta-ssc-unified-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin-top: 48px;
	margin-bottom: 36px;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.hta-ssc-unified-grid > * {
	height: 100%; /* Cards stretch to fill grid cell */
}

.hta-ssc-section--empty {
	opacity: 0.88;
}

.hta-ssc-section--empty .hta-live-courses-nav {
	display: none;
}

.hta-ssc-section__carousel {
	position: relative;
	min-height: 0;
}

.hta-ssc-section__page {
	display: block;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	pointer-events: none;
}

.hta-ssc-section__page.active {
	opacity: 1;
	visibility: visible;
	position: relative;
	pointer-events: auto;
}

/* Course page grid - boxed layout */
.hta-ssc-section .hta-course-page__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.hta-ssc-section .hta-course-page__grid > * {
	height: 100%; /* Cards stretch to fill grid cell */
}

.hta-ssc-section__empty {
	padding: 20px;
	background: #f8fafc;
	border: 1px dashed #cbd5f5;
	border-radius: 16px;
	text-align: center;
	color: #475569;
	font-weight: 600;
}

/* === SSC My Courses Page (my-courses Next.js inspired layout) === */

.hta-ssc-my-courses-page {
	min-height: 100vh;
	background: #f9fafb;
}

.hta-ssc-my-courses-page .container {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.hta-ssc-my-courses-page__hero {
	position: sticky;
	top: 0;
	z-index: 10;
	background: #f6c15b;
	border-bottom: 1px solid #e5b04d;
}

.hta-ssc-my-courses-page__hero-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}

.hta-ssc-my-courses-page__brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hta-ssc-my-courses-page__brand-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: #e74c3c;
	color: #ffffff;
	font-weight: 700;
	font-size: 14px;
}

.hta-ssc-my-courses-page__brand-name {
	font-weight: 600;
	color: #1f2933;
	font-size: 14px;
	letter-spacing: 0.02em;
}

.hta-ssc-my-courses-page__content {
	padding-top: 32px;
	padding-bottom: 40px;
}

.hta-ssc-my-courses-page__layout {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.hta-ssc-my-courses-page__list {
	flex: 1 1 auto;
	max-width: 720px;
}

.hta-ssc-my-courses-page__detail {
	width: 480px;
	flex-shrink: 0;
	position: relative;
	align-self: flex-start;
}

.hta-ssc-my-courses-page__list-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.hta-ssc-my-courses-page__list-header h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #111827;
}

.hta-ssc-my-courses-page__cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hta-ssc-my-courses-page__card {
	display: flex;
	flex-direction: column;
	border-radius: 16px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	padding: 16px 18px 14px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hta-ssc-my-courses-page__card.is-selected {
	border-color: #f6c15b;
	box-shadow: 0 0 0 1px #f6c15b, 0 8px 20px rgba(15, 23, 42, 0.08);
}

.hta-ssc-my-courses-page__card-main {
	display: flex;
	gap: 16px;
	text-decoration: none;
	color: inherit;
}

.hta-ssc-my-courses-page__card-media {
	flex: 0 0 52px;
	height: 52px;
	border-radius: 12px;
	overflow: hidden;
	background: #0d9488;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hta-ssc-my-courses-page__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hta-ssc-my-courses-page__card-media-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #e5f9f7;
	font-weight: 600;
	font-size: 13px;
}

.hta-ssc-my-courses-page__play-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #0d9488;
}

.hta-ssc-my-courses-page__play-icon-svg {
	width: 24px;
	height: 24px;
	color: #ffffff;
	fill: #ffffff;
}

.hta-ssc-my-courses-page__card-body {
	flex: 1;
	min-width: 0;
}

.hta-ssc-my-courses-page__card-title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
	color: #111827;
}

.hta-ssc-my-courses-page__card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-bottom: 8px;
	font-size: 13px;
}

.hta-ssc-my-courses-page__meta-label {
	color: #6b7280;
}

.hta-ssc-my-courses-page__meta-value {
	color: #111827;
	font-weight: 500;
}

.hta-ssc-my-courses-page__status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hta-ssc-my-courses-page__status--not-started {
	background: #f3f4f6;
	color: #4b5563;
}

.hta-ssc-my-courses-page__status--in-progress {
	background: #fff7ed;
	color: #ea580c;
}

.hta-ssc-my-courses-page__status--completed {
	background: #ecfdf3;
	color: #16a34a;
}

.hta-ssc-my-courses-page__card-description {
	margin: 0 0 10px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.5;
}

.hta-ssc-my-courses-page__progress {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hta-ssc-my-courses-page__progress-bar {
	flex: 1;
	height: 6px;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: hidden;
}

.hta-ssc-my-courses-page__progress-fill {
	height: 100%;
	background: #F0C064;
}

.hta-ssc-my-courses-page__progress-label {
	font-size: 12px;
	color: #4b5563;
	min-width: 80px;
	text-align: right;
}

.hta-ssc-my-courses-page__card-actions {
	margin-top: 10px;
	display: flex;
	justify-content: flex-end;
}

.hta-ssc-my-courses-page__primary-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 14px;
	border-radius: 4px;
	background: #F0C064;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.hta-ssc-my-courses-page__primary-btn:hover {
	background: #e5b557;
	box-shadow: 0 6px 14px rgba(240, 192, 100, 0.35);
	transform: translateY(-1px);
}

.hta-ssc-my-courses-page__primary-btn--full {
	width: 100%;
	justify-content: center;
}

.hta-ssc-my-courses-page__detail-card {
	border-radius: 16px;
	border: 1px solid #dbeafe;
	background: #eff6ff;
	overflow: hidden;
}

.hta-ssc-my-courses-page__detail-media img {
	display: block;
	width: 100%;
	height: auto;
}

.hta-ssc-my-courses-page__detail-body {
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hta-ssc-my-courses-page__detail-row {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 8px;
	font-size: 13px;
}

.hta-ssc-my-courses-page__detail-title {
	margin: 6px 0 4px;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.hta-ssc-my-courses-page__detail-description {
	font-size: 13px;
	color: #334155;
	line-height: 1.6;
}

.hta-ssc-my-courses-page__detail-progress {
	margin-top: 4px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.hta-ssc-my-courses-page__progress-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
}

.hta-ssc-my-courses-page__detail-actions {
	margin-top: 10px;
}

.hta-ssc-my-courses-page__empty-card,
.hta-ssc-my-courses-page__detail-card--empty {
	border-radius: 16px;
	border: 1px dashed #cbd5f5;
	background: #f9fafb;
	padding: 24px 20px;
	text-align: center;
}

.hta-ssc-my-courses-page__empty-card h1,
.hta-ssc-my-courses-page__empty-card h2,
.hta-ssc-my-courses-page__detail-card--empty h2 {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.hta-ssc-my-courses-page__empty-card p,
.hta-ssc-my-courses-page__detail-card--empty p {
	margin: 0 0 16px;
	font-size: 14px;
	color: #6b7280;
}

.hta-ssc-my-courses-page__empty-icon {
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background: #f3f4ff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 10px;
	color: #a5b4fc;
	font-size: 22px;
}

.hta-ssc-my-courses-page--guest .hta-ssc-my-courses-page__content {
	display: flex;
	justify-content: center;
}

@media (max-width: 1024px) {
	.hta-ssc-my-courses-page__layout {
		flex-direction: column;
	}

	.hta-ssc-my-courses-page__detail {
		width: 100%;
		position: static;
	}
}

@media (max-width: 640px) {
	.hta-ssc-my-courses-page .container {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.hta-ssc-my-courses-page__card-main {
		align-items: flex-start;
	}

	.hta-ssc-my-courses-page__detail-body {
		padding: 16px 16px 18px;
	}
}

@media (max-width: 968px) {
	.hta-ssc-unified-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hta-ssc-section .hta-course-page__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.hta-ssc-unified-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.hta-ssc-section .hta-course-page__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

@media (max-width: 1024px) {
	.hta-ssc-coming-soon-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.hta-ssc-coming-soon-wrapper {
		padding: 24px 20px;
	}

	.hta-ssc-coming-soon-card {
		flex-direction: column;
		gap: 16px;
	}

	.hta-ssc-coming-soon-card__media {
		flex: 0 0 180px;
		width: 100%;
		max-width: 100%;
		align-self: center;
	}
	.hta-ssc-coming-soon-card__media-placeholder {
		min-height: 180px;
	}

	.hta-ssc-coming-soon-card__meta-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.hta-ssc-coming-soon-nav {
		gap: 8px;
	}
}
