/* Course ratings & reviews section. */

.ldh-rv {
	max-width: 860px;
	margin: 48px auto;
	padding: 0 16px;
	font-size: 15px;
	line-height: 1.6;
	color: #1f2937;
	/* #ldh-reviews anchor jumps land below the course page's fixed top bar. */
	scroll-margin-top: 110px;
}

.ldh-rv-heading {
	font-size: 26px;
	font-weight: 800;
	margin: 0 0 20px;
	color: #111827;
}

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

.ldh-rv-notice {
	border-radius: 10px;
	padding: 12px 16px;
	margin: 0 0 20px;
	font-weight: 600;
}

.ldh-rv-notice.is-ok {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.ldh-rv-notice.is-err {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

/* Summary -------------------------------------------------------------- */

.ldh-rv-summary {
	display: flex;
	gap: 32px;
	align-items: center;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 24px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.ldh-rv-score {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 130px;
}

.ldh-rv-avg {
	font-size: 52px;
	font-weight: 800;
	line-height: 1;
	color: #b45309;
}

.ldh-rv-count {
	color: #6b7280;
	font-size: 13px;
}

.ldh-rv-bars {
	flex: 1;
	min-width: 240px;
}

.ldh-rv-bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 4px 0;
}

.ldh-rv-bar-label {
	width: 38px;
	font-size: 13px;
	color: #6b7280;
	white-space: nowrap;
}

.ldh-rv-bar {
	flex: 1;
	height: 8px;
	background: #e5e7eb;
	border-radius: 99px;
	overflow: hidden;
}

.ldh-rv-bar > span {
	display: block;
	height: 100%;
	background: #eecc00;
	border-radius: 99px;
}

.ldh-rv-bar-pct {
	width: 40px;
	font-size: 12px;
	color: #6b7280;
	text-align: right;
}

/* Fractional star bar --------------------------------------------------- */

.ldh-rv-stars {
	position: relative;
	display: inline-block;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 2px;
	vertical-align: middle;
}

.ldh-rv-stars-bg {
	color: #d1d5db;
}

.ldh-rv-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #eecc00;
}

/* Prompts ---------------------------------------------------------------- */

.ldh-rv-none,
.ldh-rv-prompt {
	color: #6b7280;
	margin: 0 0 20px;
}

.ldh-rv-prompt a {
	font-weight: 700;
}

/* Write/edit form -------------------------------------------------------- */

.ldh-rv-form-wrap {
	margin: 0 0 28px;
}

.ldh-rv-open {
	display: inline-block;
	cursor: pointer;
	list-style: none;
	background: #111827;
	color: #fff;
	font-weight: 700;
	padding: 10px 22px;
	border-radius: 10px;
	user-select: none;
}

.ldh-rv-open::-webkit-details-marker {
	display: none;
}

.ldh-rv-form-wrap[open] .ldh-rv-open {
	background: #374151;
}

.ldh-rv-form {
	margin-top: 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(17, 24, 39, 0.04);
}

.ldh-rv-rate {
	border: 0;
	padding: 0;
	margin: 0 0 14px;
}

.ldh-rv-rate legend {
	font-weight: 700;
	margin-bottom: 6px;
	padding: 0;
}

/* Radio stars: rendered 5→1 and flipped back with row-reverse so
   "this one and all before it" highlights on hover/checked. */
.ldh-rv-rate-stars {
	display: inline-flex;
	flex-direction: row-reverse;
}

.ldh-rv-rate-stars input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ldh-rv-rate-stars label {
	font-size: 34px;
	line-height: 1;
	color: #d1d5db;
	cursor: pointer;
	padding: 0 3px;
	transition: color 0.12s ease, transform 0.12s ease;
}

.ldh-rv-rate-stars label:hover,
.ldh-rv-rate-stars label:hover ~ label,
.ldh-rv-rate-stars input:checked ~ label {
	color: #eecc00;
}

.ldh-rv-rate-stars label:hover {
	transform: scale(1.12);
}

.ldh-rv-rate-stars input:focus-visible + label {
	outline: 2px solid #0045aa;
	outline-offset: 2px;
	border-radius: 4px;
}

.ldh-rv-field {
	margin: 0 0 14px;
}

.ldh-rv-field label {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

.ldh-rv-field input[type="text"],
.ldh-rv-field textarea {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	background: #fff;
	box-sizing: border-box;
}

.ldh-rv-field input[type="text"]:focus,
.ldh-rv-field textarea:focus {
	border-color: #0045aa;
	outline: 2px solid rgba(0, 69, 170, 0.2);
}

.ldh-rv-photo-field input[type="file"] {
	display: block;
	width: 100%;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	background: #f9fafb;
	box-sizing: border-box;
	cursor: pointer;
}

.ldh-rv-photo-current {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 10px;
}

.ldh-rv-field .ldh-rv-photo-remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
	font-size: 13px;
	color: #6b7280;
	cursor: pointer;
}

.ldh-rv-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #9ca3af;
}

.ldh-rv-actions {
	margin: 0;
}

.ldh-rv-submit {
	background: #0045aa;
	color: #fff;
	border: 0;
	border-radius: 10px;
	font-weight: 800;
	font-size: 15px;
	padding: 12px 26px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ldh-rv-submit:hover {
	background: #003a8f;
}

/* Review list ------------------------------------------------------------ */

.ldh-rv-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ldh-rv-item {
	border-top: 1px solid #e5e7eb;
	padding: 20px 0;
	margin: 0;
}

.ldh-rv-item-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.ldh-rv-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ldh-rv-author {
	display: block;
	font-weight: 700;
	color: #111827;
}

.ldh-rv-meta {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ldh-rv-meta time {
	color: #9ca3af;
	font-size: 13px;
}

.ldh-rv-title {
	font-weight: 700;
	margin: 0 0 6px;
	color: #111827;
}

.ldh-rv-text {
	color: #374151;
}

.ldh-rv-text p {
	margin: 0 0 8px;
}

/* Pagination -------------------------------------------------------------- */

.ldh-rv-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 18px 0 0;
	border-top: 1px solid #e5e7eb;
}

.ldh-rv-pager a {
	font-weight: 700;
	text-decoration: none;
}

.ldh-rv-pager span {
	color: #6b7280;
	font-size: 13px;
}

@media (max-width: 600px) {
	.ldh-rv-summary {
		flex-direction: column;
		gap: 18px;
	}
}
