/* ═══════════════════════════════════════════════════════
   ATPROO EDA AI — Premium Widgets CSS
   Qo'shish: index.html <head> ga, eng OXIRGI CSS sifatida
   ═══════════════════════════════════════════════════════ */

/* ── Meal Categories (Nonushta/Tushlik/Kechki/Tamaddi) ── */
.meal-category { margin-bottom: 14px; }
.meal-category:last-child { margin-bottom: 0; }
.meal-cat-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding: 0 2px;
}
.meal-cat-icon { font-size: 18px; }
.meal-cat-label { font-size: 13px; font-weight: 700; flex: 1; }
.meal-cat-cal { font-size: 12px; font-weight: 800; color: #00e5a0; }
.meal-cat-items { display: flex; flex-direction: column; gap: 6px; }

.meal-item-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 10px 12px;
}
.meal-thumb {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden; flex-shrink: 0;
}
.meal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.meal-info-flex { flex: 1; min-width: 0; }
.meal-info-flex .meal-name { font-size: 13px; font-weight: 700; }
.meal-macros-sm { font-size: 10px; color: var(--t3); margin-top: 2px; }

/* ── AI Coach tips (already styled, small refinements) ── */
.ai-rec-item { cursor: default; }

/* ── Achievements Grid ── */
.achievements-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
#achievements-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px;
}
.achievement-badge {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 14px; text-align: center;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  transition: all .2s;
}
.achievement-badge.unlocked {
  background: linear-gradient(135deg, rgba(0,229,160,.1), rgba(79,142,255,.06));
  border-color: rgba(0,229,160,.25);
}
.achievement-badge.locked { opacity: .45; }
.ach-icon { font-size: 26px; }
.ach-title { font-size: 10px; font-weight: 700; line-height: 1.3; }

/* ── Notifications ── */
#tb-bell-dot {
  display: none; width: 8px; height: 8px; background: #ef4444; border-radius: 50%;
  position: absolute; top: 6px; right: 6px; border: 2px solid #0d1117;
}
.tb-bell-wrap { position: relative; cursor: pointer; }

.notifications-modal-content { max-width: 420px; }
.notif-item {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
}
.notif-item.unread { border-color: rgba(0,229,160,.25); background: rgba(0,229,160,.04); }
.notif-title { font-size: 13px; font-weight: 700; }
.notif-body { font-size: 12px; color: var(--t2); margin-top: 3px; line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--t3); margin-top: 6px; }

/* ── Meal Planner ── */
.meal-planner-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
#meal-plan-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.meal-plan-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06); border-radius: 14px;
  transition: all .2s;
}
.meal-plan-item.completed { opacity: .6; }
.mp-icon { font-size: 22px; flex-shrink: 0; }
.mp-info { flex: 1; min-width: 0; }
.mp-label { font-size: 10px; color: #00e5a0; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.mp-name { font-size: 13px; font-weight: 700; margin-top: 2px; }
.mp-macros { font-size: 10px; color: var(--t3); margin-top: 3px; }
.mp-check {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: rgba(0,229,160,.12); border: 1.5px solid rgba(0,229,160,.3);
  color: #00e5a0; font-size: 14px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.mp-check:hover { background: rgba(0,229,160,.2); transform: scale(1.1); }
.mp-done { font-size: 11px; font-weight: 700; color: #00e5a0; flex-shrink: 0; }

/* ── Body Progress (Before/After) ── */
.body-progress-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 18px; margin-bottom: 14px;
}
#body-photos-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px;
}
.body-photo-card {
  position: relative; border-radius: 14px; overflow: hidden;
  aspect-ratio: 3/4; background: rgba(255,255,255,.06);
}
.body-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.bp-date {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,.7); color: #fff; font-size: 9px; font-weight: 700;
  padding: 3px 7px; border-radius: 50px;
}
.bp-weight {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,229,160,.9); color: #000; font-size: 9px; font-weight: 800;
  padding: 3px 7px; border-radius: 50px;
}
.add-photo-btn {
  width: 100%; padding: 12px; margin-top: 12px;
  background: rgba(139,92,246,.08); border: 1.5px dashed rgba(139,92,246,.3);
  border-radius: 14px; color: #8b5cf6; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.add-photo-btn:hover { background: rgba(139,92,246,.14); }

/* ── Barcode Scanner Result Modal ── */
.barcode-result-content { text-align: center; }
#barcode-product-img {
  width: 100px; height: 100px; object-fit: cover; border-radius: 16px;
  margin: 0 auto 14px; background: rgba(255,255,255,.06);
}
#barcode-product-name { font-size: 16px; font-weight: 800; }
#barcode-product-brand { font-size: 12px; color: var(--t3); margin-top: 2px; margin-bottom: 14px; }
.barcode-macros-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px;
}
.barcode-macro-box {
  background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px;
}
.barcode-macro-box .val { font-size: 16px; font-weight: 900; color: #00e5a0; }
.barcode-macro-box .lbl { font-size: 9px; color: var(--t3); margin-top: 2px; }

/* ── Weight Chart (in Body Progress) ── */
.weight-chart-wrap { height: 140px; margin-top: 12px; }

/* ── Premium Page (full subscription view) ── */
.premium-page-hero {
  background: linear-gradient(135deg, #1a0a2e 0%, #0d1a3a 50%, #0a2018 100%);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 24px; padding: 28px 20px; text-align: center; margin-bottom: 20px;
}
.premium-page-icon { font-size: 48px; margin-bottom: 12px; }
.premium-page-title { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.premium-page-sub { font-size: 13px; color: var(--t2); line-height: 1.6; }

.premium-features-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.premium-feature-row {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px; padding: 14px 16px;
}
.pf-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(0,229,160,.15));
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pf-info { flex: 1; }
.pf-title { font-size: 14px; font-weight: 700; }
.pf-desc { font-size: 11px; color: var(--t3); margin-top: 2px; }

/* ── Empty state shared ── */
.empty-state-sm { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.empty-state-sm .empty-ico { font-size: 32px; }
