/* -----------------------------------------------------------
   Tunabelly Purchase Toasts
   ----------------------------------------------------------- */

#tbs-purchase-popups {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: min(400px, calc(100vw - 40px));
}


/* -----------------------------------------------------------
   Toast Container
   ----------------------------------------------------------- */

.tbs-toast {
  pointer-events: auto;

  border-radius: 16px;
  padding: 14px;

  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.94);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 12px 34px rgba(0,0,0,0.15),
    0 2px 6px rgba(0,0,0,0.06);

  font: 13.5px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #111;

  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: start;

  transform: translateY(12px);
  opacity: 0;
  transition:
    transform 240ms cubic-bezier(.2,.8,.2,1),
    opacity 240ms ease,
    box-shadow 200ms ease;

  overflow: hidden;
}

.tbs-toast.tbs-toast-show {
  transform: translateY(0);
  opacity: 1;
}


/* -----------------------------------------------------------
   Avatar
   ----------------------------------------------------------- */

.tbs-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;

  background:
    linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.08));

  display: grid;
  place-items: center;
}

.tbs-avatar svg {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}


/* -----------------------------------------------------------
   Title
   ----------------------------------------------------------- */

.tbs-title {
  font-weight: 520;
  margin: 0;
  letter-spacing: -0.01em;
  color: rgba(0,0,0,0.88);
}

.tbs-title strong {
  font-weight: 620;
  color: rgba(0,0,0,0.95);
}

/* spacing between title + chips */
.tbs-meta {
  margin-top: 7px;   /* increased spacing */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}


/* -----------------------------------------------------------
   Product Link
   ----------------------------------------------------------- */

.tbs-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.14);
  transition: border-color 140ms ease;
}

.tbs-title a:hover {
  border-bottom-color: rgba(0,0,0,0.35);
}


/* -----------------------------------------------------------
   Chips (country / time)
   ----------------------------------------------------------- */

.tbs-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;

  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.75);

  font-weight: 500;
  letter-spacing: 0.01em;
}

.tbs-flag {
  font-size: 14px;
  margin-right: 4px;
  line-height: 1;
}


/* -----------------------------------------------------------
   Close Button
   ----------------------------------------------------------- */

.tbs-close {
  border: 0;
  background: transparent;
  cursor: pointer;

  font-size: 16px;
  line-height: 1;
  padding: 3px 6px;

  color: rgba(0,0,0,0.55);
  transition: color 140ms ease;
}

.tbs-close:hover {
  color: rgba(0,0,0,0.85);
}


/* -----------------------------------------------------------
   Progress Bar
   ----------------------------------------------------------- */

.tbs-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2.5px;
  width: 100%;
  background: rgba(0,0,0,0.08);
}

.tbs-progress > div {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  background: linear-gradient(90deg,
      rgba(0,0,0,0.28),
      rgba(0,0,0,0.18)
  );
  transition: transform linear;
}


/* -----------------------------------------------------------
   Hover Elevation
   ----------------------------------------------------------- */

@media (hover: hover) {
  .tbs-toast:hover {
    transform: translateY(-2px);
    box-shadow:
      0 16px 44px rgba(0,0,0,0.18),
      0 4px 10px rgba(0,0,0,0.10);
  }
}


/* -----------------------------------------------------------
   Dark Mode
   ----------------------------------------------------------- */

@media (prefers-color-scheme: dark) {

  .tbs-toast {
    background: rgba(26,26,26,0.92);
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.92);

    box-shadow:
      0 14px 38px rgba(0,0,0,0.60),
      0 3px 8px rgba(0,0,0,0.45);
  }

  .tbs-avatar {
    background: rgba(255,255,255,0.08);
  }

  .tbs-title a {
    border-bottom-color: rgba(255,255,255,0.16);
  }

  .tbs-title {
    color: rgba(255,255,255,0.85);
  }

  .tbs-title strong {
    color: rgba(255,255,255,0.95);
  }

  .tbs-title a:hover {
    border-bottom-color: rgba(255,255,255,0.40);
  }

  .tbs-chip {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
  }

  .tbs-close {
    color: rgba(255,255,255,0.65);
  }

  .tbs-close:hover {
    color: rgba(255,255,255,0.95);
  }

  .tbs-progress {
    background: rgba(255,255,255,0.10);
  }

  .tbs-progress > div {
    background: linear-gradient(90deg,
      rgba(255,255,255,0.30),
      rgba(255,255,255,0.18)
    );
  }
}


/* -----------------------------------------------------------
   Reduced Motion
   ----------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .tbs-toast {
    transition: none;
  }

  .tbs-progress > div {
    transition: none;
  }
}