/*
 * Shared purchase modals: the unlock confirmation and the low-credits sheet.
 *
 * These lived in bn_private-content.css, which is loaded by exactly one page
 * — so every OTHER page that renders <LowCreditsModal /> was showing it with
 * no styles at all. The markup is shared, so the stylesheet has to be too.
 *
 * `.modal-overlay` is a generic name but it is defined nowhere else in the
 * project, so loading this file alongside any page stylesheet is safe.
 */

/* ========== UNLOCK MODAL ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.show {
  display: flex;
}

.unlock-modal {
  background: #000;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.65);
  width: 100%;
  max-width: 497px;
  overflow: hidden;
}

.ul-header {
  position: relative;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.ul-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/modal-purple-bg.png') center/cover no-repeat;
  pointer-events: none;
}

.ul-header > * {
  position: relative;
}

.ul-header img.lock {
  width: 32px;
  height: 32px;
}

.ul-header h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: #fff;
  text-align: center;
  padding: 0 48px;
  margin: 0;
}

.ul-header p {
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  text-align: center;
  padding: 0 48px;
  margin: 0;
}

.ul-body {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ul-info {
  background: var(--neutral-700);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ul-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  line-height: 20px;
}

.ul-info-row span:first-child {
  color: var(--neutral-400);
}

.ul-info-row span:last-child {
  color: #fff;
  text-align: right;
}

/* COST, with the discount spelled out beside it. */
.ul-cost {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ul-cost s {
  color: var(--red-400, #FF6186);
  font-size: 12px;
}

.ul-discount {
  background: var(--purple-800);
  color: var(--purple-300);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.ul-error {
  background: rgba(255, 97, 134, 0.1);
  border: 1px solid rgba(255, 97, 134, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ul-error img {
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(62%) sepia(88%) saturate(3000%) hue-rotate(320deg) brightness(100%) contrast(101%);
}

.ul-error a {
  color: var(--purple-400);
  text-decoration: none;
  font-weight: 600;
}

.ul-error a:hover {
  text-decoration: underline;
}

.ul-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.ul-actions button {
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.ul-actions button:hover {
  transform: translateY(-1px);
}

.ul-cancel {
  background: var(--neutral-700);
  color: #fff;
}

.ul-confirm {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.56);
}

/* ========== LOW CREDITS MODAL ========== */
.low-credits-modal {
  background: #000;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.65);
  width: 100%;
  max-width: 497px;
  overflow: hidden;
}

.lc-header {
  position: relative;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-800) 100%);
}

.lc-header img.flash {
  width: 32px;
  height: 32px;
}

.lc-header h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: #fff;
  text-align: center;
  padding: 0 24px;
  margin: 0;
}

.lc-header p {
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  text-align: center;
  padding: 0 24px;
  margin: 0;
}

.lc-body {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lc-info {
  background: var(--neutral-700);
  border-radius: 12px;
  padding: 16px;
}

.lc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  line-height: 20px;
}

.lc-info-row span:first-child {
  color: var(--neutral-400);
}

.lc-info-row span:last-child {
  color: #fff;
  text-align: right;
  font-weight: 600;
}

.lc-packages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lc-package {
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.lc-package:hover {
  border-color: var(--neutral-600);
}

.lc-package.highlight {
  background: var(--purple-900);
  border-color: var(--purple-700);
}

.lc-coin {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.lc-package-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lc-package-credits {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.lc-package-price {
  font-size: 14px;
  color: var(--neutral-400);
}

.lc-package-bonus {
  background: var(--purple-700);
  color: var(--purple-300);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
}

.lc-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.lc-actions button {
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.lc-actions button:hover {
  transform: translateY(-1px);
}

.lc-cancel {
  background: var(--neutral-700);
  color: #fff;
}

.lc-confirm {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.56);
}

/* Reassurance above the Cancel/Confirm pair: this page cannot know which
   albums are already owned, so it says re-confirming costs nothing rather
   than leaving the user to guess. Deliberately neutral — the red .ul-error
   treatment would read as a warning about the purchase itself. */
.ul-note {
  background: rgba(204, 149, 255, 0.08);
  border: 1px solid rgba(204, 149, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--neutral-300);
}

.ul-note img {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  /* Tint the icon to the purple accent so it matches the panel. */
  filter: brightness(0) saturate(100%) invert(72%) sepia(35%) saturate(1200%) hue-rotate(230deg) brightness(105%) contrast(101%);
}
