/* EduFlow shared surfaces. Opt in by component, not by arbitrary Elementor layout. */
:root {
	--ef-surface-radius-sm: .75rem;
	--ef-surface-radius-control: .95rem;
	--ef-surface-radius-card: 1.25rem;
	--ef-surface-radius-section: 1.65rem;
	--ef-surface-depth: 0 2px 6px rgba(15, 23, 42, .05), 0 10px 24px rgba(15, 23, 42, .075);
	--ef-surface-depth-raised: 0 4px 10px rgba(15, 23, 42, .07), 0 15px 32px rgba(15, 23, 42, .13);
	--ef-surface-control-depth: 0 2px 5px rgba(15, 23, 42, .12);
	--ef-surface-focus: #694722;
	--ef-surface-focus-inner: #fff;
}

/* Panels have depth at rest, including phones and decorative/non-clickable surfaces. */
body :is(
	.ef-program-card, .ef-teacher-card, .ef-price-card, .ef-blog-card, .ef-feature-card,
	.ef-contact-item, .ef-demo-card, .ef-demo-panel, .ef-el-card, .ef-vcard,
	.ef-path-panel, .ef-outcomes__quote, .ef-final-cta__card, .ef-empty-state, .ef-404,
	.ef-dashboard-card, .ef-dashboard-preview, .ef-dashboard-summary, .ef-dashboard-error__card,
	.ef-dashboard-protected-preview, .ef-teacher-class, .ef-teacher-session, .ef-attendance-student,
	.ef-auth-card, .ef-auth-brand, .ef-public-class-card, .ef-placement-practice,
	.ef-public-post-card, .efa-course-v2, .efa-course-card, .efa-page-panel, .efa-float-card,
	.ef-native-library-card, .ef-native-library-panel
) {
	border-radius: var(--ef-surface-radius-card);
	box-shadow: var(--ef-surface-depth);
}

/* Elementor sets its own container radius variable (often 0). Override both
   the component radius and the container's inherited border/overlay radius. */
body .elementor .e-con:is(
	.ef-native-academy-card, .ef-native-academy-quote, .ef-native-academy-path-step,
	.ef-native-academy-hero-proof, .ef-native-academy-trust-item,
	.ef-native-library-card, .ef-native-library-panel, .ef-native-library-board,
	.ef-el-card, .ef-vcard, .ef-vquote
) {
	--border-radius: var(--ef-surface-radius-card);
	border-radius: var(--ef-surface-radius-card);
	box-shadow: var(--ef-surface-depth);
}
body .elementor .e-con:is(.ef-native-academy-card, .ef-native-academy-trust-item) {
	border: 1px solid var(--ef-token-border, #d5dce8);
}
body .elementor .e-con.ef-native-academy-trust-item {
	background: var(--ef-token-surface, #fff);
}
body .elementor .e-con.ef-native-academy-trust-shell {
	gap: .85rem;
	padding-block: 1rem;
}
body :is(.ef-page-intro, .ef-demo-cta, .ef-el-section, .ef-vhero, .ef-vsection, .ef-vteacher, .ef-vcta) {
	border-radius: var(--ef-surface-radius-section);
}
body .elementor .e-con:is(.ef-native-academy-cta-shell, .ef-native-library-cta, .ef-el-section, .ef-vhero, .ef-vsection, .ef-vteacher, .ef-vcta) {
	--border-radius: var(--ef-surface-radius-section);
	border-radius: var(--ef-surface-radius-section);
	box-shadow: var(--ef-surface-depth);
}
/* Full-width bands keep aligned edges; only the exposed lower corners curve. */
body .elementor .e-con:is(.ef-native-academy-hero, .ef-native-academy-page-hero) {
	border-end-start-radius: var(--ef-surface-radius-section);
	border-end-end-radius: var(--ef-surface-radius-section);
}
body .ef-native-academy-hero-image img { border-radius: var(--ef-surface-radius-section); }
body :is(.ef-blog-card__visual, .ef-program-card__art, .efa-course-cover, .ef-vcardart) {
	border-start-start-radius: var(--ef-surface-radius-card);
	border-start-end-radius: var(--ef-surface-radius-card);
}
body :is(.ef-attendance-alert, .ef-auth-alert, .ef-auth-note, .ef-dashboard-path__item, .ef-class-item, .ef-demo-list li, .ef-placement-form fieldset) {
	border-radius: var(--ef-surface-radius-sm);
}
body .ef-native-compact-header .ef-native-menu-panel { border-end-start-radius: var(--ef-surface-radius-card); border-end-end-radius: var(--ef-surface-radius-card); }
body :is(.ef-auth-form, .ef-search-form, .ef-dashboard-main, .ef-placement-form)
	:is(input:not([type]), input:is([type=text], [type=email], [type=password], [type=search], [type=number], [type=tel], [type=date]), select, textarea) {
	border-radius: var(--ef-surface-radius-control);
}

body :is(.ef-button, .ef-demo-button, .ef-vbutton, .ef-online-button, .ef-rus-button,
	.ef-auth-submit, .ef-dashboard-action, .ef-attendance-save, .ef-header-register,
	.ef-header-login, .ef-header-account, .ef-header-logout, .ef-mobile-account,
	.ef-public-action-link, .ef-menu-toggle, .ef-native-menu-button, .ef-placement-form button,
	.ef-search-form button, .wp-block-button__link) {
	border-radius: var(--ef-surface-radius-control);
	box-shadow: var(--ef-surface-control-depth);
}
body .elementor :is(
	.ef-native-academy-button-primary, .ef-native-academy-button-secondary, .ef-native-academy-card-button,
	.ef-native-academy-cta-button, .ef-native-library-button, .ef-el-button, .ef-vbutton
) .elementor-button {
	border-radius: var(--ef-surface-radius-control);
	box-shadow: var(--ef-surface-control-depth);
}
body :is(.ef-native-menu-panel, .ef-elementor-navigation, .ef-primary-navigation, .ef-mobile-navigation, .ef-dashboard-nav) a {
	border-radius: var(--ef-surface-radius-sm);
}

/* Keyboard parity. Contrast ring works against light and dark surfaces. */
body :is(
	.ef-site-header, .ef-elementor-layout, .ef-site-footer, .ef-demo-page, .ef-dashboard-main,
	.ef-dashboard-nav, .ef-dashboard-sidebar, .ef-auth-page, .ef-native-academy-section, .ef-native-academy-hero,
	.ef-native-academy-page-hero, .ef-native-academy-cta, .ef-native-library-page, .ef-page-standard
) :is(a[href], button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--ef-surface-focus);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--ef-surface-focus-inner);
}
body :is(.ef-native-academy-card, .ef-native-library-card, .ef-public-post-card, .ef-demo-card, .ef-program-card, .ef-blog-card, .ef-dashboard-card):has(:focus-visible) {
	box-shadow: var(--ef-surface-depth-raised);
}

