/*
 * card-premium.css — SupplementLabs.ai Premium Card System
 * Shared premium styling for supplement cards, paused cards,
 * substitute display, and buy buttons across all pages.
 */

/* ═══════════════════════════════════════════════════════
   1. SUPPLEMENT CARD — PREMIUM BASE
═══════════════════════════════════════════════════════ */

/* My Day cards — enhanced depth */
.md-item {
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.03);
  transition: all 0.25s cubic-bezier(0.22, 0.68, 0, 1.1);
}
.md-item:hover {
  border-color: rgba(33,150,243,0.2);
  box-shadow:
    0 4px 16px rgba(33,150,243,0.08),
    0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.md-item.taken {
  border-color: rgba(16,185,129,0.2);
  background: linear-gradient(135deg, rgba(16,185,129,0.03) 0%, rgba(16,185,129,0.01) 100%);
  box-shadow: 0 2px 8px rgba(16,185,129,0.06);
}

/* ═══════════════════════════════════════════════════════
   2. PAUSED / SKIPPED CARDS — PREMIUM REDESIGN
═══════════════════════════════════════════════════════ */
.md-skipped-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #ffffff !important;
  border: 1.5px solid rgba(245,158,11,0.18) !important;
  opacity: 1 !important;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 3px 10px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.md-skipped-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-radius: 3px 0 0 3px;
}
.md-skipped-card:hover {
  border-color: rgba(245,158,11,0.3) !important;
  box-shadow:
    0 4px 16px rgba(245,158,11,0.08),
    0 2px 8px rgba(0,0,0,0.05);
}

/* Paused card info */
.md-skipped-card-info {
  flex: 1;
  min-width: 0;
}
.md-skipped-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1A1A2E !important;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.md-skipped-card-dosage {
  font-size: 0.78rem;
  color: #757575;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.md-skipped-card-reason {
  font-size: 0.78rem;
  color: #9e9e9e;
  font-style: italic;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}
.md-skipped-card-reminder {
  font-size: 0.75rem;
  color: #f59e0b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Paused card actions */
.md-skipped-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: flex-end;
}
.md-skipped-reactivate {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  background: #ffffff !important;
  border: 1.5px solid rgba(33,150,243,0.25) !important;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: #2196F3 !important;
  transition: all 0.15s;
  min-height: 36px;
  white-space: nowrap;
}
.md-skipped-reactivate:hover {
  background: rgba(33,150,243,0.06) !important;
  border-color: rgba(33,150,243,0.4) !important;
  box-shadow: 0 2px 8px rgba(33,150,243,0.12);
}

/* Paused card buy button */
.md-skipped-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  min-height: 30px;
  background: rgba(255,153,0,0.08);
  color: #e68a00;
  border: 1px solid rgba(255,153,0,0.2);
}
.md-skipped-buy-btn:hover {
  background: rgba(255,153,0,0.15);
  transform: translateY(-1px);
}

/* Skipped section header — elevated */
.md-skipped-section {
  margin-top: 1.5rem;
}
.md-skipped-hdr {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s;
  background: rgba(245,158,11,0.04);
  border: 1px solid rgba(245,158,11,0.1);
}
.md-skipped-hdr:hover {
  background: rgba(245,158,11,0.08);
}
.md-skipped-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #92400e !important;
}
.md-skipped-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  background: rgba(245,158,11,0.1);
  color: #d97706;
}

