/*
 * Only the guest-only bits not covered by the native learnpress-course-review
 * "course-review" stylesheet (name/email fields, honeypot, submit message
 * states). Everything else (stars, rating summary, reviews list) reuses that
 * stylesheet's classes untouched so it matches the active theme automatically.
 */

.ocr-review-form-inline {
	position: static;
	width: 100%;
	max-width: 640px;
	box-shadow: none;
	margin: 1.5em 0;
}

.ocr-hint {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
	margin-top: 0.25em;
}

/* Honeypot: hidden from humans, still reachable by simple bots. */
.ocr-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ocr-form-message {
	margin-top: 0.75em;
	font-size: 0.95em;
}

.ocr-form-message.is-success {
	color: #1a7f37;
}

.ocr-form-message.is-error {
	color: #c0392b;
}

.ocr-verified-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	color: #fff;
	background: #1a7f37;
	border-radius: 50%;
	vertical-align: middle;
	margin-left: 0.25em;
	position: relative;
	top: -2px;
}

.ocr-verified-badge svg {
	width: 11px;
	height: 11px;
}

.ocr-no-reviews {
	opacity: 0.75;
}

/*
 * Visual clone of the theme's ".lp-button" look, under our own class name.
 * We deliberately avoid the shared "lp-button" class: on this site a Popup
 * Maker popup is configured to open on ANY click on ".lp-button" anywhere on
 * the page (its "extra_selectors" trigger setting), which hijacked our
 * submit button. Using our own class keeps the identical look without
 * matching that trigger.
 */
.ocr-lp-button {
	border-radius: 5px;
	display: inline-block;
	height: 60px;
	line-height: 62px;
	color: var( --edublink-color-white, #fff );
	background: var( --edublink-color-primary, #1a1a1a );
	padding: 0 30px;
	font-size: 15px;
	font-weight: 500;
	transition: 0.4s;
	border: 0 none;
	cursor: pointer;
}

.ocr-lp-button:hover {
	background: var( --edublink-color-primary-alt, #333 );
}

/* Avatar picker (initials / custom photo) */
.ocr-avatar-picker {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
}

/*
 * Absolute-position centering on purpose (not flex + text-align): the native
 * course-review.css ships broad selectors like
 * ".review-form .review-fields input[type=text]" that out-specificity our
 * own rules since our fields live inside the same ".review-fields" list.
 * Centering the letter by pinning it to the exact middle, rather than relying
 * on flex/line-height metrics that a colliding rule could perturb, is
 * unaffected by that.
 */
.ocr-avatar-preview {
	position: relative;
	width: 64px;
	height: 64px;
	min-width: 64px;
	border-radius: 50%;
	background: #b06f22;
	overflow: hidden;
	flex-shrink: 0;
}

.ocr-avatar-letter {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	color: #fff;
	font-family: Georgia, serif;
	font-size: 24px;
	line-height: 1;
	white-space: nowrap;
}

.ocr-avatar-preview-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ocr-avatar-controls {
	flex: 1;
	min-width: 200px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ocr-avatar-swatches-label {
	margin-bottom: 0;
}

.ocr-avatar-swatches {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ocr-avatar-swatch {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	padding: 0;
}

.ocr-avatar-swatch.is-active {
	border-color: var( --edublink-color-ink, #223028 );
	box-shadow: 0 0 0 2px rgba( 43, 33, 24, 0.35 ) inset;
}

.ocr-avatar-upload-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ocr-upload-btn {
	display: inline-block;
	font-size: 0.85em;
	font-weight: 600;
	padding: 8px 14px;
	border: 1px solid #d5d9c8;
	border-radius: 5px;
	cursor: pointer;
	background: #fff;
}

.ocr-upload-btn input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.ocr-avatar-remove-upload {
	font-size: 0.85em;
	background: none;
	border: none;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	color: #5c6b60;
}

/* Colored-letter avatar rendered in the approved reviews list */
.review-author svg {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 50%;
}

/*
 * Set by class-ocr-rating-bridge.php's hide-empty-ratings script: hides the
 * "|" separator theme's ".eb-course-header-meta-items > li:after" draws
 * after the item before a hidden empty-rating one in the course header.
 */
.eb-course-header-meta-items > li.ocr-hide-separator:after {
	display: none;
}
