/*
 * Mundito Isabella — CTA de apoyo + popup Ko-fi (Brand).
 * Scope: .mib-support-* / #mib-support-modal
 * Paleta MIA02. No toca Mini Libro ni drawer de filtros.
 */

.mib-support-cta {
	font-family: var(--mib-font, Nunito, Quicksand, Open Sans, Arial, sans-serif);
	color: var(--mib-text, #333333);
	box-sizing: border-box;
}

.mib-support-cta *,
.mib-support-modal * {
	box-sizing: border-box;
}

.mib-support-cta__kicker,
.mib-support-cta__text {
	margin: 0;
}

.mib-support-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: #ffffff;
	background: #A54EC8;
	border-radius: 999px;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.mib-support-cta__btn:hover,
.mib-support-cta__btn:focus-visible {
	background: #8f3db0;
	outline: none;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(165, 78, 200, 0.45);
}

/* ── Club desktop: entre título y PERSONAJES, compacto ── */
.mib-support-cta--club-desktop {
	display: block;
	margin: 0 0 0.75rem;
	padding: 9px 10px;
	border-radius: 11px;
	background: #FDDBF5;
	border: 1px solid rgba(165, 78, 200, 0.18);
}

.mib-support-cta--club-desktop .mib-support-cta__kicker {
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1.3;
	color: #A54EC8;
	margin-bottom: 0.28rem;
}

.mib-support-cta--club-desktop .mib-support-cta__text {
	font-size: 0.72rem;
	line-height: 1.4;
	color: #333333;
	margin-bottom: 0.45rem;
}

.mib-support-cta--club-desktop .mib-support-cta__btn {
	width: 100%;
	height: 35px;
	min-height: 35px;
	padding: 0 0.65rem;
	font-size: 0.75rem;
}

/* ── Club móvil/tablet: franja junto a Filtros ── */
.mib-support-club-bar {
	display: none;
}

.mib-support-cta--club-mobile {
	display: none;
}

@media (max-width: 980px) {
	.mib-support-cta--club-desktop {
		display: none !important;
	}

	.mib-support-club-bar {
		display: grid;
		grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
		gap: 0.45rem;
		align-items: stretch;
		width: 100%;
		margin: 0 0 0.5rem;
	}

	.mib-support-club-bar .mib-filters-toggle {
		margin-bottom: 0;
		width: 100%;
		min-width: 0;
		justify-content: center;
	}

	.mib-support-cta--club-mobile {
		display: flex;
		align-items: center;
		min-width: 0;
		width: 100%;
		margin: 0;
		padding: 0;
		background: transparent;
		border: 0;
	}

	.mib-support-cta--club-mobile .mib-support-cta__copy {
		display: none;
	}

	.mib-support-cta--club-mobile .mib-support-cta__btn {
		width: 100%;
		height: 36px;
		min-height: 36px;
		max-height: 36px;
		padding: 0 0.55rem;
		font-size: 0.74rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: clip;
		background: #B56ED2;
		color: #ffffff;
	}

	.mib-support-cta--club-mobile .mib-support-cta__btn:hover,
	.mib-support-cta--club-mobile .mib-support-cta__btn:focus-visible {
		background: #A54EC8;
		color: #ffffff;
	}
}

@media (max-width: 767px) {
	.mib-support-cta--club-mobile .mib-support-cta__btn {
		font-size: 0.68rem;
		padding: 0 0.4rem;
		white-space: nowrap;
		line-height: 1;
		height: 36px;
		min-height: 36px;
		max-height: 36px;
	}
}

@media (min-width: 981px) {
	.mib-support-club-bar {
		display: contents;
	}

	.mib-support-cta--club-mobile {
		display: none !important;
	}
}

/* ── Entradas individuales ── */
.mib-support-cta--entry {
	display: block;
	max-width: 820px;
	margin: 0 auto 2rem;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	background: #FDDBF5;
	border: 1px solid rgba(165, 78, 200, 0.2);
	border-left: 4px solid #FE5A8F;
}

.mib-support-cta--entry .mib-support-cta__kicker {
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.3;
	color: #A54EC8;
	margin-bottom: 0.3rem;
}

.mib-support-cta--entry .mib-support-cta__text {
	font-size: 0.88rem;
	line-height: 1.45;
	margin-bottom: 0.55rem;
}

.mib-support-cta--entry .mib-support-cta__btn {
	height: 36px;
	min-height: 36px;
	padding: 0 1rem;
	font-size: 0.85rem;
}

@media (max-width: 767px) {
	.mib-support-cta--entry {
		margin-bottom: 1.35rem;
		padding: 0.75rem 0.85rem;
	}

	.mib-support-cta--entry .mib-support-cta__btn {
		width: 100%;
	}
}

/* ── Modal Ko-fi ── */
.mib-support-modal {
	position: fixed;
	inset: 0;
	z-index: 100200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.mib-support-modal[hidden] {
	display: none !important;
}

.mib-support-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(51, 51, 51, 0.5);
}

.mib-support-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 480px);
	max-height: min(92vh, 860px);
	overflow: auto;
	padding: 1.15rem 1rem 1rem;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 12px 32px rgba(165, 78, 200, 0.16);
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	-webkit-overflow-scrolling: touch;
}

.mib-support-modal__close {
	position: absolute;
	top: 0.4rem;
	right: 0.45rem;
	width: 2.1rem;
	height: 2.1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #333333;
	font-size: 1.55rem;
	line-height: 1;
	cursor: pointer;
}

.mib-support-modal__close:hover,
.mib-support-modal__close:focus-visible {
	outline: 2px solid #A54EC8;
	outline-offset: 2px;
}

.mib-support-modal__title {
	margin: 0.2rem 1.8rem 0 0;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.3;
	color: #A54EC8;
	font-family: var(--mib-font, Nunito, Quicksand, Open Sans, Arial, sans-serif);
}

.mib-support-modal__lead {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #333333;
	font-family: var(--mib-font, Nunito, Quicksand, Open Sans, Arial, sans-serif);
}

.mib-support-modal__iframe {
	margin: 0;
	width: 100%;
	min-height: 0;
	flex: 1 1 auto;
	background: #f9f9f9;
	border-radius: 8px;
	overflow: auto;
}

.mib-support-modal__iframe iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border: none;
}

html.mib-support-modal-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.mib-support-modal {
		padding: 0.55rem;
		align-items: flex-end;
	}

	.mib-support-modal__dialog {
		width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		padding: 1rem 0.75rem 0.85rem;
	}
}
