/* =========================================================================
   FretboardU — billing.css
   Styles for the upgrade modal built by js/billing.js. Uses the same custom
   properties as style.css so it inherits the app's theme automatically.
   ========================================================================= */

.billing-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.billing-modal.hidden { display: none !important; }

.billing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}

.billing-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.billing-panel h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  color: var(--text);
}

.billing-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.billing-close:hover { color: var(--accent); }

.billing-note {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

/* Plans sit side by side when there is room and stack on a phone. auto-fit
   rather than a fixed column count means one plan fills the width instead of
   sitting in a lonely half. */
.billing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 4px 0 16px;
}

.billing-plan {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.billing-plan h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.billing-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.billing-price strong {
  font-size: 1.5rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.billing-price span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Push the button to the bottom so buttons line up across plans of
   differing description length. */
.billing-plan .primary-btn { margin-top: auto; }

@media (max-width: 520px) {
  .billing-panel { padding: 20px 18px 18px; }
}
