/* Urer Course Manager — scoped under .ucm-course, does not leak into theme styles. */

.ucm-course {
	--ucm-border: #d1d5db;
	--ucm-bg: #ffffff;
	--ucm-bg-hover: #f3f4f6;
	--ucm-text: #1f2937;
	--ucm-muted: #6b7280;
	--ucm-accent: #4f46e5;
	--ucm-locked: #9ca3af;

	max-width: 100%;
	margin: 0 0 1.5em;
	color: var(--ucm-text);
	font-size: 15px;
	line-height: 1.4;
}

/* Purchase bar */

.ucm-course__purchase {
	margin-bottom: 1em;
}

.ucm-course__buy {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 22px;
	border: 0;
	border-radius: 8px;
	background: var(--ucm-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

a.ucm-course__buy:hover,
a.ucm-course__buy:focus {
	background: #4338ca;
	color: #fff;
	text-decoration: none;
}

.ucm-course__buy--owned {
	background: #e5e7eb;
	color: #374151;
	cursor: default;
}

.ucm-course__buy--owned:disabled {
	opacity: 1;
}

.ucm-course__price {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	padding-right: 12px;
	border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.ucm-course__price del {
	opacity: 0.65;
	font-weight: 400;
	font-size: 0.85em;
}

.ucm-course__price ins {
	text-decoration: none;
}

@media (max-width: 480px) {
	.ucm-course__buy {
		display: flex;
		justify-content: center;
		width: 100%;
	}
}

/* Player */

.ucm-course__player {
	margin-bottom: 1em;
	border: 1px solid var(--ucm-border);
	border-radius: 8px;
	overflow: hidden;
	background: #000;
}

.ucm-course__player-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	background: var(--ucm-bg);
	border-bottom: 1px solid var(--ucm-border);
}

.ucm-course__player-title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ucm-course__player-close {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: var(--ucm-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.ucm-course__player-close:hover {
	color: var(--ucm-text);
}

.ucm-course__player-frame {
	position: relative;
	aspect-ratio: 16 / 9;
}

.ucm-course__player-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Notice */

.ucm-course__notice {
	margin: 0 0 1em;
	padding: 10px 14px;
	border: 1px solid #fbbf24;
	border-radius: 6px;
	background: #fffbeb;
	color: #92400e;
}

/* Lesson list */

.ucm-course__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ucm-border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--ucm-bg);
}

.ucm-lesson + .ucm-lesson {
	border-top: 1px solid var(--ucm-border);
}

.ucm-lesson__row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.ucm-lesson__row:hover {
	background: var(--ucm-bg-hover);
}

.ucm-lesson__row--active {
	background: var(--ucm-bg-hover);
	box-shadow: inset 3px 0 0 var(--ucm-accent);
}

.ucm-lesson__row--loading {
	opacity: 0.6;
	cursor: progress;
}

.ucm-lesson__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
}

.ucm-lesson--playable .ucm-lesson__icon {
	color: var(--ucm-accent);
	background: rgba(79, 70, 229, 0.1);
}

.ucm-lesson--locked .ucm-lesson__icon {
	color: var(--ucm-locked);
	background: rgba(156, 163, 175, 0.15);
}

.ucm-lesson--locked .ucm-lesson__title {
	color: var(--ucm-muted);
}

.ucm-lesson__body {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex-wrap: wrap;
}

.ucm-lesson__title {
	overflow-wrap: anywhere;
}

.ucm-lesson__badge {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(79, 70, 229, 0.1);
	color: var(--ucm-accent);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.ucm-lesson__duration {
	flex: 0 0 auto;
	color: var(--ucm-muted);
	font-variant-numeric: tabular-nums;
	font-size: 13px;
}

/* Per-lesson documents (only rendered for purchasers) */

.ucm-lesson__docs {
	list-style: none;
	margin: 0;
	padding: 0 16px 10px 56px;
}

.ucm-doc__row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	color: inherit;
	font-size: 14px;
	text-decoration: none;
}

a.ucm-doc__row:hover .ucm-doc__name,
a.ucm-doc__row:focus .ucm-doc__name {
	color: var(--ucm-accent);
	text-decoration: underline;
}

.ucm-doc__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: var(--ucm-accent);
	background: rgba(79, 70, 229, 0.1);
}

.ucm-doc__icon svg {
	width: 13px;
	height: 13px;
}

.ucm-doc__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.ucm-doc__meta {
	flex: 0 0 auto;
	color: var(--ucm-muted);
	font-size: 12px;
	white-space: nowrap;
}

/* My Account — "Kurslarım" tab */

.ucm-my-courses {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 16px;
}

.ucm-my-course {
	border: 1px solid #d1d5db;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.ucm-my-course__link {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	color: inherit;
	text-decoration: none;
}

.ucm-my-course__link:hover,
.ucm-my-course__link:focus {
	background: #f3f4f6;
	color: inherit;
	text-decoration: none;
}

.ucm-my-course__thumb {
	flex: 0 0 96px;
}

.ucm-my-course__thumb img {
	display: block;
	width: 96px;
	height: auto;
	border-radius: 6px;
}

.ucm-my-course__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ucm-my-course__title {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.ucm-my-course__cta {
	color: #4f46e5;
	font-size: 14px;
	font-weight: 600;
}

/* Admin-only configuration warning */

.ucm-course--warning p {
	margin: 0;
	padding: 10px 14px;
	border: 1px dashed #f87171;
	border-radius: 6px;
	background: #fef2f2;
	color: #991b1b;
}

/* Responsive */

@media (max-width: 480px) {
	.ucm-lesson__row {
		padding: 10px 12px;
		gap: 10px;
	}

	.ucm-lesson__docs {
		padding: 0 12px 8px 50px;
	}

	.ucm-course {
		font-size: 14px;
	}
}
