/* Widget interactivo "Tirar las cartas" (single-tirada.php) */

.ct-draw-widget{ text-align: center; padding: 30px 0 10px; }
.ct-draw-widget--empty{ padding: 30px; color: var(--ct-muted); }

/* ---------- Posiciones vacías de la tirada (fila) ---------- */
.ct-draw-widget__slots{
	display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
	min-height: 60px; align-items: flex-start; margin-bottom: 10px;
	perspective: 1200px;
}
.ct-draw-widget__slots:empty{ display: none; }

.ct-slot{ display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ct-slot__label{
	font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
	color: var(--ct-muted); max-width: 130px; text-align: center; line-height: 1.3;
}
.ct-slot__card{
	width: 110px; height: 160px;
	border-radius: 14px;
	border: 1px dashed var(--ct-line);
	background: rgba(255,255,255,.015);
}
.ct-slot.is-filled .ct-slot__card{ border-style: solid; border-color: transparent; }
.ct-slot__card .ct-draw-card{ width: 100%; height: 100%; }

/* ---------- Layout especial: Cruz Celta (cruz + bastón) ---------- */
.ct-draw-widget__slots--celtic{
	display: grid;
	grid-template-columns: 110px 110px 110px 40px 110px;
	grid-template-rows: repeat(4, 160px);
	grid-template-areas:
		".     above  .      .    staff4"
		"left  center right  .    staff3"
		".     below  .      .    staff2"
		".     .      .      .    staff1";
	gap: 26px 16px;
	justify-content: center;
	overflow-x: auto;
	padding-bottom: 10px;
}
.ct-draw-widget__slots--celtic .ct-slot{ position: relative; }
.ct-draw-widget__slots--celtic .ct-slot--cross{
	z-index: 2;
	align-self: center; justify-self: center;
}
.ct-draw-widget__slots--celtic .ct-slot--cross .ct-slot__card{ transform: rotate(90deg); }
.ct-draw-widget__slots--celtic .ct-slot--cross .ct-slot__label{ position: absolute; bottom: -26px; background: var(--ct-secondary); padding: 2px 6px; border-radius: 6px; }

@media (max-width: 760px){
	.ct-draw-widget__slots--celtic{
		grid-template-columns: 95px 95px 95px 30px 95px;
		grid-template-rows: repeat(4, 140px);
	}
	.ct-draw-widget__slots--celtic .ct-slot__card{ width: 95px; height: 140px; }
}

/* ---------- Mazo para elegir las cartas ---------- */
.ct-draw-widget__deck{
	display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
	max-width: 720px; margin: 0 auto 24px;
}
.ct-deck-card{
	width: 56px; height: 86px;
	border-radius: 8px;
	border: 1px solid var(--ct-line);
	background:
		repeating-linear-gradient(45deg, rgba(217,180,100,.08) 0 6px, transparent 6px 12px),
		linear-gradient(160deg, var(--ct-card-2), var(--ct-primary));
	color: var(--ct-accent);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	transition: transform .15s ease, opacity .3s ease;
	animation: ct-card-appear .3s ease both;
}
.ct-deck-card:hover:not(:disabled){ transform: translateY(-4px); }
.ct-deck-card.is-picked{ opacity: 0; transform: scale(.7); pointer-events: none; }
.ct-deck-card:disabled{ cursor: default; }

@keyframes ct-card-appear{ from{ opacity: 0; transform: translateY(16px) scale(.92); } to{ opacity: 1; transform: translateY(0) scale(1); } }

.ct-draw-card{
	width: 100%; height: 100%;
	cursor: default;
}
.ct-draw-card.is-dealt{ animation: ct-card-deal .45s ease both; }
@keyframes ct-card-deal{ from{ opacity: 0; transform: scale(.6) rotate(-6deg); } to{ opacity: 1; transform: scale(1) rotate(0); } }

.ct-draw-card__inner{
	position: relative; width: 100%; height: 100%;
	transform-style: preserve-3d;
	transition: transform .6s cubic-bezier(.4,.2,.2,1);
}
.ct-draw-card.is-flipped .ct-draw-card__inner{ transform: rotateY(180deg); }

.ct-draw-card__back, .ct-draw-card__front{
	position: absolute; inset: 0;
	backface-visibility: hidden;
	border-radius: 14px;
	border: 1px solid var(--ct-line);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 14px; text-align: center;
	box-shadow: var(--ct-shadow);
}
.ct-draw-card__back{
	background:
		repeating-linear-gradient(45deg, rgba(217,180,100,.08) 0 8px, transparent 8px 16px),
		linear-gradient(160deg, var(--ct-card-2), var(--ct-primary));
	color: var(--ct-accent);
	font-size: 2rem;
}
.ct-draw-card__front{
	background: linear-gradient(160deg, #2a2250, #171030);
	transform: rotateY(180deg);
	gap: 8px;
}
.ct-draw-card__front img{ width: 70px; height: 70px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.ct-draw-card__placeholder{ font-size: 1.8rem; color: var(--ct-accent); }
.ct-draw-card__front strong{ font-size: .92rem; }
.ct-draw-card__front a{ font-size: .78rem; color: var(--ct-accent); text-decoration: underline; }

.ct-draw-widget__hint{ color: var(--ct-muted); font-size: .88rem; margin-top: 14px; }

.ct-draw-card.is-reversed .ct-draw-card__front img{ transform: rotate(180deg); }
.ct-draw-card__front em{
	font-style: normal; font-size: .7rem; color: var(--ct-accent);
	border: 1px solid var(--ct-line); border-radius: 999px; padding: 2px 10px;
}

@media (max-width: 560px){
	.ct-draw-card{ width: 120px; height: 180px; }
}

/* ---------- Resultado de la tirada ---------- */
.ct-result{ margin-top: 50px; text-align: left; }
.ct-result__title{ text-align: center; font-size: 1.5rem; margin-bottom: 8px; }
.ct-result__intro{ text-align: center; color: var(--ct-muted); max-width: 560px; margin: 0 auto 34px; }

.ct-result__cards{ display: flex; flex-direction: column; gap: 22px; margin-bottom: 40px; }
.ct-result-card{
	background: var(--ct-card); border: 1px solid var(--ct-line); border-radius: var(--ct-radius);
	padding: 24px 28px;
}
.ct-result-card__position{
	display: inline-block; margin-bottom: 10px;
	color: var(--ct-accent); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}
.ct-result-card h3{ margin: 0 0 10px; font-size: 1.2rem; }
.ct-result-card h3 em{ color: var(--ct-muted); font-style: normal; font-size: .85rem; }
.ct-result-card p{ color: #e7e0f2; margin: 0 0 12px; }
.ct-result-card a{ color: var(--ct-accent); font-size: .88rem; font-weight: 600; }

.ct-result__share{
	text-align: center; padding: 28px;
	background: linear-gradient(135deg, var(--ct-primary), var(--ct-card-2));
	border: 1px solid var(--ct-line); border-radius: var(--ct-radius-lg);
}
.ct-result__share p{ color: var(--ct-muted); margin-bottom: 16px; }
.ct-result__share-buttons{ display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ct-share-btn{
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600;
	border: 1px solid var(--ct-line); background: var(--ct-secondary); color: var(--ct-ink);
}
.ct-share-btn .ct-icon{ width: 18px; height: 18px; }
.ct-share-btn--whatsapp{ color: #25D366; }
.ct-share-btn--facebook{ color: #6f9adf; }
.ct-share-btn:hover{ border-color: var(--ct-accent); }
