/* ---------------------------------------------------------------------------
   cart.css — the /cart page.  SOURCE: pages/cart_06.txt (authored page).

   Rules VERBATIM apart from the three marked below.

   NOTE ON `.in-cart-badge`: that is the small "✓ In Cart" pill shown on an item
   row. It is NOT the header cart badge, which is `.rb-cart-badge` in
   chrome.css. Different things, similar names — do not merge them.
   --------------------------------------------------------------------------- */

:root {
  --primary-color: #1DB954;
  --primary-hover: #1ed760;
  --background: #0a0a0a;
  --surface: #1a1a1a;
  --surface-elevated: #2a2a2a;
  --border: #333;
  --text-primary: #ffffff;
  --text-secondary: #999;
  --text-on-primary: #000;
  --error: #ff4444;
  --warning: #FFD700;
  --font-family: HelveticaNeue, Arial, 'Open Sans', 'PT Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; /* was -apple-system/Segoe UI/Roboto */
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
  --radius-md: 12px;
}
/* Global `*` reset removed — theme-black.css sets it site-wide. */
/* The page's own `body` rule removed — it set a different font stack from
   the rest of the site. The shell owns body type, colour and background.
   --font-family below is repointed at the site stack. */
.page-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-md) 120px var(--spacing-md); }
.page-header { margin-bottom: var(--spacing-lg); }
.page-title { font-size: 36px; font-weight: 700; color: var(--text-primary) !important; margin-bottom: 8px; }
.page-subtitle { font-size: 16px; color: var(--text-secondary) !important; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-md); padding-bottom: var(--spacing-sm); border-bottom: 2px solid var(--border); }
.section-title { font-size: 24px; font-weight: 700; color: var(--text-primary) !important; }
.item-count { font-size: 14px; color: var(--text-secondary) !important; background: var(--surface-elevated); padding: 6px 12px; border-radius: 20px; }
.cart-section { margin-bottom: var(--spacing-xl); }
.favorites-section { margin-bottom: var(--spacing-xl); }
.cart-empty { text-align: center; padding: var(--spacing-xl); background: var(--surface); border-radius: var(--radius-md); border: 2px dashed var(--border); }
.empty-icon { font-size: 64px; margin-bottom: var(--spacing-md); color: var(--text-primary) !important; }
.empty-title { font-size: 24px; font-weight: 700; color: var(--text-primary) !important; margin-bottom: 8px; }
.empty-subtitle { font-size: 16px; color: var(--text-secondary) !important; margin-bottom: var(--spacing-md); }
.browse-btn { display: inline-block; background: var(--primary-color) !important; color: var(--text-on-primary) !important; padding: 12px 32px; border-radius: 30px; text-decoration: none !important; font-weight: 600; transition: all 0.2s ease; }
.browse-btn:hover { background: var(--primary-hover) !important; transform: translateY(-2px); }
.items-list { display: flex; flex-direction: column; gap: var(--spacing-sm); }
.item-row { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: flex; align-items: center; gap: 16px; transition: all 0.3s ease; }
.item-row:hover { border-color: var(--primary-color); box-shadow: 0 4px 16px rgba(29, 185, 84, 0.2); }
.item-thumbnail-container { position: relative; width: 60px; height: 60px; flex-shrink: 0; background: #000; border-radius: 8px; overflow: hidden; }
.item-thumbnail { width: 100%; height: 100%; object-fit: cover; }
.item-play-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: var(--primary-color) !important; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); opacity: 0; z-index: 5; }
.item-row:hover .item-play-button { opacity: 1; }
.item-play-button:hover { background: var(--primary-hover) !important; transform: translate(-50%, -50%) scale(1.1); }
.item-play-button.playing { background: var(--primary-hover) !important; opacity: 1; }
.play-icon { width: 0; height: 0; border-left: 12px solid var(--text-on-primary); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 2px; }
.pause-icon { display: none; width: 12px; height: 16px; border-left: 4px solid var(--text-on-primary); border-right: 4px solid var(--text-on-primary); }
.item-play-button.playing .play-icon { display: none; }
.item-play-button.playing .pause-icon { display: block; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 16px; font-weight: 700; color: var(--text-primary) !important; margin-bottom: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-credits { font-size: 14px; color: var(--primary-color) !important; font-weight: 600; }
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.item-btn { padding: 8px 20px; border-radius: 24px; font-size: 14px; font-weight: 600; font-family: var(--font-family); cursor: pointer; transition: all 0.2s ease; border: 2px solid; white-space: nowrap; }
.move-to-cart-btn { background: var(--primary-color) !important; color: var(--text-on-primary) !important; border-color: var(--primary-color) !important; }
.move-to-cart-btn:hover { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; }
.move-to-favorites-btn { background: transparent !important; color: var(--text-primary) !important; border-color: var(--border) !important; }
.move-to-favorites-btn:hover { background: var(--surface-elevated) !important; border-color: var(--text-primary) !important; }
.remove-btn { background: transparent !important; color: var(--error) !important; border-color: var(--error) !important; flex: 0 0 auto; min-width: 80px; }
.remove-btn:hover { background: var(--error) !important; color: var(--text-primary) !important; }
.item-row.item-owned { border-color: #4CAF50; background: rgba(76, 175, 80, 0.05); }
.item-row.item-in-cart { border-color: var(--primary-color); background: rgba(29, 185, 84, 0.05); }
.owned-badge { background: rgba(76, 175, 80, 0.2) !important; color: #4CAF50 !important; border-color: #4CAF50 !important; cursor: default; }
.in-cart-badge { background: rgba(29, 185, 84, 0.2) !important; color: var(--primary-color) !important; border-color: var(--primary-color) !important; cursor: default; }
.summary-panel { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-md); padding: var(--spacing-lg); position: sticky; top: 20px; }
.summary-title { font-size: 20px; font-weight: 700; color: var(--text-primary) !important; margin-bottom: var(--spacing-md); padding-bottom: var(--spacing-sm); border-bottom: 2px solid var(--border); }
.credit-balance-hero { background: rgba(29, 185, 84, 0.1); border: 2px solid var(--primary-color); border-radius: var(--radius-md); padding: 16px; text-align: center; margin-bottom: var(--spacing-md); }
.credit-balance-hero.logged-out-hero { background: rgba(255, 68, 68, 0.08); border-color: var(--error); }
.credit-balance-label { font-size: 12px; color: var(--text-secondary) !important; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.credit-balance-value { font-size: 32px; font-weight: 700; color: var(--primary-color) !important; }
.credit-balance-value.loading { font-size: 16px; color: var(--text-secondary) !important; }
.credit-balance-value.logged-out { font-size: 20px; color: var(--error) !important; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14px; }
.summary-label { color: var(--text-secondary) !important; }
.summary-value { color: var(--text-primary) !important; font-weight: 600; }
.summary-row.cart-total-row { margin-top: var(--spacing-sm); padding-top: var(--spacing-md); border-top: 2px solid var(--border); }
.summary-row.cart-total-row .summary-label { font-size: 14px; font-weight: 600; color: var(--text-secondary) !important; }
.summary-row.cart-total-row .summary-value { font-size: 18px; font-weight: 700; color: var(--text-primary) !important; }
.summary-row.after-redemption-row { padding-top: 8px; }
.summary-row.after-redemption-row .summary-label { font-size: 13px; color: var(--text-secondary) !important; }
.summary-row.after-redemption-row .summary-value { font-size: 14px; font-weight: 600; }
.summary-row.after-redemption-row .summary-value.positive { color: var(--primary-color) !important; }
.summary-row.after-redemption-row .summary-value.negative { color: var(--error) !important; }
.balance-status { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius-md); margin-top: var(--spacing-md); font-size: 14px; font-weight: 600; background: rgba(29, 185, 84, 0.1); color: var(--primary-color) !important; border: 2px solid var(--primary-color); }
.insufficient-panel { margin-top: var(--spacing-md); background: rgba(255, 68, 68, 0.05); border: 2px solid var(--error); border-radius: var(--radius-md); padding: 20px; display: none; }
.insufficient-panel.active { display: block; }
.insufficient-header { font-size: 15px; font-weight: 700; color: var(--error) !important; margin-bottom: 20px; text-align: center; line-height: 1.4; }
.credit-options { display: flex; flex-direction: column; gap: 16px; }
.credit-option { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-md); padding: 14px; transition: all 0.2s ease; position: relative; }
.credit-option:hover { border-color: var(--primary-color); }
.credit-option.recommended { border-color: var(--primary-color); background: rgba(29, 185, 84, 0.05); }
.credit-option.no-button { background: transparent; border: none; padding: 10px 0; }
.option-badge { position: absolute; top: -10px; left: 12px; background: var(--primary-color); color: var(--text-on-primary); padding: 4px 10px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.option-title { font-size: 14px; font-weight: 700; color: var(--text-primary) !important; margin-bottom: 10px; }
.credit-option.no-button .option-title { margin-bottom: 0; }
.option-btn { width: 100%; background: var(--primary-color) !important; color: var(--text-on-primary) !important; border: none; padding: 10px; border-radius: 24px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-family); }
.option-btn:hover { background: var(--primary-hover) !important; }
.login-prompt { display: none; margin-top: var(--spacing-md); background: rgba(255, 68, 68, 0.06); border: 2px solid var(--error); border-radius: var(--radius-md); padding: 20px; text-align: center; }
.login-prompt.active { display: block; }
.login-prompt-title { font-size: 15px; font-weight: 700; color: var(--error) !important; margin-bottom: 14px; line-height: 1.4; }
.login-prompt-btn { display: block; width: 100%; background: var(--primary-color) !important; color: var(--text-on-primary) !important; padding: 14px; border-radius: 24px; text-decoration: none !important; font-weight: 700; font-size: 15px; }
.login-prompt-btn:hover { background: var(--primary-hover) !important; }
.login-prompt-new { margin-top: 14px; font-size: 13px; color: var(--text-secondary) !important; }
.login-prompt-new a { color: var(--primary-color) !important; text-decoration: none !important; font-weight: 600; }
.redeem-btn { width: 100%; background: var(--primary-color) !important; color: var(--text-on-primary) !important; border: none; padding: 16px; border-radius: 30px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: var(--spacing-md); font-family: var(--font-family); }
.redeem-btn:hover:not(:disabled) { background: var(--primary-hover) !important; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4); }
.redeem-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.redeem-btn.loading { opacity: 0.7; cursor: wait; }
.success-message { display: none; background: rgba(29, 185, 84, 0.1); border: 2px solid var(--primary-color); border-radius: var(--radius-md); padding: var(--spacing-md); margin-top: var(--spacing-md); text-align: center; }
.success-message.active { display: block; }
.success-icon { font-size: 48px; margin-bottom: 12px; }
.success-title { font-size: 18px; font-weight: 700; color: var(--primary-color) !important; margin-bottom: 8px; }
.success-text { font-size: 14px; color: var(--text-secondary) !important; margin-bottom: 16px; }
.success-link { display: inline-block; background: var(--primary-color) !important; color: var(--text-on-primary) !important; padding: 12px 24px; border-radius: 24px; text-decoration: none !important; font-weight: 600; font-size: 14px; }
.success-link:hover { background: var(--primary-hover) !important; }
.cart-layout { display: grid; grid-template-columns: 1fr 350px; gap: var(--spacing-lg); align-items: start; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); z-index: 9998; }
.modal-overlay.active { display: block; }
.credit-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-md); padding: 32px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; z-index: 9999; }
.credit-modal.active { display: block; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.modal-title { font-size: 24px; font-weight: 700; color: var(--text-primary) !important; margin: 0; }
.modal-close { background: transparent; border: none; color: var(--text-secondary) !important; font-size: 32px; cursor: pointer; padding: 0; width: 32px; height: 32px; }
.modal-close:hover { color: var(--text-primary) !important; }
.modal-subtitle { font-size: 14px; color: var(--text-secondary) !important; margin-bottom: 24px; }
.bundles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.credit-bundle { background: var(--surface-elevated); border: 2px solid var(--border); border-radius: var(--radius-md); padding: 20px 16px; text-align: center; }
.credit-bundle:hover { border-color: var(--primary-color); transform: translateY(-2px); }
.bundle-credits { font-size: 28px; font-weight: 700; color: var(--primary-color) !important; margin-bottom: 8px; }
.bundle-credits-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 12px; }
.bundle-price { font-size: 20px; font-weight: 700; color: var(--text-primary) !important; margin-bottom: 16px; }
.bundle-btn { width: 100%; background: var(--primary-color) !important; color: var(--text-on-primary) !important; border: none; padding: 12px 16px; border-radius: 24px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-family); }
.bundle-btn:hover { background: var(--primary-hover) !important; }
.upgrade-divider { text-align: center; margin: 28px 0 20px 0; position: relative; color: var(--text-secondary); font-size: 13px; font-weight: 600; text-transform: uppercase; }
.upgrade-divider::before, .upgrade-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.upgrade-divider::before { left: 0; }
.upgrade-divider::after { right: 0; }
.upgrade-option { background: var(--background); border: 2px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.upgrade-option:hover { border-color: var(--primary-color); }
.upgrade-tier-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px; margin-bottom: 8px; text-transform: uppercase; }
.upgrade-tier-badge.heartbeat { background: rgba(29, 185, 84, 0.2); color: var(--primary-color); }
.upgrade-tier-badge.pinnacle { background: rgba(255, 215, 0, 0.2); color: var(--warning); }
.upgrade-details { font-size: 15px; color: var(--text-primary); font-weight: 600; margin-bottom: 4px; }
.upgrade-subtext { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.upgrade-btn { width: 100%; background: transparent !important; color: var(--primary-color) !important; border: 2px solid var(--primary-color); padding: 10px; border-radius: 24px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-family); }
.upgrade-btn:hover { background: var(--primary-color) !important; color: var(--text-on-primary) !important; }
.modal-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; font-size: 13px; color: var(--text-secondary) !important; }
.audio-player-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 2px solid var(--border); padding: 12px 24px; display: none; align-items: center; gap: 20px; z-index: 1000; }
.audio-player-bar.active { display: flex; }
.now-playing-info { display: flex; align-items: center; gap: 12px; flex: 0 0 250px; min-width: 200px; max-width: 300px; }
.now-playing-cover { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }
.now-playing-text { min-width: 0; }
.now-playing-title { font-size: 14px; font-weight: 600; color: var(--text-primary) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing-subtitle { font-size: 12px; color: var(--text-secondary) !important; }
.player-controls { display: flex; align-items: center; gap: 16px; flex: 1; }
.player-time { font-size: 12px; color: var(--text-secondary) !important; min-width: 40px; text-align: right; }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; cursor: pointer; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary-color); border-radius: 3px; width: 0%; }
.player-play-button { width: 40px; height: 40px; background: var(--primary-color) !important; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.player-play-button:hover { background: var(--primary-hover) !important; }
.player-play-button .play-icon { border-left: 12px solid var(--text-on-primary); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 2px; }
.player-play-button .pause-icon { width: 12px; height: 16px; border-left: 4px solid var(--text-on-primary); border-right: 4px solid var(--text-on-primary); }
.player-play-button.playing .play-icon { display: none; }
.player-play-button.playing .pause-icon { display: block; }
@media (max-width: 968px) { .cart-layout { grid-template-columns: 1fr; } .summary-panel { position: relative; top: 0; } .item-row { flex-wrap: wrap; } .item-actions { width: 100%; margin-top: var(--spacing-sm); } .audio-player-bar { flex-wrap: wrap; padding: 12px; } .player-controls { width: 100%; order: 3; } }
@media (max-width: 768px) { .page-wrapper { padding: 0 var(--spacing-sm) 120px var(--spacing-sm); } .page-title { font-size: 28px; } .item-row { padding: 12px; } .item-thumbnail-container { width: 50px; height: 50px; } .item-name { font-size: 14px; } .item-credits { font-size: 12px; } .item-btn { padding: 6px 16px; font-size: 12px; } .credit-balance-value { font-size: 28px; } .bundles-grid { grid-template-columns: 1fr; } .credit-modal { top: auto; left: 0; right: 0; bottom: 0; transform: none; border-radius: 16px 16px 0 0; max-width: 100%; max-height: 85vh; } }

/* Shown instead of credit bundles to anyone not paid up (rbCreditGate, 19 Sep 2026). */
.credit-gate { grid-column: 1 / -1; text-align: center; padding: 8px 4px; }
.credit-gate p { margin: 0 0 16px; line-height: 1.6; }
