/*
Theme Name: Multicalculadora
Description: Child theme for Twenty Twenty-Five.
Template: twentytwentyfive
Version: 1.0.0
Text Domain: multicalculadora
Requires at least: 6.7
Requires PHP: 7.4
*/

/**
 * Global controls
 *
 * Keep component-specific styling in separate layers as the theme grows.
 */

label {
	display: block;
	margin-block-end: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--text);
	font-weight: 600;
	line-height: 1.4;
}

:where(
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="month"],
	input[type="week"],
	select,
	textarea
) {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--controls);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
	font-size: max(1rem, 16px);
	line-height: 1.5;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
	min-height: 128px;
	resize: vertical;
}

:where(input, textarea)::placeholder {
	color: var(--wp--preset--color--text-secondary);
	opacity: 0.8;
}

:where(
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="month"],
	input[type="week"],
	select,
	textarea
):hover {
	border-color: var(--wp--preset--color--text-secondary);
}

:where(input, select, textarea):focus-visible {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	box-shadow: 0 0 0 3px var(--wp--preset--color--primary-soft);
}

:where(input, select, textarea)[aria-invalid="true"] {
	border-color: var(--wp--preset--color--error);
}

:where(input, select, textarea)[aria-invalid="true"]:focus-visible {
	outline-color: var(--wp--preset--color--error);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--error) 14%, transparent);
}

:where(.form-error, .field-error, [data-field-error]) {
	margin-block-start: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--error);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

:where(
	.wp-element-button,
	.wp-block-button__link,
	button:not([class*="wp-block-navigation"]),
	input[type="submit"],
	input[type="button"]
) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--controls);
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	font: inherit;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

:where(
	.wp-element-button,
	.wp-block-button__link,
	button:not([class*="wp-block-navigation"]),
	input[type="submit"],
	input[type="button"]
):hover {
	background-color: var(--wp--preset--color--primary-hover);
	color: var(--wp--preset--color--surface);
}

:where(
	.wp-element-button,
	.wp-block-button__link,
	button,
	input[type="submit"],
	input[type="button"]
):focus-visible,
a:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

.wp-block-button.is-style-outline > :where(.wp-block-button__link, .wp-element-button),
:where(.button-secondary, [data-variant="secondary"]) {
	border-color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline > :where(.wp-block-button__link, .wp-element-button):hover,
:where(.button-secondary, [data-variant="secondary"]):hover {
	border-color: var(--wp--preset--color--primary-hover);
	background-color: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-hover);
}

:where(button, input, select, textarea):disabled,
:where(.wp-element-button, .wp-block-button__link)[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
}

/**
 * Site header
 */

header.wp-block-template-part {
	position: relative;
	z-index: 10;
	border-bottom: 1px solid var(--wp--preset--color--border);
	background-color: var(--wp--preset--color--surface);
	box-shadow: none;
}

header.wp-block-template-part > .wp-block-group {
	background-color: var(--wp--preset--color--surface);
}

header.wp-block-template-part .wp-block-group.alignwide {
	width: 100%;
	min-height: 64px;
	column-gap: var(--wp--preset--spacing--50);
}

header.wp-block-template-part .wp-block-site-title {
	margin: 0;
	font-size: clamp(1.125rem, 3vw, 1.375rem);
	font-weight: 750;
	letter-spacing: -0.025em;
	line-height: 1.2;
}

header.wp-block-template-part .wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

header.wp-block-template-part .wp-block-site-title a::before {
	width: 12px;
	height: 12px;
	border-radius: var(--wp--custom--radius--small);
	background-color: var(--wp--preset--color--primary);
	content: "";
	flex: 0 0 auto;
}

header.wp-block-template-part .wp-block-navigation {
	color: var(--wp--preset--color--text);
	font-size: 0.9375rem;
	font-weight: 600;
}

header.wp-block-template-part .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--small);
	color: var(--wp--preset--color--text);
	line-height: 1.25;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

header.wp-block-template-part .wp-block-navigation-item__content:hover,
header.wp-block-template-part .wp-block-navigation-item__content:focus-visible,
header.wp-block-template-part .current-menu-item > .wp-block-navigation-item__content,
header.wp-block-template-part .wp-block-navigation-item__content[aria-current="page"] {
	background-color: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-hover);
}

header.wp-block-template-part .wp-block-navigation__submenu-container {
	min-width: 220px;
	padding: var(--wp--preset--spacing--20);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--controls);
	background-color: var(--wp--preset--color--surface);
	box-shadow: 0 12px 28px rgb(16 24 40 / 10%);
}

