/* =========================================================
   Invitarte – Elementor QR & Calendar  |  widgets.css
   ========================================================= */

/* ── SLIDES / SWIPER – Safari iOS fix ──────────────────── */
/* Cede el pan vertical al browser y el horizontal a Swiper,
   evitando que Safari interprete el swipe como navegación. */
.elementor-widget-slides .swiper,
.elementor-widget-slides .swiper-container {
	touch-action: pan-y;
}


/* ── QR CODE ────────────────────────────────────────────── */
.invitarte-qr-wrap {
	display: block;
}

.invitarte-qr-canvas-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-sizing: border-box;
}

.invitarte-qr-canvas canvas,
.invitarte-qr-canvas img {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.invitarte-qr-label {
	margin: 8px 0 0;
	text-align: inherit;
}

/* ── ADD TO CALENDAR ─────────────────────────────────────── */
.invitarte-cal-wrap {
	display: block;
}

.invitarte-cal-container {
	position: relative;
	display: inline-block;
}

/* Main trigger button */
.invitarte-cal-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	border: 0 solid transparent;
	outline: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	padding: 12px 28px;
	border-radius: 8px;
	background-color: #5b3ef5;
	color: #ffffff;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
	user-select: none;
}

.invitarte-cal-trigger:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

.invitarte-cal-trigger:active {
	transform: translateY(0);
}

.invitarte-cal-trigger:focus-visible {
	outline: 3px solid rgba(91, 62, 245, 0.45);
	outline-offset: 2px;
}

.invitarte-cal-icon {
	display: inline-flex;
	align-items: center;
}

.invitarte-cal-chevron {
	font-size: 10px;
	line-height: 1;
	margin-left: 2px;
	transition: transform 0.2s ease;
}

.invitarte-cal-trigger[aria-expanded="true"] .invitarte-cal-chevron {
	transform: rotate(180deg);
}

/* Dropdown */
.invitarte-cal-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 9999;
	min-width: 220px;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	border: 1px solid rgba(0, 0, 0, 0.08);
	overflow: hidden;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.invitarte-cal-dropdown.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Dropdown options */
.invitarte-cal-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	text-decoration: none;
	color: #333333;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.15s ease;
}

.invitarte-cal-option:hover {
	background-color: #f3f0ff;
	text-decoration: none;
}

.invitarte-cal-option svg {
	flex-shrink: 0;
}

/* ── MARCO DECORATIVO ──────────────────────────────────── */
.invitarte-marco-decorativo {
	position: relative;
	width: 100%;
	height: 400px;
	pointer-events: none;
	overflow: visible;
}

.md-bg {
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.md-corner {
	position: absolute;
	width: 150px;
	height: auto;
	display: block;
	object-fit: contain;
	pointer-events: none;
}

.md-tl { top:    0; left:  0; }
.md-tr { top:    0; right: 0; }
.md-bl { bottom: 0; left:  0; }
.md-br { bottom: 0; right: 0; }

/* Modo fondo: la COLUMNA (no el widget-wrap) es el contexto de posicionamiento.
   El widget-wrap necesita height:100% para que el absolute hijo lo cubra correctamente.
   Sin esto, al salir el widget del flujo, el widget-wrap colapsa a 0 px
   y las esquinas inferiores (bottom:0) aparecen en la parte superior. */
.elementor-column:has(.md-modo-fondo) {
	position: relative !important;
}
.elementor-column:has(.md-modo-fondo) > .elementor-widget-wrap {
	height: 100% !important;
	min-height: 100% !important;
}

/* Contenedores flex (Elementor 3.6+): ya tienen position:relative por defecto */
.e-con:has(.md-modo-fondo) {
	position: relative !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
	.invitarte-cal-dropdown {
		left: 50%;
		transform: translateX(-50%) translateY(-6px);
		right: auto;
	}
	.invitarte-cal-dropdown.is-open {
		transform: translateX(-50%) translateY(0);
	}
}

/* -- COLOR CIRCLES --------------------------------------------- */
.inv-circles-wrap { display: flex; flex-wrap: wrap; align-items: center; }
.inv-circle { display: block; flex-shrink: 0; }
