/* ==========================================================================
   GymDiet Master - Smart Grocery Cart & Shopping List
   Theme: Deep Stealth Black with Neon Emerald Green Accents (No Blue/Cyan)
   ========================================================================== */

#screen-grocery {
  background: radial-gradient(circle at 50% 0%, rgba(0, 240, 118, 0.06) 0%, #080c0a 70%);
  color: #f1f5f9;
  min-height: 100vh;
  padding-bottom: 120px;
}

.grocery-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header & Fast Add Bar */
:root:not([data-theme='light']) 
.grocery-add-card {
  background: #101613;
  border: 1px solid rgba(0, 240, 118, 0.22);
  border-radius: 18px;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  width: 100%;
}
.grocery-input-name {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  background: #090d0b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 10px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  user-select: text !important;
  -webkit-user-select: text !important;
}
.grocery-input-name:focus {
  border-color: #00f076;
}
.grocery-input-qty {
  flex: 0 0 72px;
  width: 72px;
  max-width: 72px;
  min-width: 0;
  box-sizing: border-box;
  background: #090d0b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 4px;
  color: #fff;
  font-size: 13px;
  outline: none;
  text-align: center;
  user-select: text !important;
  -webkit-user-select: text !important;
  transition: border-color 0.2s ease;
}
.grocery-input-qty:focus {
  border-color: #00f076;
}
.grocery-input-weight {
  flex: 0 0 86px;
  width: 86px;
  max-width: 86px;
  min-width: 0;
  box-sizing: border-box;
  background: #090d0b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 4px;
  color: #fff;
  font-size: 13px;
  outline: none;
  text-align: center;
  user-select: text !important;
  -webkit-user-select: text !important;
  transition: border-color 0.2s ease;
}
.grocery-input-weight:focus {
  border-color: #00f076;
}
.grocery-add-btn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: linear-gradient(135deg, #00f076, #00ba5b);
  border: none;
  border-radius: 12px;
  color: #080c0a;
  font-weight: 800;
  font-size: 18px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 240, 118, 0.35);
}

.grocery-add-btn:active { transform: scale(0.95); }

/* Action Toolbar */
.grocery-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grocery-tool-btn {
  background: #101613;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.grocery-tool-btn:hover, .grocery-tool-btn:active {
  background: #161e19;
  border-color: rgba(0, 240, 118, 0.4);
  color: #fff;
}

.grocery-tool-btn.primary {
  background: #00f076;
  border-color: #00f076;
  color: #080c0a;
  font-weight: 800;
}

/* Progress card */
.grocery-progress-card {
  background: #101613 !important;
  border: 1px solid rgba(0, 240, 118, 0.18) !important;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Category Sections */
.grocery-category-group {
  background: #101613;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px !important;
}

.grocery-category-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grocery-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.grocery-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 240, 118, 0.1);
  border: 1px solid rgba(0, 240, 118, 0.22);
  margin-right: 2px;
  flex-shrink: 0;
}

.grocery-category-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #849584;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Grocery Item Rows */
.grocery-items-list {
  display: flex;
  flex-direction: column;
}

.grocery-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.grocery-item-row:last-child {
  border-bottom: none;
}

.grocery-item-row:hover {
  background: rgba(0, 240, 118, 0.03);
}

.grocery-item-row.checked {
  opacity: 0.45;
  background: rgba(0, 0, 0, 0.35);
  transform: translateX(4px);
}

.grocery-item-row.checked .grocery-item-name {
  text-decoration: line-through;
  text-decoration-color: #00f076;
  text-decoration-thickness: 1.5px;
  color: #64748b;
  transition: all 0.22s ease;
}

.grocery-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.grocery-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.grocery-item-row.checked .grocery-checkbox {
  background: #00f076;
  border-color: #00f076;
  box-shadow: 0 0 10px rgba(0, 240, 118, 0.45);
}

