/* theaiguywi.com Cart styles — uses brand CSS vars from apex.
   Fallbacks provided so /training/ (which may not redeclare the vars) still renders. */

.cart-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  font-family: inherit;
}

.cart-widget__bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy, #1A1A2E);
  color: var(--bg, #FFFDF7);
  border: 2px solid var(--accent, #FFA000);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  font-family: inherit;
}

.cart-widget__bubble:hover {
  filter: brightness(1.08);
}

.cart-widget[data-empty="true"] .cart-widget__bubble {
  opacity: 0.92;
}

.cart-widget[data-open="true"] .cart-widget__bubble {
  display: none;
}

.cart-widget__count {
  background: var(--accent, #FFA000);
  color: var(--navy, #1A1A2E);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
}

.cart-widget__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

.cart-widget[data-open="true"] .cart-widget__overlay {
  display: block;
}

.cart-widget__drawer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--surface, #FFFFFF);
  border-right: 1px solid var(--border, #E8DFC8);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  z-index: 1001;
}

.cart-widget[data-open="true"] .cart-widget__drawer {
  display: flex;
}

.cart-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border, #E8DFC8);
  background: var(--navy, #1A1A2E);
  color: var(--bg, #FFFDF7);
}

.cart-widget__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.cart-widget__close {
  background: transparent;
  border: none;
  color: var(--bg, #FFFDF7);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-widget__close:hover {
  opacity: 0.8;
}

.cart-widget__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-widget__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--surface-muted, #FFF8E7);
  border: 1px solid var(--border, #E8DFC8);
  border-radius: 8px;
}

.cart-item__main {
  flex: 1;
  min-width: 0;
}

.cart-item__title {
  font-weight: 600;
  color: var(--text-strong, #1a1a1a);
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.3;
}

.cart-item__price {
  color: var(--text-muted, #5c5448);
  font-size: 13px;
}

.cart-item__remove {
  background: transparent;
  border: none;
  color: var(--text-quiet, #8c8272);
  cursor: pointer;
  font-size: 22px;
  padding: 0;
  width: 24px;
  height: 24px;
  flex: none;
  line-height: 1;
}

.cart-item__remove:hover {
  color: var(--text-strong, #1a1a1a);
}

.cart-widget__empty {
  color: var(--text-quiet, #8c8272);
  text-align: center;
  padding: 40px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.cart-widget__upsell {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border, #E8DFC8);
  display: none;
}

.cart-upsell__heading {
  font-weight: 700;
  color: var(--text-strong, #1a1a1a);
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.cart-upsell__card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, #E8DFC8);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.cart-upsell__title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-strong, #1a1a1a);
  margin-bottom: 4px;
}

.cart-upsell__subtitle {
  color: var(--text-muted, #5c5448);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.cart-upsell__add {
  background: var(--accent, #FFA000);
  color: var(--navy, #1A1A2E);
  border: none;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.cart-upsell__add:hover {
  background: var(--accent-deep, #E58F00);
}

.cart-widget__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border, #E8DFC8);
  background: var(--surface-muted, #FFF8E7);
}

.cart-widget__subtotal-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--text-strong, #1a1a1a);
}

.cart-widget__checkout {
  width: 100%;
  background: var(--accent, #FFA000);
  color: var(--navy, #1A1A2E);
  border: none;
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.3px;
  font-family: inherit;
}

.cart-widget__checkout:hover:not([disabled]) {
  background: var(--accent-deep, #E58F00);
}

.cart-widget__checkout[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-widget__continue {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: var(--text-muted, #5c5448);
  font-size: 13px;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 4px;
  font-family: inherit;
}

.cart-widget__continue:hover {
  color: var(--text-strong, #1a1a1a);
}

/* Add-to-cart button — for paid product CTAs. Distinct from "Buy now" (anchor). */
.add-to-cart {
  background: var(--accent, #FFA000);
  color: var(--navy, #1A1A2E);
  border: 1px solid var(--accent, #FFA000);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.add-to-cart:hover:not([disabled]) {
  background: var(--accent-deep, #E58F00);
  border-color: var(--accent-deep, #E58F00);
}

.add-to-cart[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Compact variant for the training page paid module cards — sits next to .m-cta-paid */
.add-to-cart--compact {
  padding: 6px 10px;
  font-size: 12px;
  margin-left: 6px;
}

/* Mobile */
@media (max-width: 640px) {
  .cart-widget__drawer { max-width: 100%; }
  .cart-widget__bubble { bottom: 16px; left: 16px; padding: 10px 16px; font-size: 13px; }
  .cart-widget { bottom: 16px; left: 16px; }
}
