/* define la presentación de encuesta de satisfacción */
/* ajustes de presentación para escritorio */

/* botón flotante */


.mbn-survey-launcher {
	position: fixed;
	left: 0;
	top: 23%;
	transform: translateY(-50%);

	z-index: 1035;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	padding: 24px 12px;
	border: 0;
	border-radius: 0;
	background-color: var(--mbn-action-primary, #0046A8);
	color: var(--mbn-text-on-primary, #E7ECFF);
	font-family: var(--mbn-roboto-sans-small-font-family, "Roboto", sans-serif);
	font-size: var(--mbn-roboto-sans-small-font-size, 19px);
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	cursor: pointer;

	writing-mode: vertical-rl;
	rotate: 180deg;
}

.mbn-survey-launcher:hover,
.mbn-survey-launcher:focus-visible {
	background-color: var(--mbn-brand-blue-dark, #00268D);
	color: var(--mbn-text-on-primary, #E7ECFF);
}

.mbn-survey-launcher[hidden] {
	display: none;
}


.mbn-survey-launcher__icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	rotate: 180deg;
	background-color: currentColor;
	mask-image: var(--mbn-survey-launcher-icon);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: 24px 24px;
	-webkit-mask-image: var(--mbn-survey-launcher-icon);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: 24px 24px;
}


.mbn-survey-mobile-dock {
	display: none;
}

@media (max-width: 767.98px) {
	body:has(.mbn-survey-launcher:not([hidden])) {
		padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
	}

	body:has(.mbn-survey-launcher:not([hidden])) .mbn-survey-mobile-dock {
		display: block;
		position: fixed;
		inset: auto 0 0;
		height: calc(76px + env(safe-area-inset-bottom, 0px));
		background: var(--mbn-surface-white, #FFFFFF);
		border-top: 1px solid var(--mbn-border-divider, #E6E6E6);
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
		z-index: 1034;
	}

	.mbn-survey-launcher {
		left: 16px;
		right: 16px;
		top: auto;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		height: 48px;
		padding: 3px 12px;
		border: 1px solid var(--mbn-action-primary, #0046A8);
		border-radius: 24px;
		background-color: var(--mbn-surface-white, #FFFFFF);
		color: var(--mbn-action-primary, #0046A8);
		font-size: calc(14px * var(--mbn-text-scale, 1));
		line-height: 20px;
		writing-mode: horizontal-tb;
		rotate: none;
		transform: none;
	}

	body:has(.mbn-chat) .mbn-survey-launcher {
		right: 80px;
	}

	.mbn-survey-launcher__icon {
		width: 20px;
		height: 20px;
		rotate: none;
		mask-image: var(--mbn-survey-launcher-mobile-icon, var(--mbn-survey-launcher-icon));
		-webkit-mask-image: var(--mbn-survey-launcher-mobile-icon, var(--mbn-survey-launcher-icon));
		mask-size: 20px 20px;
		-webkit-mask-size: 20px 20px;
	}

	.mbn-survey-launcher__label {
		min-width: 0;
	}


	body:has(.mbn-survey-launcher:not([hidden])) .mbn-chat {
		right: 16px;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	}

	body:has(.mbn-survey-launcher:not([hidden])) .mbn-chat .mbn-chat__launcher {
		width: 48px;
		height: 48px;
		padding: 0;
		gap: 0;
		border-radius: 50%;
		box-shadow: 0 3px 10px rgba(0, 0, 0, 0.13);
	}

	body:has(.mbn-survey-launcher:not([hidden])) .mbn-chat__launcher-label {
		display: none;
	}

	html.mbn-contrast body:has(.mbn-survey-launcher:not([hidden])) .mbn-survey-mobile-dock {
		background: #000000;
		border-top-color: #FCFF3C;
	}
}

/* diálogo */

.mbn-survey {
	--bs-modal-width: 448px;
	--bs-modal-color: var(--mbn-text-primary, #333333);
	--bs-modal-bg: var(--mbn-surface-white, #FFFFFF);
	--bs-modal-border-width: 0;
	--bs-modal-border-radius: 16px;
	--bs-modal-inner-border-radius: 16px;
	--bs-modal-box-shadow: 0 25px 25px rgba(0, 0, 0, 0.25);
	--bs-modal-padding: 16px 32px;
}

.mbn-survey__content {

	overflow: hidden;
}

.mbn-survey__flag {
	display: flex;
	height: 8px;
	margin: 0;
}


.mbn-survey__flag-blue {
	flex: 0 0 37%;
	background-color: var(--mbn-brand-blue, #0F69C4);
}

.mbn-survey__flag-red {
	flex: 1 1 auto;
	background-color: var(--mbn-survey-flag-red, #FF2930);
}

.mbn-survey__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: var(--bs-modal-padding);
}

/* cabecera */

.mbn-survey__header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mbn-survey__eyebrow {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: var(--mbn-action-primary, #0046A8);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(12px * var(--mbn-text-scale, 1));
	font-weight: 500;
	line-height: calc(16px * var(--mbn-text-scale, 1));
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.mbn-survey__close {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	cursor: pointer;
}

.mbn-survey__close:hover,
.mbn-survey__close:focus-visible {
	background-color: var(--mbn-surface-hover, #F2F2F2);
}

.mbn-survey__close-icon {
	width: 16px;
	height: 16px;
	background-color: var(--mbn-survey-close-color, #99A1AF);
	mask-image: var(--mbn-survey-close);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: 16px 16px;
	-webkit-mask-image: var(--mbn-survey-close);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: 16px 16px;
}

.mbn-survey__header[hidden] {
	display: none;
}

/* indicador de pasos */


.mbn-survey__steps {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mbn-survey__step-dot {
	position: relative;
	flex: 1 1 0;
	height: 32px;
}

.mbn-survey__step-dot:last-child {
	flex: 0 0 32px;
}

.mbn-survey__step-dot::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 32px;
	border: 2px solid var(--mbn-brand-blue, #0F69C4);
	border-radius: 50%;
	background-color: var(--mbn-surface-white, #FFFFFF);
}

.mbn-survey__step-dot:not(:last-child)::after {
	content: "";
	position: absolute;
	inset-block-start: 15px;
	inset-inline-start: 30px;
	inset-inline-end: 0;
	height: 2px;
	background-color: var(--mbn-brand-blue, #0F69C4);
}


.mbn-survey__step-dot.is-done::before,
.mbn-survey__step-dot.is-current::before {
	background-color: var(--mbn-brand-blue, #0F69C4);
}

/* paso */

.mbn-survey__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mbn-survey__step {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mbn-survey__step[hidden] {
	display: none;
}

.mbn-survey__question {
	margin: 0;
	padding-top: 4px;
	color: var(--mbn-text-primary, #333333);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(20px * var(--mbn-text-scale, 1));

	font-weight: 700 !important;
	line-height: calc(27.5px * var(--mbn-text-scale, 1));
}


.mbn-survey__question:focus,
.mbn-survey__question:focus-visible {
	outline: none;
}

/* escala de 7 estrellas */

.mbn-survey__scale {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

.mbn-survey__star {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background-color: var(--mbn-survey-star-empty, #CCCCCC);
	cursor: pointer;
	mask-image: var(--mbn-survey-star-outline);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: 40px 40px;
	-webkit-mask-image: var(--mbn-survey-star-outline);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: 40px 40px;
}


.mbn-survey__star.is-filled {
	background-color: var(--mbn-survey-star-active, #0F5AC4);
	mask-image: var(--mbn-survey-star-filled);
	-webkit-mask-image: var(--mbn-survey-star-filled);
}


.mbn-survey__star.is-preview {
	background-color: var(--mbn-brand-blue, #0F69C4);
	mask-image: var(--mbn-survey-star-filled);
	-webkit-mask-image: var(--mbn-survey-star-filled);
}

.mbn-survey__scale-labels {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	color: var(--mbn-text-placeholder, #999999);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(12px * var(--mbn-text-scale, 1));
	line-height: calc(16px * var(--mbn-text-scale, 1));
}

.mbn-survey__scale-max {
	text-align: end;
}

/* aviso de error */

.mbn-survey__alert {
	margin: 0;
	padding: 12px 16px;
	border-inline-start: 4px solid var(--mbn-state-alert, #FF0031);
	background-color: var(--mbn-surface-soft, #F9F9F9);
	color: var(--mbn-text-primary, #333333);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(14px * var(--mbn-text-scale, 1));
	line-height: 1.5;
}

.mbn-survey__alert[hidden] {
	display: none;
}

/* botones */

.mbn-survey__actions {
	display: flex;
	gap: 14px;
}


.mbn-survey__button {
	--bs-btn-padding-y: 8px;
	--bs-btn-padding-x: 16px;
	--bs-btn-border-radius: 24px;
	--bs-btn-border-width: 0;
	--bs-btn-font-family: var(--mbn-roboto-body-button-font-family, "Roboto", sans-serif);
	--bs-btn-font-size: var(--mbn-roboto-body-small-font-size, 16px);
	--bs-btn-font-weight: 700;
	--bs-btn-line-height: 1.5;
	flex: 1 1 0;
}

.mbn-survey__button[hidden] {
	display: none;
}

.mbn-survey__button--primary {
	--bs-btn-bg: var(--mbn-action-primary, #0046A8);
	--bs-btn-color: var(--mbn-text-on-primary, #E7ECFF);
	--bs-btn-border-color: transparent;
	--bs-btn-hover-bg: var(--mbn-brand-blue-dark, #00268D);
	--bs-btn-hover-color: var(--mbn-text-on-primary, #E7ECFF);
	--bs-btn-hover-border-color: transparent;
	--bs-btn-active-bg: var(--mbn-brand-blue-dark, #00268D);
	--bs-btn-active-color: var(--mbn-text-on-primary, #E7ECFF);

	--bs-btn-disabled-bg: var(--mbn-action-primary, #0046A8);
	--bs-btn-disabled-color: var(--mbn-text-on-primary, #E7ECFF);
	--bs-btn-disabled-border-color: transparent;
	--bs-btn-disabled-opacity: 0.36;
}

.mbn-survey__button--ghost {
	--bs-btn-bg: transparent;
	--bs-btn-color: var(--mbn-brand-blue-dark, #00268D);
	--bs-btn-border-color: transparent;
	--bs-btn-hover-bg: var(--mbn-surface-hover, #F2F2F2);
	--bs-btn-hover-color: var(--mbn-brand-blue-dark, #00268D);
	--bs-btn-hover-border-color: transparent;
	--bs-btn-active-bg: var(--mbn-surface-hover, #F2F2F2);
	--bs-btn-active-color: var(--mbn-brand-blue-dark, #00268D);
}

.mbn-survey__button--compact {
	flex: 0 0 auto;
	align-self: center;
	min-width: 77px;
}

/* privacidad */

.mbn-survey__privacy {
	margin: 0;
	color: var(--mbn-text-subtle, #666666);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(12px * var(--mbn-text-scale, 1));
	line-height: calc(16px * var(--mbn-text-scale, 1));
	text-align: center;
}

.mbn-survey__privacy-link {
	color: var(--mbn-link-default, #1D70B8);
	text-decoration: underline;
}

/* pantalla de agradecimiento */

.mbn-survey__done {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: center;
	text-align: center;
}

.mbn-survey__done[hidden] {
	display: none;
}

.mbn-survey__done-icon {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: var(--mbn-surface-brand-soft, #E8F0FE);

	background-image: none;
	position: relative;
}

.mbn-survey__done-icon::after {
	content: "";
	position: absolute;
	inset: 16px;
	background-color: var(--mbn-action-primary, #0046A8);
	mask-image: var(--mbn-survey-check);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: 32px 32px;
	-webkit-mask-image: var(--mbn-survey-check);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: 32px 32px;
}

.mbn-survey__done-title {
	margin: 0;
	color: var(--mbn-text-primary, #333333);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(24px * var(--mbn-text-scale, 1));
	font-weight: 700 !important;
	line-height: calc(32px * var(--mbn-text-scale, 1));
}

.mbn-survey__done-text {
	margin: 0;
	color: var(--mbn-text-subtle, #666666);
	font-family: var(--mbn-roboto-body-small-font-family, "Roboto", sans-serif);
	font-size: calc(14px * var(--mbn-text-scale, 1));
	line-height: calc(22.75px * var(--mbn-text-scale, 1));
}

/* ajustes de presentación para móviles */

@media (max-width: 767.98px) {
	.mbn-survey {
		--bs-modal-padding: 16px 20px;
	}

	.mbn-survey .modal-dialog {
		margin: 16px;
	}

	.mbn-survey__question {
		font-size: calc(18px * var(--mbn-text-scale, 1));
		line-height: calc(25px * var(--mbn-text-scale, 1));
	}


	.mbn-survey__scale {
		gap: 8px;
	}

	.mbn-survey__star {
		width: 32px;
		height: 32px;
		mask-size: 32px 32px;
		-webkit-mask-size: 32px 32px;
	}

	.mbn-survey__step-dot {
		height: 24px;
	}

	.mbn-survey__step-dot:last-child {
		flex: 0 0 24px;
	}

	.mbn-survey__step-dot::before {
		width: 24px;
	}

	.mbn-survey__step-dot:not(:last-child)::after {
		inset-block-start: 11px;
		inset-inline-start: 22px;
	}
}

.mbn-survey__external {
	margin-bottom: 16px;
	padding: 12px;
	border: 1px solid var(--mbn-border-default, #CCC);
	border-radius: 8px;
}
.mbn-survey__external[hidden] { display: none; }
.mbn-survey__external p { margin: 0 0 8px; }
.mbn-survey__external a { display: inline-flex; text-decoration: none; }
