/* ==========================================================
   Dropdown Button para Elementor
   ========================================================== */

.db-dropdown {
	--db-offset: 10px;

	display: flex;
	justify-content: flex-start;
	width: 100%;
}

/* Ancla: el menú se posiciona respecto al botón */
.db-anchor {
	position: relative;
	display: inline-flex;
}

/* ---------- Botón ---------- */
.db-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 0;
	padding: 14px 30px;
	border: 0 solid transparent;
	border-radius: 30px;
	background: #f7c20f;
	color: #0a3ea8;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}

.db-toggle-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.db-toggle-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- Menú ---------- */
.db-panel {
	position: absolute;
	z-index: 20;
	/* El ancho se ajusta al texto más largo, sin bajar del ancho del botón */
	width: max-content;
	min-width: 100%;
	max-width: 92vw;
	box-sizing: border-box;
	padding: 18px 20px 12px;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 18px 45px rgba(15, 30, 70, .18);
	opacity: 0;
	visibility: hidden;
	/* --db-tx centra el menú cuando hace falta; --db-ty es el desplazamiento de la animación */
	--db-tx: 0px;
	--db-ty: -8px;
	/* --db-shift lo pone el JS para que el menú no se salga de la pantalla */
	transform: translate(calc(var(--db-tx) + var(--db-shift, 0px)), var(--db-ty));
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.db-panel.is-open {
	opacity: 1;
	visibility: visible;
	transform: translate(calc(var(--db-tx) + var(--db-shift, 0px)), 0);
}

/* Posiciones */
.db-pos-bottom-start .db-panel,
.db-pos-bottom-center .db-panel,
.db-pos-bottom-end .db-panel {
	top: calc(100% + var(--db-offset));
}

.db-pos-top-start .db-panel,
.db-pos-top-center .db-panel,
.db-pos-top-end .db-panel {
	bottom: calc(100% + var(--db-offset));
	--db-ty: 8px;
}

.db-pos-bottom-start .db-panel,
.db-pos-top-start .db-panel {
	left: 0;
}

.db-pos-bottom-end .db-panel,
.db-pos-top-end .db-panel {
	right: 0;
}

.db-pos-bottom-center .db-panel,
.db-pos-top-center .db-panel {
	left: 50%;
	--db-tx: -50%;
}

/*
 * "Encima del botón": el JS desplaza el menú para que la píldora del título
 * caiga justo donde estaba el botón, y el botón se oculta mientras está abierto.
 */
.db-pos-over .db-panel {
	top: 0;
	left: 0;
	--db-ty: -4px;
}

/* La píldora conserva el ancho del botón en vez de estirarse */
.db-pos-over .db-panel-title {
	flex: 0 1 auto;
	box-sizing: border-box;
	min-width: var(--db-pill-w, 0px);
}

.db-pos-over.db-open .db-toggle {
	visibility: hidden;
}

/* ---------- Encabezado del menú ---------- */
.db-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 10px;
}

.db-panel-title {
	flex: 1 1 auto;
	padding: 8px 18px;
	border-radius: 20px;
	background: #f1f2f4;
	color: #8a9099;
	font-size: 15px;
	line-height: 1.3;
}

.db-close {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f2f4;
	color: #5b6069;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}

.db-close svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* ---------- Lista ---------- */
.db-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.db-list .db-li {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid transparent;
}

.db-list .db-li + .db-li {
	border-top-color: #e7e9ec;
}

.db-list .db-li::marker {
	content: none;
}

.db-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 4px;
	color: #3d4351;
	font-size: 16px;
	line-height: 1.3;
	text-decoration: none;
	transition: color .2s, background-color .2s;
}

.db-item:hover,
.db-item:focus {
	color: #0a3ea8;
	text-decoration: none;
}

.db-item-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.db-item-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
	/* El ancla ocupa todo el ancho para que el menú pueda usarlo */
	.db-anchor {
		width: 100%;
		justify-content: inherit;
	}

	.db-toggle {
		flex: 0 0 auto;
	}

	/* El menú usa el ancho disponible en vez de un ancho fijo */
	.db-panel {
		width: auto !important;
		min-width: 0;
		max-width: none;
		left: 0;
		right: 0;
		padding: 14px 16px 10px;
	}

	.db-pos-bottom-end .db-panel,
	.db-pos-top-end .db-panel,
	.db-pos-bottom-center .db-panel,
	.db-pos-top-center .db-panel {
		--db-tx: 0px;
	}

	.db-panel-head {
		gap: 10px;
	}

	.db-item {
		padding: 13px 2px;
	}
}
