/* TechBrained Botón de llamada */

#tbcb {
	--tbcb-btn: #2f7f86;
	--tbcb-btn-text: #fff;
	--tbcb-bg: #2f7f86;
	--tbcb-bg-text: #fff;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: inherit;
	line-height: 1.4;
	text-align: left;
}
#tbcb.tbcb--left { right: auto; left: 20px; }
#tbcb *, #tbcb *::before, #tbcb *::after { box-sizing: border-box; }
#tbcb [hidden] { display: none !important; }

/* Botón flotante */
#tbcb .tbcb-button {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 22px 12px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--tbcb-btn);
	color: var(--tbcb-btn-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}
#tbcb .tbcb-button:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }
#tbcb .tbcb-button:focus-visible { outline: 3px solid var(--tbcb-btn); outline-offset: 3px; }
#tbcb .tbcb-button svg { width: 20px; height: 20px; flex: none; }

/* Popup */
#tbcb .tbcb-panel {
	position: absolute;
	z-index: 2;
	right: 0;
	bottom: calc(100% + 14px);
	width: 360px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	border-radius: 14px;
	background: var(--tbcb-bg);
	color: var(--tbcb-bg-text);
	box-shadow: 0 14px 44px rgba(0, 0, 0, .25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(40px);
	transition: opacity .25s ease, transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s;
}
#tbcb.tbcb--left .tbcb-panel { right: auto; left: 0; }
#tbcb.is-open .tbcb-panel {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

#tbcb .tbcb-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 18px 16px 20px;
}
#tbcb .tbcb-title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}
#tbcb .tbcb-close {
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	opacity: .85;
	cursor: pointer;
}
#tbcb .tbcb-close:hover { opacity: 1; }
#tbcb .tbcb-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#tbcb .tbcb-close svg { width: 14px; height: 14px; }

#tbcb .tbcb-body {
	margin: 0 12px 12px;
	padding: 18px;
	border-radius: 10px;
	background: #fff;
	color: #1d2327;
}

/* Formulario CF7 dentro del popup */
#tbcb .tbcb-form .wpcf7,
#tbcb .tbcb-form form { margin: 0; padding: 0; }
#tbcb .tbcb-form p { margin: 0 0 12px; padding: 0; }
#tbcb .tbcb-form label {
	display: block;
	margin: 0;
	color: #3c434a;
	font-size: 13px;
	font-weight: 600;
}
#tbcb .tbcb-form input[type="text"],
#tbcb .tbcb-form input[type="tel"],
#tbcb .tbcb-form input[type="email"],
#tbcb .tbcb-form input[type="number"],
#tbcb .tbcb-form select,
#tbcb .tbcb-form textarea {
	display: block;
	width: 100%;
	margin: 4px 0 0;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font-family: inherit;
	font-size: 16px; /* evita el zoom automático en iOS */
	line-height: 1.3;
	box-shadow: none;
}
#tbcb .tbcb-form textarea { min-height: 80px; resize: vertical; }
#tbcb .tbcb-form input:focus,
#tbcb .tbcb-form select:focus,
#tbcb .tbcb-form textarea:focus {
	border-color: var(--tbcb-btn);
	outline: 2px solid var(--tbcb-btn);
	outline-offset: 0;
}
#tbcb .tbcb-form .wpcf7-acceptance label,
#tbcb .tbcb-form .wpcf7-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 13px;
}
#tbcb .tbcb-form .wpcf7-list-item { margin: 0; }
#tbcb .tbcb-form input[type="checkbox"] { margin: 2px 0 0; flex: none; }
#tbcb .tbcb-form a { color: var(--tbcb-btn); text-decoration: underline; }

#tbcb .tbcb-form input[type="submit"],
#tbcb .tbcb-form .wpcf7-submit {
	display: block;
	width: 100%;
	margin: 4px 0 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 6px;
	background: var(--tbcb-btn);
	color: var(--tbcb-btn-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: filter .2s ease;
}
#tbcb .tbcb-form .wpcf7-submit:hover { filter: brightness(1.08); }
#tbcb .tbcb-form .wpcf7-submit:disabled { opacity: .6; cursor: default; }
#tbcb .tbcb-form .wpcf7-spinner { display: none; }
#tbcb .tbcb-form form.submitting .wpcf7-spinner { display: block; margin: 8px auto 0; }
#tbcb .tbcb-form p:last-of-type { margin-bottom: 0; }
#tbcb .tbcb-form .wpcf7-not-valid-tip { margin-top: 4px; font-size: 12px; }
#tbcb .tbcb-form form.init .wpcf7-response-output,
#tbcb .tbcb-form .wpcf7-response-output:empty { display: none; }
#tbcb .tbcb-form .wpcf7-response-output { margin: 12px 0 0; padding: 8px 10px; font-size: 13px; border-radius: 6px; }

/* Mensaje de OK */
#tbcb .tbcb-ok { padding: 10px 4px; text-align: center; outline: none; }
#tbcb .tbcb-ok svg { width: 48px; height: 48px; color: var(--tbcb-btn); }
#tbcb .tbcb-ok p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; }

/* Móvil: el popup sube desde el borde inferior a todo el ancho */
@media (max-width: 480px) {
	#tbcb { right: 16px; bottom: 16px; }
	#tbcb.tbcb--left { left: 16px; }
	#tbcb .tbcb-panel,
	#tbcb.tbcb--left .tbcb-panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		max-height: 85vh;
		border-radius: 16px 16px 0 0;
		padding-bottom: env(safe-area-inset-bottom);
		transform: translateY(100%);
	}
	#tbcb.is-open .tbcb-panel { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	#tbcb .tbcb-panel, #tbcb .tbcb-button { transition: none; }
}