header.wp-block-template-part :where(
	.wp-block-navigation__responsive-container-open,
	.wp-block-navigation__responsive-container-close
) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 10px;
	border-radius: var(--wp--custom--radius--controls);
	background: transparent;
	color: var(--wp--preset--color--text);
}

header.wp-block-template-part :where(
	.wp-block-navigation__responsive-container-open,
	.wp-block-navigation__responsive-container-close
):hover {
	background-color: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-hover);
}

/**
 * Home
 */

.home main.wp-block-group {
	padding-bottom: clamp(48px, 8vw, 64px);
}

.home main > .wp-block-group:first-child :where(.wp-block-post-title, h1.wp-block-heading),
.home main > :where(.wp-block-post-title, h1.wp-block-heading) {
	max-width: 20ch;
	text-wrap: balance;
}

.home .wp-block-post-content {
	overflow-wrap: anywhere;
}

.home .wp-block-post-content > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.home .wp-block-post-content > :where(
	.wp-block-group,
	.wp-block-columns,
	.wp-block-query,
	h2,
	h3
):not(:first-child) {
	margin-block-start: clamp(32px, 6vw, 64px);
}

.home .wp-block-post-content > p:first-child {
	max-width: 65ch;
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.65;
}

.home .wp-block-columns {
	gap: clamp(16px, 3vw, 32px);
}

.home :where(
	.wp-block-group.has-background:not(.alignfull),
	.wp-block-columns > .wp-block-column.has-background,
	.wp-block-columns > .wp-block-column > .wp-block-group.has-background
) {
	box-sizing: border-box;
	padding: clamp(20px, 3vw, 32px);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--panels);
}

.home :where(.wp-block-post-template, .wp-block-latest-posts.is-grid) {
	gap: var(--wp--preset--spacing--50);
}

.home .wp-block-post-template > .wp-block-post,
.home .wp-block-latest-posts.is-grid > li {
	box-sizing: border-box;
	min-width: 0;
	margin: 0;
	padding: clamp(20px, 3vw, 24px);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--cards);
	background-color: var(--wp--preset--color--surface);
	box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.home :where(
	.wp-block-post-template > .wp-block-post,
	.wp-block-latest-posts.is-grid > li
):hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 8px 22px rgb(16 24 40 / 8%);
}

.home .wp-block-post-template .wp-block-post-title,
.home .wp-block-latest-posts.is-grid > li > a {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.3;
}

.home .wp-block-post-template .wp-block-post-title a,
.home .wp-block-latest-posts.is-grid > li > a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.home .wp-block-post-template .wp-block-post-title a:hover,
.home .wp-block-latest-posts.is-grid > li > a:hover {
	color: var(--wp--preset--color--primary);
}

.home :where(.wp-block-post-excerpt, .wp-block-latest-posts__post-excerpt) {
	color: var(--wp--preset--color--text-secondary);
}

@media (max-width: 480px) {
	.wp-block-buttons > .wp-block-button {
		flex-basis: 100%;
	}

	.wp-block-buttons > .wp-block-button > :where(.wp-block-button__link, .wp-element-button) {
		width: 100%;
	}
}