.grocery-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grocery-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Green quantity pill badge (NO BLUE/CYAN) */
.grocery-item-amount {
  font-size: 13px;
  font-weight: 700;
  color: #00f076;
  background: rgba(0, 240, 118, 0.12);
  border: 1px solid rgba(0, 240, 118, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.grocery-item-delete {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.15s ease;
}

.grocery-item-delete:hover {
  color: #ff5252;
}

/* Floating Bottom Shopping Bar */
.grocery-bottom-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 680px;
  background: rgba(16, 22, 19, 0.96);
  border: 1px solid rgba(0, 240, 118, 0.35);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 240, 118, 0.15);
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.grocery-progress-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.grocery-progress-text {
  font-size: 12px;
  font-weight: 700;
  color: #849584;
}

.grocery-progress-text strong {
  color: #00f076;
}

.grocery-progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.grocery-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f076, #00ba5b);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.grocery-btn-copy {
  background: linear-gradient(135deg, #00f076, #00ba5b);
  border: none;
  color: #080c0a;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 240, 118, 0.3);
}

.grocery-btn-copy:active {
  transform: scale(0.95);
}

/* Empty State */
.grocery-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #849584;
}

.grocery-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 240, 118, 0.08);
  border: 1.5px solid rgba(0, 240, 118, 0.25);
  margin-bottom: 16px;
  box-shadow: 0 0 28px rgba(0, 240, 118, 0.15);
}

.grocery-empty-state p {
  font-size: 14px;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
}

.grocery-input-name::placeholder,
.grocery-input-qty::placeholder,
.grocery-input-weight::placeholder {
  font-size: 12px !important;
  opacity: 0.65 !important;
}

/* Store Selector & Pricing Card in Grocery Cart */
.grocery-store-card {
  background: #0d1218 !important;
  border: 1px solid rgba(0, 240, 118, 0.22) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  margin-bottom: 12px !important;
}

.grocery-store-chips-scroll {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 4px 0 8px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}
.grocery-store-chips-scroll::-webkit-scrollbar {
  display: none !important;
}

.grocery-store-chip {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.grocery-store-chip.active {
  background: rgba(0, 240, 118, 0.15) !important;
  border-color: #00f076 !important;
  color: #00f076 !important;
  box-shadow: 0 0 10px rgba(0, 240, 118, 0.25) !important;
}

.grocery-store-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.grocery-total-price-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.grocery-compare-btn {
  background: rgba(0, 240, 118, 0.08) !important;
  border: 1px solid rgba(0, 240, 118, 0.25) !important;
  border-radius: 8px !important;
  color: #00f076 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 5px 10px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.grocery-compare-btn:hover {
  background: rgba(0, 240, 118, 0.18) !important;
}

.grocery-compare-box {
  margin-top: 12px !important;
  padding: 10px 12px !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.grocery-compare-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

.grocery-compare-row.is-active {
  background: rgba(0, 240, 118, 0.12) !important;
  border: 1px solid rgba(0, 240, 118, 0.3) !important;
}

.grocery-item-price {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #00f076 !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
}

/* Hidden bought items banner & toggle styles */
.grocery-hidden-bought-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 16px !important;
  background: rgba(16, 22, 19, 0.95) !important;
  border: 1px dashed rgba(0, 240, 118, 0.35) !important;
  border-radius: 14px !important;
  margin-top: 10px !important;
  margin-bottom: 16px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-size: 13px !important;
}

.grocery-hidden-bought-banner:hover {
  background: rgba(0, 240, 118, 0.08) !important;
  border-color: #00f076 !important;
}

.grocery-hidden-bought-text {
  display: flex !important;
  align-items: center !important;
  color: #cbd5e1 !important;
}

.grocery-hidden-bought-text strong {
  color: #00f076 !important;
  margin-left: 4px !important;
}

.grocery-hidden-bought-link {
  color: #00f076 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-decoration: underline !important;
  margin-left: 12px !important;
  flex-shrink: 0 !important;
}

.grocery-tool-btn.is-active {
  background: rgba(0, 240, 118, 0.15) !important;
  border-color: rgba(0, 240, 118, 0.45) !important;
  color: #00f076 !important;
  box-shadow: 0 0 12px rgba(0, 240, 118, 0.15) !important;
}

