/*
 * Bea Cruz - Calculadora de Intercambios
 * The frontend inherits the active site's typography to integrate naturally
 * with the future private area.
 */
.bcci-calculator {
	--bcci-coral: #d4696c;
	--bcci-coral-dark: #bd575d;
	--bcci-navy: #395173;
	--bcci-navy-dark: #293d5b;
	--bcci-cream: #fcf8f4;
	--bcci-blush: #f8e8e7;
	--bcci-blue-soft: #eaf0f6;
	--bcci-text: #344054;
	--bcci-muted: #667085;
	--bcci-border: #e5e7eb;
	--bcci-white: #ffffff;
	--bcci-shadow: 0 24px 70px rgba(57, 81, 115, 0.14);
	box-sizing: border-box;
	width: 100%;
	max-width: 850px;
	margin: 28px auto;
	color: var(--bcci-text);
	font-family: inherit;
	line-height: 1.55;
}

.bcci-calculator *,
.bcci-calculator *::before,
.bcci-calculator *::after {
	box-sizing: inherit;
}

.bcci-card {
	position: relative;
	overflow: visible;
	padding: clamp(24px, 5vw, 54px);
	border: 1px solid rgba(57, 81, 115, 0.1);
	border-radius: 32px;
	background:
		radial-gradient(circle at 100% 0%, rgba(212, 105, 108, 0.12), transparent 32%),
		linear-gradient(145deg, #ffffff 0%, var(--bcci-cream) 100%);
	box-shadow: var(--bcci-shadow);
}

.bcci-header {
	max-width: 680px;
	margin: 0 auto 30px;
	text-align: center;
}

.bcci-eyebrow {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--bcci-coral-dark);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.bcci-header h2,
.bcci-guide-dialog h2 {
	margin: 0;
	color: var(--bcci-navy);
	font-family: inherit;
	font-size: clamp(1.8rem, 4.4vw, 3rem);
	font-weight: 750;
	line-height: 1.08;
	letter-spacing: -0.035em;
}

.bcci-header p {
	max-width: 640px;
	margin: 16px auto 0;
	color: var(--bcci-muted);
	font-size: clamp(1rem, 2vw, 1.12rem);
}

.bcci-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 30px;
}

.bcci-steps div {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 58px;
	padding: 10px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.76);
	color: var(--bcci-navy);
	border: 1px solid rgba(57, 81, 115, 0.08);
}

.bcci-steps span {
	display: inline-grid;
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 50%;
	background: var(--bcci-blush);
	color: var(--bcci-coral-dark);
	font-size: 0.84rem;
	font-weight: 800;
}

.bcci-steps p {
	margin: 0;
	font-size: 0.87rem;
	font-weight: 700;
	line-height: 1.2;
}

.bcci-form {
	display: grid;
	gap: 22px;
}

.bcci-field-group {
	position: relative;
}

.bcci-field-group > label,
.bcci-label-row label {
	display: block;
	margin: 0 0 8px;
	color: var(--bcci-navy-dark);
	font-size: 0.96rem;
	font-weight: 750;
}

.bcci-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.bcci-label-row label {
	margin: 0;
}

.bcci-group-indicator[hidden] {
	display: none !important;
}

.bcci-group-indicator {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--bcci-blue-soft);
	color: var(--bcci-navy);
	font-size: 0.75rem;
	font-weight: 800;
}

.bcci-group-indicator[data-group="hidratos"] {
	background: #fff1dd;
	color: #895d20;
}
.bcci-group-indicator[data-group="proteinas"] {
	background: #e8f2f8;
	color: #315f7a;
}
.bcci-group-indicator[data-group="grasas"] {
	background: #f6e9ef;
	color: #80506a;
}

.bcci-input-shell,
.bcci-number-shell {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 60px;
	border: 1.5px solid var(--bcci-border);
	border-radius: 17px;
	background: var(--bcci-white);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bcci-input-shell:focus-within,
.bcci-number-shell:focus-within,
.bcci-combobox.is-open .bcci-input-shell {
	border-color: var(--bcci-coral);
	box-shadow: 0 0 0 4px rgba(212, 105, 108, 0.13);
}

.bcci-input-shell > svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin-left: 18px;
	fill: none;
	stroke: var(--bcci-navy);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.bcci-combo-input,
.bcci-grams {
	width: 100%;
	min-width: 0;
	height: 58px;
	margin: 0 !important;
	padding: 0 50px 0 13px !important;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--bcci-text) !important;
	font: inherit !important;
	font-size: 1rem !important;
}