@media (hover: hover) and (pointer: fine) {
	body :is(
		.ef-native-academy-card, .ef-native-library-card, .ef-public-class-card, .ef-public-post-card,
		.ef-demo-card, .ef-program-card, .ef-blog-card, .ef-teacher-card, .ef-price-card,
		.ef-vcard, .ef-el-card, .ef-dashboard-card, .ef-teacher-class, .efa-course-v2, .efa-course-card
	):has(:is(a[href], button:enabled)) {
		transition: box-shadow .18s ease, translate .18s ease;
	}
	body :is(
		.ef-native-academy-card, .ef-native-library-card, .ef-public-class-card, .ef-public-post-card,
		.ef-demo-card, .ef-program-card, .ef-blog-card, .ef-teacher-card, .ef-price-card,
		.ef-vcard, .ef-el-card, .ef-dashboard-card, .ef-teacher-class, .efa-course-v2, .efa-course-card
	):has(:is(a[href], button:enabled)):hover {
		box-shadow: var(--ef-surface-depth-raised);
		translate: 0 -3px;
	}
	body :is(.ef-button, .ef-demo-button, .ef-vbutton, .ef-online-button, .ef-rus-button,
		.ef-auth-submit, .ef-dashboard-action, .ef-attendance-save, .ef-header-register,
		.ef-public-action-link, .ef-menu-toggle, .ef-native-menu-button, .ef-placement-form button,
		.ef-search-form button, .wp-block-button__link):not(:disabled, [aria-disabled=true]):hover,
	body .elementor :is(
		.ef-native-academy-button-primary, .ef-native-academy-button-secondary,
		.ef-native-academy-card-button, .ef-native-academy-cta-button,
		.ef-native-library-button, .ef-el-button, .ef-vbutton
	) .elementor-button:not([aria-disabled=true]):hover {
		box-shadow: var(--ef-surface-depth-raised);
	}
	body :is(.ef-native-menu-panel, .ef-elementor-navigation, .ef-primary-navigation, .ef-mobile-navigation, .ef-dashboard-nav) a:not([aria-disabled=true]):hover {
		text-decoration: underline;
		text-underline-offset: .26em;
	}
}
/* No fake hover on touch; micro feedback does not move its hit box. */
body :is(.ef-button, .ef-demo-button, .ef-auth-submit, .ef-dashboard-action, .ef-native-menu-button, .ef-public-action-link, .wp-block-button__link):not(:disabled, [aria-disabled=true]):active,
body .elementor .elementor-widget-button .elementor-button:not([aria-disabled=true]):active {
	box-shadow: inset 0 2px 5px rgba(15, 23, 42, .22);
}
@media (prefers-reduced-motion: reduce) {
	body :is(.ef-native-academy-card, .ef-native-library-card, .ef-public-class-card, .ef-public-post-card,
		.ef-demo-card, .ef-program-card, .ef-blog-card, .ef-teacher-card, .ef-price-card,
		.ef-vcard, .ef-el-card, .ef-dashboard-card, .ef-teacher-class, .efa-course-v2, .efa-course-card) {
		transition: none !important;
		translate: none !important;
	}
}
@media (max-width: 479px) {
	:root { --ef-surface-radius-section: 1.35rem; --ef-surface-radius-card: 1.1rem; }
	body .elementor .e-con.ef-native-academy-trust-shell { gap: .65rem; }
}

/* Classic/public demo component families share the same tokens without
   changing their distinct colors, templates, ornament or navigation. */
body :is(.ef23-course, .ef23-quote, .ef-rus-course, .ef-rus-quote, .ef-online-course-art,
	.efa-detail-hero, .efa-home-quote, .ef-dashboard-preview__course) {
	border-radius: var(--ef-surface-radius-card);
	box-shadow: var(--ef-surface-depth);
}
body :is(.ef23-hero, .ef-rus-hero, .ef-online-hero, .efa-hero-v2) {
	border-end-start-radius: var(--ef-surface-radius-section);
	border-end-end-radius: var(--ef-surface-radius-section);
}
body :is(.ef-rus-cta, .ef-online-cta) > .ef-container {
	border-radius: var(--ef-surface-radius-section);
}
@media (hover: hover) and (pointer: fine) {
	body :is(.ef23-course, .ef-rus-course):has(:is(a[href], button:enabled)):hover {
		box-shadow: var(--ef-surface-depth-raised);
	}
}
