/**
 * Structural styles for the uno-lms/course-enroll block.
 *
 * Skin, colors, typography, and button visuals are owned by the theme via
 * block supports and the registered `is-style-uno-lms-enroll-action`
 * block style. This file only provides structural fallbacks (spacing,
 * feedback, hidden-wrapper safety).
 *
 * Two variants:
 *  - is-variant-player-denied  (rendered inside the course player slot)
 *  - is-variant-course-page-cta (rendered below course-authors)
 */

:where(.wp-block-uno-lms-course-enroll) {
	box-sizing: border-box;
}

.uno-lms-course-enroll {
	display: block;
	padding: var( --wp--preset--spacing--40, 16px );
}

.uno-lms-course-enroll[hidden] {
	display: none !important;
}

.uno-lms-course-enroll__feedback {
	margin-top: var( --wp--preset--spacing--30, 12px );
	font-size: var( --wp--preset--font-size--small, 0.95rem );
}

.uno-lms-course-enroll__feedback.is-error {
	color: #b32d2e;
}

.uno-lms-course-enroll.is-variant-player-denied {
	min-height: 160px;
}

.uno-lms-course-enroll.is-variant-course-page-cta {
	margin-top: var( --wp--preset--spacing--40, 16px );
}

/* Busy / submitting state on the styled enroll-action button. */
.wp-block-button__link.is-style-uno-lms-enroll-action[aria-busy="true"],
.wp-block-button__link.is-style-uno-lms-enroll-action[aria-disabled="true"] {
	opacity: 0.6;
	cursor: progress;
	pointer-events: none;
}

/* Editor-only preview affordance. */
.uno-lms-course-enroll-editor {
	padding: var( --wp--preset--spacing--40, 16px );
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	background: #f6f7f7;
}