.bcci-combo-input::placeholder,
.bcci-grams::placeholder {
	color: #98a2b3;
	opacity: 1;
}

.bcci-clear-input {
	position: absolute;
	right: 12px;
	display: grid;
	width: 34px;
	height: 34px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--bcci-blue-soft);
	color: var(--bcci-navy);
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

.bcci-number-shell .bcci-grams {
	padding-left: 18px !important;
	padding-right: 110px !important;
}

.bcci-number-shell > span {
	position: absolute;
	right: 18px;
	color: var(--bcci-muted);
	font-size: 0.9rem;
	font-weight: 700;
}

.bcci-combobox.is-disabled {
	opacity: 0.62;
}

.bcci-options {
	position: absolute;
	z-index: 100;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	padding: 7px;
	border: 1px solid var(--bcci-border);
	border-radius: 17px;
	background: var(--bcci-white);
	box-shadow: 0 18px 50px rgba(57, 81, 115, 0.18);
}

.bcci-option {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 12px;
	border: 0;
	border-radius: 11px;
	background: transparent;
	color: var(--bcci-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.bcci-option:hover,
.bcci-option.is-highlighted {
	background: var(--bcci-blue-soft);
	color: var(--bcci-navy-dark);
}

.bcci-option span {
	font-weight: 650;
}

.bcci-option small {
	flex: 0 0 auto;
	color: var(--bcci-muted);
	font-size: 0.73rem;
}

.bcci-no-options {
	padding: 16px;
	color: var(--bcci-muted);
	text-align: center;
}

.bcci-field-error {
	min-height: 20px;
	padding: 5px 4px 0;
	color: #b42318;
	font-size: 0.82rem;
	font-weight: 650;
}

.bcci-submit {
	display: inline-flex;
	width: 100%;
	min-height: 62px;
	align-items: center;
	justify-content: center;
	gap: 11px;
	margin-top: 2px;
	padding: 15px 24px;
	border: 0;
	border-radius: 17px;
	background: linear-gradient(135deg, var(--bcci-coral), var(--bcci-coral-dark));
	box-shadow: 0 13px 25px rgba(212, 105, 108, 0.26);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.bcci-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 16px 30px rgba(212, 105, 108, 0.32);
}

.bcci-submit:focus-visible,
.bcci-guide-open:focus-visible,
.bcci-reset:focus-visible,
.bcci-guide-close:focus-visible {
	outline: 3px solid rgba(57, 81, 115, 0.3);
	outline-offset: 3px;
}

.bcci-submit svg,
.bcci-guide-open svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.bcci-result {
	margin-top: 28px;
	padding: clamp(22px, 4vw, 36px);
	border: 1px solid rgba(57, 81, 115, 0.09);
	border-radius: 24px;
	background:
		linear-gradient(145deg, rgba(57, 81, 115, 0.98), rgba(41, 61, 91, 0.98));
	color: #fff;
	text-align: center;
	box-shadow: 0 18px 45px rgba(57, 81, 115, 0.22);
}

.bcci-result-label {
	display: block;
	margin-bottom: 7px;
	color: #f8d6d7;
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.bcci-result-sentence {
	max-width: 600px;
	margin: 0 auto 14px;
	color: rgba(255, 255, 255, 0.84);
	font-size: 0.97rem;
}

.bcci-result-amount {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin: 4px 0;
}

.bcci-result-amount strong {
	font-size: clamp(3.2rem, 10vw, 5.5rem);
	font-weight: 780;
	line-height: 1;
	letter-spacing: -0.06em;
}

.bcci-result-amount span {
	font-size: 1.1rem;
	font-weight: 700;
}


.bcci-result-measure[hidden] {
	display: none !important;
}

.bcci-result-measure {
	max-width: 620px;
	margin: 18px auto 0;
	padding: 15px 18px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.09);
}

.bcci-result-measure > span {
	display: block;
	margin-bottom: 4px;
	color: #f8d6d7;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bcci-result-measure > strong {
	display: block;
	color: #fff;
	font-size: clamp(1.05rem, 3vw, 1.35rem);
	font-weight: 800;
	line-height: 1.35;
}

.bcci-result-note {
	margin: 12px 0 20px;
	color: rgba(255, 255, 255, 0.76);
	font-size: 0.87rem;
}

.bcci-reset {
	min-height: 44px;
	padding: 9px 17px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 0.86rem;
	font-weight: 750;
	cursor: pointer;
}

.bcci-footer {
	display: flex;
	justify-content: center;
	margin-top: 25px;
}

.bcci-guide-open {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 10px 14px;
	border: 0;
	background: transparent;
	color: var(--bcci-navy);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 750;
	text-decoration: underline;
	text-decoration-color: rgba(57, 81, 115, 0.25);
	text-underline-offset: 4px;
	cursor: pointer;
}

.bcci-guide-dialog {
	width: min(920px, calc(100vw - 28px));
	max-height: min(88vh, 900px);
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 26px;
	background: #fff;
	color: var(--bcci-text);
	box-shadow: 0 30px 100px rgba(16, 24, 40, 0.35);
	font-family: inherit;
}

.bcci-guide-dialog::backdrop {
	background: rgba(25, 39, 58, 0.66);
	backdrop-filter: blur(4px);
}

.bcci-dialog-header {
	position: sticky;
	z-index: 2;
	top: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 25px 28px 20px;
	border-bottom: 1px solid var(--bcci-border);
	background: rgba(255, 255, 255, 0.96);
}

.bcci-dialog-header h2 {
	font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.bcci-dialog-header p {
	margin: 6px 0 0;
	color: var(--bcci-muted);
}

.bcci-guide-close {
	display: grid;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bcci-blue-soft);
	color: var(--bcci-navy);
	font-size: 1.6rem;
	cursor: pointer;
}

.bcci-guide-dialog > .bcci-guide-intro,
.bcci-guide-dialog > .bcci-guide-section {
	margin-left: 28px;
	margin-right: 28px;
}

.bcci-guide-dialog {
	overflow-y: auto;
}

.bcci-guide-intro {
	margin-top: 22px;
	margin-bottom: 15px;
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--bcci-blush);
	color: #684144;
	font-size: 0.9rem;
}

.bcci-guide-section {
	margin-bottom: 12px;
	border: 1px solid var(--bcci-border);
	border-radius: 16px;
	background: #fff;
}

.bcci-guide-section:last-child {
	margin-bottom: 30px;
}

.bcci-guide-section summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	color: var(--bcci-navy);
	font-weight: 800;
	cursor: pointer;
	list-style: none;
}

