/* ============================================================
   Wishlist: floating pill + slide-out drawer
   Scoped under .wishlist-* / .wl-* so it can't touch other sections.
   ============================================================ */

.wishlist-pill {
  position: fixed;
  right: 24px;
  bottom: 130px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: #1a6faa;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26, 111, 170, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wishlist-pill:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 12px 28px rgba(26, 111, 170, 0.45);
}

.wishlist-pill:focus-visible {
  outline: 3px solid #b8d9f3;
  outline-offset: 2px;
}

.wishlist-pill .wl-pill-count {
  background: #fff;
  color: #1a6faa;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 12.5px;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}

.wishlist-pill.is-bumping {
  animation: wlBump 0.45s ease;
}

@keyframes wlBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ---------- Scrim ---------- */
.wishlist-scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 60, 0.38);
  z-index: 1250;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wishlist-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- Drawer ---------- */
.wishlist-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 384px;
  max-width: 100%;
  z-index: 1300;
  background: #fff;
  box-shadow: -12px 0 40px rgba(16, 42, 60, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.wishlist-drawer.is-open {
  transform: translateX(0);
}

.wishlist-drawer .wl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #dce3e8;
}

.wishlist-drawer .wl-head h2 {
  margin: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #263238;
}

.wishlist-drawer .wl-head-icon {
  color: #1a6faa;
  flex: none;
}

.wl-head-count {
  background: #e8f4fd;
  color: #1a6faa;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.wl-icon-btn {
  border: 0;
  background: transparent;
  color: #7b8f9a;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  padding: 0;
}

.wl-icon-btn:hover {
  background: #eceff1;
  color: #263238;
}

.wishlist-drawer .wl-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishlist-drawer .wl-foot {
  border-top: 1px solid #dce3e8;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.wl-foot-line {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #4f6470;
  font-variant-numeric: tabular-nums;
}

.wl-btn-block {
  display: block;
  border: 0;
  background: #1a6faa;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  height: 44px;
  line-height: 44px;
  border-radius: 12px;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.wl-btn-block:hover {
  color: #fff;
  background: #15628f;
}

.wl-btn-ghost {
  display: block;
  border: 0;
  background: transparent;
  color: #4f6470;
  font-family: inherit;
  font-size: 12.5px;
  height: 32px;
  line-height: 32px;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.wl-btn-ghost:hover {
  color: #263238;
}

/* ---------- Service fee (drawer footer) ---------- */
.wl-fee-amount {
  font-weight: 600;
  color: #1a6faa;
  font-size: 14px;
}

.wl-fee-paid {
  font-weight: 600;
  color: #2a7a2a;
}

.wl-fee-note {
  margin: 0;
  font-size: 11px;
  color: #7b8f9a;
  line-height: 1.4;
}

.wl-fee-approx {
  font-size: 11.5px;
  color: #7b8f9a;
  margin-top: -4px;
}

.wl-fee-error {
  margin: 0;
  background: #fdf3d7;
  color: #856404;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.45;
}

/* ---------- Allowance summary + country groups ---------- */
.wl-allowance {
  margin: 0;
  padding: 8px 12px;
  background: #e8f4fd;
  color: #1a6faa;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.wl-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.wl-group-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7b8f9a;
}

.wl-group-count {
  font-size: 11px;
  font-weight: 600;
  color: #2a7a2a;
  background: #e8fbe8;
  border-radius: 999px;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

.wl-group-count.is-full {
  color: #856404;
  background: #fdf3d7;
}

/* ---------- Items ---------- */
.wl-item {
  border: 1px solid #dce3e8;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.wl-item-crest {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #e8f4fd;
  color: #1a6faa;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
}

.wl-item-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wl-item-main {
  min-width: 0;
}

.wl-item-main h4 {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #263238;
}

.wl-item-main h4 a {
  color: inherit;
  text-decoration: none;
}

.wl-item-main h4 a:hover {
  color: #1a6faa;
}

.wl-item-main p {
  margin: 0;
  font-size: 11.5px;
  color: #7b8f9a;
  line-height: 1.45;
}

.wl-item-price {
  margin: 6px 0 0 !important;
  font-size: 13px !important;
  font-weight: 600;
  color: #263238 !important;
  font-variant-numeric: tabular-nums;
}

.wl-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.wl-btn-mini {
  border: 1.5px solid #3e8cc4;
  background: transparent;
  color: #1a6faa;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.3;
}

.wl-btn-mini:hover {
  background: #e8f4fd;
  color: #1a6faa;
}

/* ---------- Empty state ---------- */
.wl-empty {
  text-align: center;
  color: #7b8f9a;
  padding: 48px 16px;
  font-size: 13px;
}

.wl-empty svg {
  color: #dce3e8;
  margin-bottom: 10px;
}

.wl-empty p {
  margin: 0 0 2px;
}

/* ---------- "In wishlist" state on course cards ---------- */
.js-wish-toggle {
  gap: 6px;
  background: transparent;
}

.js-wish-toggle .wl-tick {
  display: none;
}

.js-wish-toggle.is-saved {
  color: #2a7a2a !important;
}

.js-wish-toggle.is-saved .wl-tick {
  display: inline;
}

.js-wish-toggle.is-saved .wl-plus {
  display: none;
}

.js-wish-toggle .wl-label-saved {
  display: none;
}

.js-wish-toggle.is-saved .wl-label-saved {
  display: inline;
}

.js-wish-toggle.is-saved .wl-label-add {
  display: none;
}

.js-wish-toggle[disabled] {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 680px) {
  .wishlist-pill {
    right: 14px;
    bottom: 14px;
    padding: 12px 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wishlist-pill,
  .wishlist-scrim,
  .wishlist-drawer {
    transition-duration: 0.01ms;
  }

  .wishlist-pill.is-bumping {
    animation-duration: 0.01ms;
  }
}