@media (max-width: 781px) {
	header.wp-block-template-part .wp-block-group.alignwide {
		min-height: 60px;
	}

	header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open {
		padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
		background-color: var(--wp--preset--color--surface) !important;
		color: var(--wp--preset--color--text) !important;
	}

	header.wp-block-template-part .wp-block-navigation__responsive-container-content {
		align-items: stretch;
		padding-top: var(--wp--preset--spacing--70);
	}

	header.wp-block-template-part .wp-block-navigation__container {
		align-items: stretch;
		gap: var(--wp--preset--spacing--20);
	}

	header.wp-block-template-part .wp-block-navigation-item,
	header.wp-block-template-part .wp-block-navigation-item__content {
		width: 100%;
	}

	header.wp-block-template-part .wp-block-navigation-item__content {
		min-height: 48px;
		padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
		font-size: 1.0625rem;
	}

	.home .wp-block-post-template > .wp-block-post,
	.home .wp-block-latest-posts.is-grid > li {
		padding: var(--wp--preset--spacing--40);
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(
		input,
		select,
		textarea,
		button,
		.wp-element-button,
		.wp-block-button__link,
		.wp-block-navigation-item__content,
		.wp-block-post
	) {
		transition-duration: 0.01ms;
	}
}

/**
 * Insertable calculator clusters. No rules target the current home buttons.
 * Container queries also adapt the pattern in narrow editor previews/columns.
 */
.mc-clusters {
	container: mc-clusters / inline-size;
}

.mc-clusters .mc-cluster {
	--mc-cluster-accent: var(--wp--preset--color--primary, #175cd3);
	box-sizing: border-box;
	padding: clamp(16px, 3vw, 32px);
	border: 1px solid var(--wp--preset--color--border, #d0d5dd);
	border-block-start: 4px solid var(--mc-cluster-accent);
	border-radius: var(--wp--custom--radius--panels, 16px);
	background: var(--wp--preset--color--primary-soft, #eff4ff);
	color: var(--wp--preset--color--text, #101828);
}

.mc-clusters .mc-cluster--physics {
	--mc-cluster-accent: var(--wp--preset--color--success, #067647);
	background: var(--wp--preset--color--background, #f8fafc);
}

.mc-clusters > .mc-cluster + .mc-cluster {
	margin-block-start: clamp(24px, 4vw, 48px);
}

.mc-clusters .mc-cluster__title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	font-size: clamp(1.375rem, 3vw, 1.875rem);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.mc-clusters .mc-cluster__symbol {
	display: inline-grid;
	place-items: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: var(--wp--custom--radius--cards, 12px);
	background: var(--mc-cluster-accent);
	color: #fff;
	font-family: system-ui, sans-serif;
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1;
}

.mc-clusters .mc-cluster__section {
	margin-block-start: 32px;
}

.mc-clusters .mc-cluster__section + .mc-cluster__section {
	padding-block-start: 24px;
	border-block-start: 1px solid var(--wp--preset--color--border, #d0d5dd);
}

.mc-clusters .mc-cluster__subtitle {
	margin: 0 0 16px;
	font-size: 1.125rem;
	line-height: 1.4;
}

.mc-clusters .mc-cluster__subtitle a {
	color: var(--mc-cluster-accent);
	text-underline-offset: 0.2em;
}

.mc-clusters .mc-tool-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 0;
}

.mc-clusters .mc-tool-card {
	display: flex;
	min-width: 0;
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}

.mc-clusters .mc-tool-card > a {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 96px;
	padding: 20px;
	border: 1px solid var(--wp--preset--color--border, #d0d5dd);
	border-radius: var(--wp--custom--radius--cards, 12px);
	background: var(--wp--preset--color--surface, #fff);
	color: var(--wp--preset--color--text, #101828);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.mc-clusters .mc-tool-card > a:hover {
	border-color: var(--mc-cluster-accent);
	color: var(--mc-cluster-accent);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	box-shadow: 0 2px 6px rgb(16 24 40 / 6%);
}

.mc-clusters a:focus-visible {
	outline: 3px solid var(--mc-cluster-accent);
	outline-offset: 3px;
}

/* Applies only once this pattern has actually been inserted into the home. */
.home .wp-block-post-content > .mc-clusters {
	margin-block: clamp(32px, 5vw, 48px);
}

@container mc-clusters (min-width: 36rem) {
	.mc-clusters .mc-tool-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container mc-clusters (min-width: 56rem) {
	.mc-clusters .mc-tool-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@container mc-clusters (min-width: 70rem) {
	.mc-clusters .mc-tool-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/**
 * Child-theme footer. These rules do not style other template parts.
 * Fixed light colors intentionally override the parent's dark link presets.
 */
.mc-footer {
	container: mc-footer / inline-size;
	box-sizing: border-box;
	padding: clamp(32px, 5vw, 48px) clamp(16px, 3vw, 32px);
	background: #101828;
	color: #f8fafc;
}

.mc-footer .mc-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.mc-footer .mc-footer__grid > * {
	min-width: 0;
	margin-block: 0;
}

.mc-footer .mc-footer__brand {
	margin: 0;
	font-size: clamp(1.25rem, 3vw, 1.5rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.4;
}

.mc-footer .mc-footer__heading {
	margin: 0 0 12px;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
}

.mc-footer .mc-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mc-footer .mc-footer__links li {
	margin: 0;
}

.mc-footer a {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 44px;
	padding-block: 8px;
	color: #eff4ff;
	line-height: 1.5;
	text-decoration: underline;
	text-decoration-color: #475467;
	text-underline-offset: 0.25em;
	overflow-wrap: anywhere;
}

.mc-footer .mc-footer__brand a {
	color: #fff;
	text-decoration: none;
}

.mc-footer a:hover {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: currentColor;
}

.mc-footer a:focus-visible {
	outline: 2px solid #eff4ff;
	outline-offset: 4px;
	border-radius: 2px;
}

@container mc-footer (min-width: 36rem) {
	.mc-footer .mc-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mc-footer .mc-footer__identity {
		grid-column: 1 / -1;
	}
}

@container mc-footer (min-width: 56rem) {
	.mc-footer .mc-footer__grid {
		grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
	}

	.mc-footer .mc-footer__identity {
		grid-column: auto;
	}
}
