/* ============================================================
   NOVA CART  ·  nova-cart.css  v1.3
   Place in: your-child-theme/nova-cart/nova-cart.css
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --nc-accent:       #E7F5FF;
  --nc-accent-light: #eff6ff;
  --nc-sample:       #059669;   /* green  — Sample Request */
  --nc-tech:         #2563eb;   /* blue   — Technical Doc  */
  --nc-sec:          #7c3aed;   /* purple — Security Doc   */
  --nc-text:         #111827;
  --nc-muted:        #6b7280;
  --nc-border:       #e5e7eb;
  --nc-bg:           #ffffff;
  --nc-radius:       8px;
  --nc-ease:         .18s ease;
}

/* ════════════════════════════════════════════════════════════
   CART TRIGGER  (hidden data-carrier span inside Elementor button)
   ════════════════════════════════════════════════════════════ */

/* The span rendered by [nova_add_to_cart] is purely a data carrier.
   It is always hidden — Elementor's own button provides the visible UI. */
.nc-cart-trigger {
  display: none !important;
}

/* ── Feedback states applied to the Elementor button on click ── */
/* Elementor button clickable element gets .nc-btn-added / .nc-btn-exists */
.nc-cart-btn {
  cursor: pointer;
}
.nc-cart-btn.nc-btn-added,
.nc-cart-btn.nc-btn-added .elementor-button {
  opacity: .85;
  filter: saturate(1.4);
  transition: opacity .2s ease, filter .2s ease;
}
.nc-cart-btn.nc-btn-exists,
.nc-cart-btn.nc-btn-exists .elementor-button {
  opacity: .6;
  transition: opacity .2s ease;
}

/* ════════════════════════════════════════════════════════════
   CART BADGE  (on the #nova-cart Elementor icon)
   ════════════════════════════════════════════════════════════ */
#nova-cart {
  position: relative;   /* set by JS too, but also set here as fallback */
  cursor: pointer;
}

.nc-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--nc-accent);
  color: #212121;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  animation: nc-badge-pop .25s ease;
}

@keyframes nc-badge-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Pulse animation when item is added */
@keyframes nc-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.nc-cart-pulse .elementor-icon,
.nc-cart-pulse svg,
.nc-cart-pulse i {
  animation: nc-pulse .5s ease;
}

/* ════════════════════════════════════════════════════════════
   CART PAGE  ([nova_cart_items] shortcode output)
   ════════════════════════════════════════════════════════════ */
#nc-cart-container {
  margin: 0 24px 0;
}

/* Empty state */
.nc-cart-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--nc-muted);
}
.nc-cart-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: block;
  opacity: .35;
}
.nc-cart-empty p {
  font-size: 16px;
  margin: 0 0 16px;
}
.nc-back-link {
  font-size: 14px;
  color: var(--nc-accent);
  text-decoration: none;
}
.nc-back-link:hover { text-decoration: underline; }

/* Cart table */
.nc-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;  
  border:none;
  border-radius: 20px;
}
.nc-cart-table thead:first-child tr:first-child th {
  border-block-start:none;
}

.nc-cart-table thead th {
  text-align: left;
  padding: 15px 20px;
  /*border-bottom: 2px solid var(--nc-border);*/
  border:none;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--nc-muted);
  font-family: 'Montserrat', sans-serif;
  background-color: var(--nc-accent);
}
.nc-cart-row {
  /*border-bottom: 1px solid var(--nc-border);*/
  border:none;
  transition: background var(--nc-ease);
}
.nc-cart-row:last-child { border-bottom: none; }
.nc-cart-row:hover { background: #fafafa; }

.nc-cart-row td {
  padding: 14px 12px;
  vertical-align: middle;
  border:none;
}

/* Product cell */
.nc-cart-product {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nc-cart-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--nc-border);
  flex-shrink: 0;
}
.nc-cart-img-placeholder {
  width: 56px;
  height: 56px;
  background: #f3f4f6;
  border-radius: 6px;
  border: 1px solid var(--nc-border);
  flex-shrink: 0;
}
.nc-cart-product-info a {
  color: var(--nc-text);
  text-decoration: none;
  font-weight: 600;
}
.nc-cart-product-info a:hover { color: var(--nc-accent); }

/* Type badge */
.nc-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
/* Type badges on cart page */
.nc-type-sample   { background: #ecfdf5; color: var(--nc-sample); }
.nc-type-document { background: #eff6ff; color: var(--nc-tech); }

/* Remove button */
.nc-col-remove { width: 40px; text-align: center; }
.nc-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nc-muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--nc-ease), background var(--nc-ease);
}
.nc-remove-btn:hover {
  color: #dc2626;
  background: #fef2f2;
}

/* Honeypot — visually hidden, not accessible */
#nc_honeypot {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  tab-index: -1 !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media ( max-width: 600px ) {
  .nc-cart-table thead { display: none; }
  .nc-cart-row        { display: block; padding: 12px 0; }
  .nc-cart-row td     { display: block; padding: 6px 0; border: none; }
  .nc-col-remove      { text-align: left; }
}

/* ════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   Appears bottom-centre for 3 seconds after a cart action.
   ════════════════════════════════════════════════════════════ */
#nc-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 12px 22px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
  white-space: nowrap;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}

#nc-toast.nc-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Added state — green left border accent */
#nc-toast.nc-toast-added {
  border-left: 4px solid #059669;
}

/* Already-in-cart state — muted */
#nc-toast.nc-toast-exists {
  border-left: 4px solid #6b7280;
  background: #374151;
}

@media (max-width: 480px) {
  #nc-toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: translateY(20px);
    white-space: normal;
    text-align: center;
  }
  #nc-toast.nc-toast-visible {
    transform: translateY(0);
  }
}