/**
 * Consultation modal — shared across v1 templates.
 */

.ts-consult-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ts-consult-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ts-consult-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.ts-consult-modal__panel {
	position: relative;
	width: 100%;
	max-width: 42rem;
	max-height: min(92vh, 52rem);
	overflow: auto;
	background: #fff;
	border-radius: 1.5rem;
	box-shadow:
		0 25px 50px -12px rgba(0, 0, 0, 0.35),
		0 0 0 1px rgba(255, 255, 255, 0.08);
	transform: translateY(1.25rem) scale(0.97);
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ts-consult-modal.is-open .ts-consult-modal__panel {
	transform: translateY(0) scale(1);
}

.ts-consult-modal__close {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.92);
	color: #1a2b48;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	transition: background 0.2s ease, transform 0.2s ease;
}

.ts-consult-modal__close:hover,
.ts-consult-modal__close:focus-visible {
	background: #fff;
	transform: scale(1.05);
	outline: none;
}

.ts-consult-modal__header {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1.75rem 1.75rem 1.25rem;
	background: linear-gradient(135deg, #1a2b48 0%, #243b5c 55%, #2d4a6e 100%);
	color: #fff;
	border-radius: 1.5rem 1.5rem 0 0;
}

.ts-consult-modal__header-icon {
	flex-shrink: 0;
	width: 3.25rem;
	height: 3.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	background: linear-gradient(135deg, #f5b800 0%, #fbbf24 100%);
	color: #1a2b48;
	box-shadow: 0 8px 20px rgba(245, 184, 0, 0.35);
}

.ts-consult-modal__header-icon .material-icons {
	font-size: 1.75rem;
}

.ts-consult-modal__eyebrow {
	margin: 0 0 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #f5b800;
}

.ts-consult-modal__title {
	margin: 0 0 0.35rem;
	font-size: 1.5rem;
	font-weight: 900;
	line-height: 1.3;
	color: #fff;
}

.ts-consult-modal__subtitle {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgba(226, 232, 240, 0.9);
}

.ts-consult-modal__body {
	padding: 1.5rem 1.75rem 1.75rem;
}

.ts-consult-modal__quick-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.ts-consult-modal__quick-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	padding: 0.875rem 0.75rem;
	border-radius: 0.875rem;
	font-weight: 800;
	font-size: 0.8125rem;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ts-consult-modal__quick-btn .material-icons {
	font-size: 1.375rem;
}

.ts-consult-modal__quick-btn-icon {
	width: 1.375rem;
	height: 1.375rem;
}

.ts-consult-modal__quick-btn-label {
	color: inherit;
	line-height: 1.3;
}

.ts-consult-modal__quick-btn-value {
	font-size: 0.75rem;
	font-weight: 700;
	opacity: 0.88;
	line-height: 1.2;
}

.ts-consult-modal__quick-btn--phone,
.ts-consult-modal__quick-btn--phone:visited {
	background: linear-gradient(135deg, #f5b800 0%, #fbbf24 100%);
	color: #1a2b48;
	box-shadow: 0 6px 18px rgba(245, 184, 0, 0.28);
}

.ts-consult-modal__quick-btn--phone:hover,
.ts-consult-modal__quick-btn--phone:focus-visible {
	background: linear-gradient(135deg, #e0a82e 0%, #f5b800 100%);
	color: #1a2b48 !important;
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(245, 184, 0, 0.35);
	outline: none;
}

.ts-consult-modal__quick-btn--phone .material-icons,
.ts-consult-modal__quick-btn--phone .ts-consult-modal__quick-btn-label,
.ts-consult-modal__quick-btn--phone .ts-consult-modal__quick-btn-value {
	color: #1a2b48;
}

.ts-consult-modal__quick-btn--phone:hover .material-icons,
.ts-consult-modal__quick-btn--phone:focus-visible .material-icons,
.ts-consult-modal__quick-btn--phone:hover .ts-consult-modal__quick-btn-label,
.ts-consult-modal__quick-btn--phone:focus-visible .ts-consult-modal__quick-btn-label,
.ts-consult-modal__quick-btn--phone:hover .ts-consult-modal__quick-btn-value,
.ts-consult-modal__quick-btn--phone:focus-visible .ts-consult-modal__quick-btn-value {
	color: #1a2b48 !important;
	opacity: 1;
}

.ts-consult-modal__quick-btn--whatsapp,
.ts-consult-modal__quick-btn--whatsapp:visited {
	background: #25d366;
	color: #fff;
	box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32);
}

.ts-consult-modal__quick-btn--whatsapp:hover,
.ts-consult-modal__quick-btn--whatsapp:focus-visible {
	background: #20bd5a;
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(37, 211, 102, 0.42);
	color: #fff !important;
	outline: none;
}

.ts-consult-modal__quick-btn--whatsapp .ts-consult-modal__quick-btn-label,
.ts-consult-modal__quick-btn--whatsapp .ts-consult-modal__quick-btn-value,
.ts-consult-modal__quick-btn--whatsapp .ts-consult-modal__quick-btn-icon {
	color: #fff;
}

.ts-consult-modal__quick-btn--whatsapp:hover .ts-consult-modal__quick-btn-label,
.ts-consult-modal__quick-btn--whatsapp:focus-visible .ts-consult-modal__quick-btn-label,
.ts-consult-modal__quick-btn--whatsapp:hover .ts-consult-modal__quick-btn-value,
.ts-consult-modal__quick-btn--whatsapp:focus-visible .ts-consult-modal__quick-btn-value,
.ts-consult-modal__quick-btn--whatsapp:hover .ts-consult-modal__quick-btn-icon,
.ts-consult-modal__quick-btn--whatsapp:focus-visible .ts-consult-modal__quick-btn-icon {
	color: #fff !important;
	opacity: 1;
}

.ts-consult-modal__body .ts-consult-form button[type='submit']:disabled {
	opacity: 0.7;
	cursor: wait;
}

body.ts-consult-modal-open {
	overflow: hidden;
}

@media (max-width: 639px) {
	.ts-consult-modal {
		padding: 0.75rem;
		align-items: flex-end;
	}

	.ts-consult-modal__panel {
		max-height: 94vh;
		border-radius: 1.25rem 1.25rem 0 0;
	}

	.ts-consult-modal__header {
		padding: 1.25rem 1.25rem 1rem;
		border-radius: 1.25rem 1.25rem 0 0;
	}

	.ts-consult-modal__body {
		padding: 1.25rem;
	}

	.ts-consult-modal__title {
		font-size: 1.25rem;
	}

	.ts-consult-modal__quick-actions {
		grid-template-columns: 1fr;
	}
}

/* Homepage contact section — open modal CTA card */
.hp-consult-open-card {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 1.5rem;
	padding: 2rem;
	text-align: center;
	backdrop-filter: blur(8px);
}

.hp-consult-open-card__icon {
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	background: linear-gradient(135deg, #f5b800 0%, #fbbf24 100%);
	color: #1a2b48;
	box-shadow: 0 10px 24px rgba(245, 184, 0, 0.3);
}

.hp-consult-open-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	max-width: 20rem;
	margin-top: 1.25rem;
	padding: 1rem 1.5rem;
	border: 0;
	border-radius: 0.875rem;
	background: linear-gradient(90deg, #f5b800 0%, #fbbf24 100%);
	color: #1a2b48;
	font-weight: 900;
	font-size: 1.0625rem;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(245, 184, 0, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hp-consult-open-card__btn:hover,
.hp-consult-open-card__btn:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 14px 28px rgba(245, 184, 0, 0.35);
	outline: none;
}

.ts-consult-form__product-checkboxes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	max-height: 14rem;
	overflow-y: auto;
	padding: 0.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.875rem;
	background: #f8fafc;
}

.ts-consult-form__product-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	padding: 0.625rem 0.75rem;
	border-radius: 0.625rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ts-consult-form__product-checkbox:hover {
	border-color: #f5b800;
	background: #fffdf5;
}

.ts-consult-form__product-checkbox-input {
	flex-shrink: 0;
	width: 1.05rem;
	height: 1.05rem;
	margin-top: 0.15rem;
	accent-color: #f5b800;
	cursor: pointer;
}

.ts-consult-form__product-checkbox-label {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.5;
	color: #1a2b48;
}

.ts-consult-form__product-checkbox:has(.ts-consult-form__product-checkbox-input:checked) {
	border-color: #f5b800;
	background: #fffbeb;
	box-shadow: 0 0 0 1px rgba(245, 184, 0, 0.25);
}

@media (max-width: 639px) {
	.ts-consult-form__product-checkboxes {
		grid-template-columns: 1fr;
		max-height: 12rem;
	}
}