/* ═══════════════════════════════════════════════════════
   3. SUBSTITUTE PRODUCT DISPLAY — SWAP ICON + HIERARCHY
═══════════════════════════════════════════════════════ */
.md-item-substitute-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.15rem;
}
.md-item-swap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(245,158,11,0.1);
  flex-shrink: 0;
}
.md-item-swap-icon svg {
  width: 12px;
  height: 12px;
  color: #f59e0b;
}
.md-item-replaces {
  font-size: 0.7rem;
  color: #9e9e9e !important;
  line-height: 1.3;
  margin-top: 0.15rem;
  padding-left: 0.1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.md-item-replaces-original {
  text-decoration: line-through;
  text-decoration-color: rgba(158,158,158,0.4);
  color: #bdbdbd;
}

/* ═══════════════════════════════════════════════════════
   4. BUY BUTTONS — REFINED PREMIUM STYLE
═══════════════════════════════════════════════════════ */

/* My Day buy buttons */
.md-link-btn {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 28px;
  letter-spacing: 0.01em;
}
.md-link-btn.amazon {
  background: rgba(255,153,0,0.08);
  color: #e68a00;
  border: 1px solid rgba(255,153,0,0.18);
}
.md-link-btn.amazon:hover {
  background: rgba(255,153,0,0.14);
  border-color: rgba(255,153,0,0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,153,0,0.12);
}
.md-link-btn.iherb {
  background: rgba(90,176,53,0.06);
  color: #4a9030;
  border: 1px solid rgba(90,176,53,0.18);
}
.md-link-btn.iherb:hover {
  background: rgba(90,176,53,0.12);
  border-color: rgba(90,176,53,0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(90,176,53,0.12);
}

/* Protocol buy buttons */
.prot-buy-btn {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  min-height: 34px;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.prot-buy-btn.amazon {
  background: rgba(255,153,0,0.1) !important;
  color: #e68a00 !important;
  border: 1px solid rgba(255,153,0,0.22) !important;
}
.prot-buy-btn.amazon:hover {
  background: rgba(255,153,0,0.18) !important;
  box-shadow: 0 2px 8px rgba(255,153,0,0.12);
  transform: translateY(-1px);
}

/* Program buy buttons — refined */
.mp-buy-btn.amazon {
  background: rgba(255,153,0,0.1) !important;
  color: #e68a00 !important;
  border: 1px solid rgba(255,153,0,0.22) !important;
  font-size: 0.76rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  min-height: 34px;
}
.mp-buy-btn.amazon:hover {
  background: rgba(255,153,0,0.18) !important;
  box-shadow: 0 2px 8px rgba(255,153,0,0.12);
  transform: translateY(-1px);
}
.mp-buy-btn.iherb {
  background: rgba(90,176,53,0.08) !important;
  color: #4a9030 !important;
  border: 1px solid rgba(90,176,53,0.2) !important;
  font-size: 0.76rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  min-height: 34px;
}
.mp-buy-btn.iherb:hover {
  background: rgba(90,176,53,0.15) !important;
  box-shadow: 0 2px 8px rgba(90,176,53,0.12);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════
   5. PROTOCOL STACK PRODUCT CARDS — PREMIUM
═══════════════════════════════════════════════════════ */
.prot-stack-product-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.03),
    0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.18s ease;
}
.prot-stack-product-card:hover {
  border-color: rgba(33,150,243,0.18) !important;
  box-shadow:
    0 2px 8px rgba(33,150,243,0.06),
    0 4px 14px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

/* Protocol stack card — premium */
.prot-stack-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  border-radius: 16px !important;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 4px 14px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.prot-stack-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2196F3, #64B5F6);
  opacity: 0;
  transition: opacity 0.2s;
}
.prot-stack-card:hover {
  border-color: rgba(33,150,243,0.2) !important;
  box-shadow:
    0 4px 16px rgba(33,150,243,0.08),
    0 8px 24px rgba(0,0,0,0.06);
}
.prot-stack-card:hover::after {
  opacity: 1;
}

/* Stack card header actions — refined */
.prot-stack-action-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 9px;
  background: rgba(33,150,243,0.04);
  color: #9e9e9e;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.prot-stack-action-btn:hover {
  border-color: rgba(33,150,243,0.25);
  color: #2196F3;
  background: rgba(33,150,243,0.08);
  box-shadow: 0 2px 6px rgba(33,150,243,0.1);
}
.prot-stack-action-btn.delete:hover {
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
  background: rgba(239,68,68,0.06);
}

/* Stack card name */
.prot-stack-card-name {
  color: #1A1A2E !important;
  font-size: 0.98rem !important;
  font-weight: 700;
}

/* Protocol supplement item — light mode */
.prot-supp-item {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  transition: background 0.12s;
}
.prot-supp-item:hover {
  background: rgba(33,150,243,0.02) !important;
}
.prot-supp-name {
  color: #1A1A2E !important;
}
.prot-supp-dosage {
  color: #757575 !important;
}

/* Protocol supplement list container */
.prot-supp-list {
  border: 1px solid rgba(0,0,0,0.07) !important;
  border-radius: 0 0 14px 14px !important;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

/* Protocol timing header — light mode */
.prot-timing-header {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  border-bottom: none !important;
}
.prot-morning-header .prot-timing-label { color: #f59e0b !important; }
.prot-afternoon-header .prot-timing-label { color: #3b82f6 !important; }
.prot-evening-header .prot-timing-label { color: #8b5cf6 !important; }
.prot-anytime-header .prot-timing-label { color: #2196F3 !important; }

/* ═══════════════════════════════════════════════════════
   6. PROGRAM SUPPLEMENT CARDS — PREMIUM
═══════════════════════════════════════════════════════ */
.mp-supp-item {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  border-radius: 14px !important;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.03),
    0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.18s ease;
}
.mp-supp-item:hover {
  border-color: rgba(33,150,243,0.18) !important;
  box-shadow:
    0 2px 8px rgba(33,150,243,0.06),
    0 4px 12px rgba(0,0,0,0.05);
}
.mp-supp-name {
  color: #1A1A2E !important;
}
.mp-supp-dosage {
  background: rgba(33,150,243,0.06) !important;
  color: #1976D2 !important;
  border-color: rgba(33,150,243,0.15) !important;
}
.mp-supp-note {
  color: #616161 !important;
}
.mp-supps-section {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* ═══════════════════════════════════════════════════════
   7. SUBSTITUTE DISPLAY — PROTOCOL + PROGRAM PAGES
═══════════════════════════════════════════════════════ */
.pn-substitute {
  background: rgba(245,158,11,0.06) !important;
  border: 1px solid rgba(245,158,11,0.18) !important;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.pn-sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(245,158,11,0.12);
  flex-shrink: 0;
}
.pn-sub-icon svg {
  width: 11px;
  height: 11px;
  color: #f59e0b;
}

/* ═══════════════════════════════════════════════════════
   8. STACK DETAIL PAGE — PREMIUM PRODUCT CARDS
═══════════════════════════════════════════════════════ */
.product-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(0,0,0,0.06) !important;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.03);
  transition: all 0.22s ease;
  position: relative;
}
.product-card:hover {
  border-color: rgba(33,150,243,0.2) !important;
  box-shadow:
    0 4px 16px rgba(33,150,243,0.08),
    0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.product-name {
  color: #1A1A2E !important;
}
.product-reason {
  color: #616161 !important;
}
.product-number {
  background: rgba(33,150,243,0.06) !important;
  border-color: rgba(33,150,243,0.15) !important;
  color: #2196F3 !important;
}
.product-meta-pill {
  background: rgba(33,150,243,0.04) !important;
  border-color: rgba(33,150,243,0.12) !important;
  color: #757575 !important;
}
.product-meta-pill.dose {
  color: #2196F3 !important;
  border-color: rgba(33,150,243,0.2) !important;
}
.buy-btn {
  min-height: 34px;
  transition: all 0.15s;
}
.buy-btn-amazon {
  background: rgba(255,153,0,0.08) !important;
  color: #e68a00 !important;
  border: 1px solid rgba(255,153,0,0.18) !important;
}
.buy-btn-amazon:hover {
  background: rgba(255,153,0,0.15) !important;
  box-shadow: 0 2px 8px rgba(255,153,0,0.12);
  transform: translateY(-1px);
}
.buy-btn-iherb {
  background: rgba(90,176,53,0.06) !important;
  color: #4a9030 !important;
  border: 1px solid rgba(90,176,53,0.18) !important;
}
.buy-btn-iherb:hover {
  background: rgba(90,176,53,0.12) !important;
  box-shadow: 0 2px 8px rgba(90,176,53,0.12);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════
   9. MOBILE RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .md-skipped-card {
    padding: 0.85rem 0.9rem;
    gap: 0.65rem;
  }
  .md-skipped-card-actions {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
  }
  .md-skipped-reactivate {
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
  }
  .prot-stack-card {
    padding: 0.85rem 1rem !important;
  }
}
