/* =========================================================================
   AngebotsPiraten – Merkliste
   Schalter (.wish-btn), Hinweis (.wish-toast) und Listenseite (.wish-*).
   ========================================================================= */

/* --- Merk-Schalter ------------------------------------------------------- */
.wish-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	border: none; background: none; padding: 0; cursor: pointer;
	color: var(--ap-muted); font: inherit; font-weight: 700;
	transition: color .15s;
}
.wish-btn .icon { transition: transform .18s ease, fill .15s ease; }
.wish-btn:hover { color: var(--ap-pink); }
.wish-btn.is-on { color: var(--ap-pink); }
.wish-btn.is-on .icon { fill: currentColor; }
.wish-btn:focus-visible { outline: 2px solid var(--ap-pink); outline-offset: 3px; border-radius: 8px; }

/* Kurzer Impuls beim Merken – eine Rückmeldung, die man nicht lesen muss. */
.wish-btn.is-pop .icon { animation: wish-pop .32s ease; }
@keyframes wish-pop {
	0%   { transform: scale(1); }
	45%  { transform: scale(1.32); }
	100% { transform: scale(1); }
}

/* Der Schalter liegt absolut über dem Kartenbild – .tcard bringt die
   Positionierung mit, .card aus dem Basis-Theme nicht. */
.card[data-wish-id] { position: relative; }

/* Runder Schalter auf den Karten (ersetzt das frühere Deko-Herz). */
.wish-btn--card {
	position: absolute; top: 12px; right: 12px; z-index: 3;
	width: 38px; height: 38px; border-radius: 50%;
	background: rgba(255, 255, 255, .94); color: var(--ap-ink);
	box-shadow: 0 4px 12px rgba(10, 31, 78, .18);
	transition: background .15s, color .15s, transform .15s;
}
.wish-btn--card:hover { background: #fff; color: var(--ap-pink); transform: scale(1.06); }
.wish-btn--card.is-on { color: var(--ap-pink); }

/* Schalter in der Buchungsbox */
.wish-btn--box {
	width: 100%; justify-content: center; padding: 12px 0; margin-top: 12px;
	border-top: 1px solid var(--ap-line); border-radius: 0; font-size: 15px;
	color: var(--ap-ink);
}
.wish-btn--box:hover { color: var(--ap-pink); }

/* Zähler im Header */
.header-action__count.is-empty { opacity: .7; }

/* --- Hinweisleiste ------------------------------------------------------- */
.wish-toast {
	position: fixed; left: 50%; bottom: 26px; z-index: 120;
	display: flex; align-items: center; gap: 18px;
	padding: 13px 18px; border-radius: var(--ap-r);
	background: var(--ap-navy-d); color: #fff;
	box-shadow: 0 18px 44px rgba(6, 20, 50, .34);
	font-size: 14.5px; font-weight: 600;
	transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	max-width: calc(100vw - 32px);
}
.wish-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.wish-toast__text { min-width: 0; }
.wish-toast__action {
	flex: 0 0 auto; background: none; border: none; padding: 0; cursor: pointer;
	color: var(--ap-gold-2); font: inherit; font-weight: 800; text-decoration: underline;
}
.wish-toast__action:hover { color: #fff; }

/* --- Listenseite --------------------------------------------------------- */

/* display:flex/grid würde das UA-Stylesheet für [hidden] sonst überstimmen. */
.wish-head[hidden],
.wish-list[hidden],
.wish-empty[hidden] { display: none; }

.wish-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; flex-wrap: wrap; margin-bottom: 26px;
}
.wish-head__count { margin: 0; font-size: 17px; font-weight: 800; color: var(--ap-ink); }
.wish-head__clear { color: var(--ap-muted); }
.wish-head__clear:hover { color: var(--ap-pink); }

.wish-list .tcard { transition: opacity .2s ease, transform .2s ease; }
.wish-list .tcard.is-leaving { opacity: 0; transform: scale(.96); }

/* Platzhalter während des Nachladens */
.wish-skeletons { display: none; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.wish-page.is-loading .wish-skeletons { display: grid; }
.wish-skeletons span {
	display: block; border-radius: var(--ap-r-lg); background: #e9eff6;
	aspect-ratio: 4 / 3.2;
	animation: wish-pulse 1.1s ease-in-out infinite;
}
.wish-skeletons span:nth-child(2) { animation-delay: .12s; }
.wish-skeletons span:nth-child(3) { animation-delay: .24s; }
@keyframes wish-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Leerzustand */
.wish-empty {
	text-align: center; max-width: 560px; margin: 10px auto 0;
	padding: 46px 28px; background: #fff;
	border: 1px solid var(--ap-line); border-radius: var(--ap-r-lg);
	box-shadow: var(--ap-shadow);
}
.wish-empty__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 84px; height: 84px; border-radius: 50%; margin-bottom: 18px;
	background: #fdecf1; color: var(--ap-pink);
}
.wish-empty__title { margin: 0 0 10px; font-size: 25px; font-weight: 800; color: var(--ap-ink); }
.wish-empty__text { margin: 0 0 24px; color: var(--ap-muted); font-size: 16.5px; line-height: 1.6; }
.wish-empty__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.wish-error { margin: 0; padding: 20px; color: var(--ap-muted); font-weight: 600; }
.wish-note { margin-top: 40px; }

@media (max-width: 1080px) {
	.wish-skeletons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.wish-skeletons { grid-template-columns: 1fr; }
	.wish-toast { left: 16px; right: 16px; bottom: 16px; transform: translateY(18px); max-width: none; }
	.wish-toast.is-visible { transform: translateY(0); }
	.wish-empty { padding: 36px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.wish-btn.is-pop .icon,
	.wish-skeletons span { animation: none; }
}
