@import url("./core/theme-light.css");

/* Chỉ tùy biến 4 biến màu nhận diện riêng theo core/DESIGN.md */
:root {
  --primary: #0f766e;
  --primary-hover: #0d5c56;
  --primary-soft: #f0fdfa;
  --primary-border: #99f6e4;
}

/* Header Language Switcher Pill */
.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}

.lang-pill {
  min-height: 36px;
  min-width: 44px;
  padding: 4px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.lang-pill:hover {
  color: var(--primary);
}

.lang-pill.active {
  background: var(--primary);
  color: #ffffff;
}

/* Food Card Details */
.food-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.food-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.food-alt-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.gi-gl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.gi-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.food-note {
  margin: 0 0 12px 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.food-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.filter-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 8px 0 6px;
}

/* Meal Builder */
.meal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.meal-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.meal-kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
  margin: 4px 0;
}

.meal-rating-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.meal-rating-banner.low {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.meal-rating-banner.medium {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}

.meal-rating-banner.high {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.quick-add-wrap {
  position: relative;
  margin-bottom: 14px;
}

.quick-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
}

.quick-dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.quick-dropdown-item:hover {
  background: var(--primary-soft);
}

.mult-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.mult-btn {
  min-height: 36px;
  min-width: 40px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.mult-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.grams-input {
  width: 72px;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-align: right;
  font-size: 0.86rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.disclaimer-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .site-header-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .site-title {
    font-size: 0.98rem;
  }
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
  .site-container.has-sticky {
    padding-bottom: 88px;
  }
}
