/**
 * Theme Name: LOYSEO Core
 * Theme URI: https://loyseo.com/
 * Description: A lightweight, block-first theme for LOYSEO. It progressively replaces Elementor theme templates while retaining WordPress-native editing workflows.
 * Version: 0.1.2
 * Requires at least: 6.9
 * Requires PHP: 7.4
 * Author: LOYSEO
 * Author URI: https://loyseo.com/
 * Text Domain: loyseo-core
 * License: GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

html,
body,
.wp-site-blocks {
	background-color: var(--wp--preset--color--surface-soft);
	color: var(--wp--preset--color--text-body);
	font-family: var(--wp--preset--font-family--site-sans);
	font-size: var(--wp--preset--font-size--body);
	font-weight: var(--wp--custom--typography--weight--regular);
	line-height: var(--wp--custom--typography--line-height--body);
}

:where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--text-heading);
	font-family: inherit;
	font-weight: var(--wp--custom--typography--weight--semibold);
}

h1 { font-size: var(--wp--custom--typography--heading-size--level-1); line-height: var(--wp--custom--typography--heading-line-height--level-1); }
h2 {
	padding:8px 20px;
	border: solid var(--wp--preset--color--brand-primary);
	border-width: 0 0 2px;
	border-radius: 8px 8px 0 0;
	background-color: var(--wp--preset--color--brand-primary-ultra-soft);
	font-size: var(--wp--custom--typography--heading-size--level-2);
	line-height: var(--wp--custom--typography--heading-line-height--level-2);
}
h3 { font-size: var(--wp--custom--typography--heading-size--level-3); line-height: var(--wp--custom--typography--heading-line-height--level-3); }
h4 { font-size: var(--wp--custom--typography--heading-size--level-4); line-height: var(--wp--custom--typography--heading-line-height--level-4); }
h5 { font-size: var(--wp--custom--typography--heading-size--level-5); line-height: var(--wp--custom--typography--heading-line-height--level-5); }
h6 { font-size: var(--wp--custom--typography--heading-size--level-6); line-height: var(--wp--custom--typography--heading-line-height--level-6); }

.loyseo-code-block {
	position: relative;
	margin-block: var(--wp--preset--spacing--50);
}

.loyseo-code-block .wp-block-code {
	box-sizing: border-box;
	margin: 0;
	padding: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: var(--wp--custom--radius--panel);
	background: var(--wp--preset--color--surface-code);
	overflow: auto;
}

.loyseo-code-block__copy {
	position: absolute;
	top: var(--wp--preset--spacing--20);
	right: var(--wp--preset--spacing--20);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0 var(--wp--preset--spacing--20);
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: var(--wp--custom--radius--compact);
	background: var(--wp--preset--color--surface-white);
	color: var(--wp--preset--color--text-body);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--typography--line-height--small);
	cursor: pointer;
	transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.loyseo-code-block__copy:hover,
.loyseo-code-block__copy:focus-visible {
	border-color: var(--wp--preset--color--brand-primary);
	color: var(--wp--preset--color--brand-primary);
	transform: translateY(-2px);
}

.loyseo-code-block__copy:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 2px;
}

.loyseo-code-block__clipboard-fallback {
	position: fixed;
	opacity: 0;
	pointer-events: none;
}

.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table {
	max-width: 100%;
	overflow-x: auto;
}

.entry-content table,
.wp-block-post-content table,
.wp-block-table table {
	width: 100%;
	margin-block: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-collapse: collapse;
	background: var(--wp--preset--color--surface-white);
	color: var(--wp--preset--color--text-body);
}

.entry-content :is(th, td),
.wp-block-post-content :is(th, td),
.wp-block-table :is(th, td) {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--border-subtle) !important;
	text-align: left;
	vertical-align: top;
}

.entry-content thead,
.wp-block-post-content thead,
.wp-block-table thead {
	background-color: var(--wp--preset--color--surface-soft) !important;
	border-bottom: 0 !important;
	color: var(--wp--preset--color--text-heading);
}

.wp-block-button .wp-block-button__link,
.wp-block-button .wp-element-button,
.wp-block-kadence-advancedbtn .kt-button,
.wp-block-kadence-advancedbtn .kb-button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	border: 0;
	border-radius: var(--wp--custom--radius--compact);
	background: var(--wp--preset--color--brand-primary) !important;
	color: var(--wp--preset--color--surface-white) !important;
	box-shadow: var(--wp--custom--shadow--inset-bottom-warm);
	font-family: var(--wp--preset--font-family--site-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--typography--weight--semibold);
	line-height: var(--wp--custom--typography--line-height--small);
	text-decoration: none;
	position: relative;
	overflow: hidden;
	transition: transform 180ms ease;
}

.wp-block-button .wp-block-button__link::after,
.wp-block-button .wp-element-button::after,
.wp-block-kadence-advancedbtn .kt-button::after,
.wp-block-kadence-advancedbtn .kb-button::after {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 28%;
	background: linear-gradient(105deg, transparent, var(--wp--preset--color--surface-white), transparent);
	content: "";
	opacity: 0;
	pointer-events: none;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible,
.wp-block-button .wp-element-button:hover,
.wp-block-button .wp-element-button:focus-visible,
.wp-block-kadence-advancedbtn .kt-button:hover,
.wp-block-kadence-advancedbtn .kt-button:focus-visible,
.wp-block-kadence-advancedbtn .kb-button:hover,
.wp-block-kadence-advancedbtn .kb-button:focus-visible {
	background: var(--wp--preset--color--brand-primary) !important;
	color: var(--wp--preset--color--surface-white) !important;
	text-decoration: none;
	transform: translateY(-2px);
}

.wp-block-button .wp-block-button__link:hover::after,
.wp-block-button .wp-block-button__link:focus-visible::after,
.wp-block-button .wp-element-button:hover::after,
.wp-block-button .wp-element-button:focus-visible::after,
.wp-block-kadence-advancedbtn .kt-button:hover::after,
.wp-block-kadence-advancedbtn .kt-button:focus-visible::after,
.wp-block-kadence-advancedbtn .kb-button:hover::after,
.wp-block-kadence-advancedbtn .kb-button:focus-visible::after {
	animation: loyseo-button-sheen 550ms ease;
}

.wp-block-button .wp-block-button__link:focus-visible,
.wp-block-button .wp-element-button:focus-visible,
.wp-block-kadence-advancedbtn .kt-button:focus-visible,
.wp-block-kadence-advancedbtn .kb-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 3px;
}

.loyseo-button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--brand-primary);
	border-radius: var(--wp--custom--radius--compact);
	background: var(--wp--preset--color--brand-primary);
	color: var(--wp--preset--color--surface-white) !important;
	box-shadow: var(--wp--custom--shadow--inset-bottom-warm);
	font-family: var(--wp--preset--font-family--site-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--typography--weight--semibold);
	line-height: var(--wp--custom--typography--line-height--small);
	text-decoration: none;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	transition: transform 180ms ease;
}

.loyseo-button--secondary {
	background: var(--wp--preset--color--surface-white);
	color: var(--wp--preset--color--brand-primary) !important;
	box-shadow: none;
}

.loyseo-button::after {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 28%;
	background: linear-gradient(105deg, transparent, var(--wp--preset--color--surface-white), transparent);
	content: "";
	opacity: 0;
	pointer-events: none;
}

.loyseo-button:hover,
.loyseo-button:focus-visible {
	color: var(--wp--preset--color--surface-white) !important;
	text-decoration: none;
	transform: translateY(-2px);
}

.loyseo-button--secondary:hover,
.loyseo-button--secondary:focus-visible {
	color: var(--wp--preset--color--brand-primary) !important;
}

.loyseo-button:hover::after,
.loyseo-button:focus-visible::after {
	animation: loyseo-button-sheen 550ms ease;
}

.loyseo-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 3px;
}

.loyseo-button:disabled {
	cursor: wait;
	opacity: 0.7;
}

@keyframes loyseo-button-sheen {
	from { left: -40%; opacity: 0; }
	25% { opacity: 0.45; }
	to { left: 112%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button .wp-block-button__link,
	.wp-block-button .wp-element-button,
	.wp-block-kadence-advancedbtn .kt-button,
	.wp-block-kadence-advancedbtn .kb-button {
		transition: none;
	}

	.loyseo-button {
		transition: none;
	}

	.wp-block-button .wp-block-button__link:hover,
	.wp-block-button .wp-block-button__link:focus-visible,
	.wp-block-button .wp-element-button:hover,
	.wp-block-button .wp-element-button:focus-visible,
	.wp-block-kadence-advancedbtn .kt-button:hover,
	.wp-block-kadence-advancedbtn .kt-button:focus-visible,
	.wp-block-kadence-advancedbtn .kb-button:hover,
	.wp-block-kadence-advancedbtn .kb-button:focus-visible {
		transform: none;
	}

	.wp-block-button .wp-block-button__link::after,
	.wp-block-button .wp-element-button::after,
	.wp-block-kadence-advancedbtn .kt-button::after,
	.wp-block-kadence-advancedbtn .kb-button::after {
		animation: none !important;
	}

	.loyseo-button::after {
		animation: none !important;
	}
}

/* Theme styles are managed through theme.json and component-level block styles. */
