/* ---------------------------------------------------------------------------
   V2 additions: premium CTA, offline pack UI, and small polish that the legacy
   sheets do not cover. Loaded on every page after the base styles.
   --------------------------------------------------------------------------- */

#premium-promo {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9000;
  display: flex;
  justify-content: center;
  padding: 0 clamp(12px, 3vw, 24px) clamp(12px, 3vw, 24px);
  pointer-events: none;
}

/* Same recipe as the header bar, the cards and the sign-in dialog: a white
   glass card, a soft border, the brand accent and the two button styles used
   everywhere else. */
.premium-promo-inner {
  pointer-events: auto;
  width: min(34rem, 100%);
  display: flex;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  padding: 14px 16px;
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(51, 51, 51, 0.1);
  border-left: 3px solid var(--linkedin-color);
  border-radius: 16px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
  color: var(--dark-gray);
  font-size: 0.92rem;
  animation: premium-promo-in 0.18s ease-out;
}

.premium-promo-inner p {
  flex: 1 1 14rem;
  margin: 0;
  line-height: 1.45;
}

.premium-promo-inner strong {
  color: var(--linkedin-color);
  font-weight: 700;
}

.premium-promo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.premium-promo-actions button {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* first offer: the brand gradient, as the stats tabs and the sign-in button */
.premium-promo-actions button[data-premium='offline'] {
  background-image: linear-gradient(90deg, var(--linkedin-color), var(--interpol-color));
  color: #fff;
}

.premium-promo-actions button[data-premium='offline']:hover {
  filter: brightness(1.06);
}

/* second offer: the quiet solid button of the sign-in dialog */
.premium-promo-actions button[data-premium='adfree'] {
  background-color: var(--dark-gray);
  color: #fff;
}

.premium-promo-actions button[data-premium='adfree']:hover {
  background-color: #555;
}

.premium-promo-actions button[data-premium='dismiss'] {
  padding: 9px 10px;
  background: transparent;
  color: #6b7280;
  font-weight: 500;
}

.premium-promo-actions button[data-premium='dismiss']:hover {
  color: var(--dark-gray);
}

@keyframes premium-promo-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-promo-inner {
    animation: none;
  }
}

/* Premium / store --------------------------------------------------------- */

/* The page shell of /premium lives in store.css; the cards below are shared
   with the in-game upsell, so they stay in the sheet every page loads. */

.premium-offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.premium-card {
  background: #fff;
  border: 1px solid #dfe3f5;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.premium-card h3 {
  margin: 0;
  font-size: 18px;
}

.premium-card .price {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
}

.premium-card ul {
  margin: 0;
  padding-left: 18px;
  color: #444a6d;
  font-size: 14px;
  line-height: 1.6;
}

.premium-card button {
  margin-top: auto;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  background: #0a66c2;
  color: #fff;
}

.premium-card button[disabled] {
  opacity: 0.6;
  cursor: default;
}

.premium-owned {
  color: #1c7c48;
  font-weight: 600;
}

#offline-progress {
  margin-top: 12px;
  font-size: 13px;
  color: #444a6d;
}

/* Bundle card (the upsell), tip buttons, and the primary price ------------ */

.premium-card--featured {
  position: relative;
  grid-column: 1 / -1;
  border-color: rgba(0, 119, 181, 0.35);
  box-shadow: 0 12px 28px rgba(0, 119, 181, 0.14);
  background-image: linear-gradient(180deg, rgba(0, 119, 181, 0.07), rgba(255, 255, 255, 0));
}

.premium-badge {
  position: absolute;
  top: -0.7rem;
  left: 1.25rem;
  margin: 0;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background-image: linear-gradient(90deg, var(--linkedin-color), var(--interpol-color));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.premium-card--featured .price {
  color: var(--linkedin-color);
  font-size: 2rem;
}

.premium-save {
  margin: 0 0 12px;
  color: #5c6675;
  font-size: 0.85rem;
}

.premium-tips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.premium-tips-row button {
  min-height: 44px;
  border: 1px solid #cfd3e6;
  border-radius: 999px;
  background-color: #fff;
  color: var(--dark-gray);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 9px 18px;
  cursor: pointer;
}

.premium-tips-row button:hover {
  border-color: var(--linkedin-color);
  color: var(--linkedin-color);
}

/* Mobile-first tweaks ------------------------------------------------------ */

@media (max-width: 640px) {
  .premium-promo-inner {
    font-size: 0.85rem;
  }
  .premium-promo-actions {
    width: 100%;
  }
  .premium-promo-actions button {
    flex: 1 1 auto;
  }
}