.bcci-guide-section summary::-webkit-details-marker {
	display: none;
}

.bcci-guide-section summary svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	transition: transform 150ms ease;
}

.bcci-guide-section[open] summary svg {
	transform: rotate(180deg);
}

.bcci-guide-content {
	padding: 0 18px 18px;
}

.bcci-guide-content > p {
	margin: 0 0 14px;
	color: var(--bcci-muted);
	font-size: 0.88rem;
}

.bcci-guide-table-wrap {
	overflow-x: auto;
}

.bcci-guide-table-wrap table {
	width: 100%;
	min-width: 660px;
	border-collapse: collapse;
	font-size: 0.84rem;
}

.bcci-guide-table-wrap th,
.bcci-guide-table-wrap td {
	padding: 10px 11px;
	border-bottom: 1px solid var(--bcci-border);
	text-align: left;
	vertical-align: top;
}

.bcci-guide-table-wrap th {
	background: var(--bcci-blue-soft);
	color: var(--bcci-navy);
	font-size: 0.76rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

@media (max-width: 640px) {
	.bcci-calculator {
		margin: 16px auto;
	}

	.bcci-card {
		padding: 24px 17px 28px;
		border-radius: 24px;
	}

	.bcci-steps {
		grid-template-columns: 1fr;
		gap: 7px;
	}

	.bcci-steps div {
		justify-content: flex-start;
		min-height: 48px;
		padding: 8px 12px;
	}

	.bcci-form {
		gap: 17px;
	}

	.bcci-label-row {
		align-items: flex-start;
		flex-direction: column;
		gap: 5px;
	}

	.bcci-options {
		max-height: 230px;
	}

	.bcci-dialog-header {
		padding: 20px 18px 16px;
	}

	.bcci-guide-dialog > .bcci-guide-intro,
	.bcci-guide-dialog > .bcci-guide-section {
		margin-left: 15px;
		margin-right: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bcci-calculator *,
	.bcci-calculator *::before,
	.bcci-calculator *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
