/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  border-color: #D6D5D2;
}

/* Bento Cards */
.card-bento {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--surface);
  border-color: var(--text-primary);
}

.btn-primary:hover {
  background: #333333;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--canvas);
}

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 4px 8px;
}

.btn-text:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Badges / Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* Signal colors */
.badge-cf {
  background: var(--pale-blue);
  color: var(--pale-blue-text);
}

.badge-cbf {
  background: var(--pale-yellow);
  color: var(--pale-yellow-text);
}

.badge-nutrition {
  background: var(--pale-green);
  color: var(--pale-green-text);
}

.badge-cold {
  background: var(--pale-red);
  color: var(--pale-red-text);
}

/* Inputs & Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.input:focus {
  border-color: var(--text-primary);
}

/* Custom Nutrition Bar */
.nutrition-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
  margin-bottom: 8px;
}

.nutrition-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.fill-high {
  background-color: var(--pale-green-text);
}

.fill-medium {
  background-color: var(--pale-yellow-text);
}

.fill-low {
  background-color: var(--pale-red-text);
}

/* Accordion list items for steps */
.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.accordion-content p {
  padding-bottom: 14px;
}

/* Stars rating widget */
.rating-stars {
  display: flex;
  gap: 4px;
  cursor: pointer;
}

.rating-stars i {
  font-size: 24px;
  color: var(--border);
  transition: color 0.15s ease;
}

.rating-stars i.active {
  color: #F59E0B; /* Warm amber for stars */
}

/* Custom Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--text-primary);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Login Page Styles */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.01);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.logo-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.logo-large i {
  font-size: 2.6rem;
}

.login-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-header .subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider:not(:empty)::before {
  margin-right: .5em;
}

.divider:not(:empty)::after {
  margin-left: .5em;
}

.demo-accounts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
}

.demo-btn:hover {
  border-color: var(--text-primary);
  background: var(--surface-hover);
}

.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  flex-shrink: 0;
}

.demo-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.demo-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.demo-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Horizontal Row Scroll Layout */
.horizontal-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 3px;
}

/* Recipe Card in horizontal scroll */
.recipe-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.02);
  border-color: #D6D5D2;
}

.recipe-card-img-placeholder {
  height: 110px;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.recipe-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-explanation {
  margin-bottom: 8px;
}

.recipe-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6rem;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Floating Filter Overlay */
.filter-overlay {
  box-shadow: 0 10px 40px rgba(0,0,0,0.06) !important;
  border-color: var(--border) !important;
  animation: fadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive component tweaks */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 20px 12px;
    min-height: calc(100vh - 80px);
  }
  .login-card {
    padding: 24px 16px;
    border-radius: var(--radius-md);
  }
  .logo-large {
    font-size: 1.8rem;
  }
  .logo-large i {
    font-size: 2.2rem;
  }
  .demo-btn {
    padding: 8px 12px;
    gap: 10px;
  }
  .demo-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .demo-name {
    font-size: 12px;
  }
  .demo-desc {
    font-size: 10px;
  }
  
  .horizontal-scroll {
    gap: 16px;
    padding: 8px 0 16px;
  }
  .recipe-card {
    flex: 0 0 200px; /* slightly smaller cards on mobile */
  }
  .recipe-card-title {
    font-size: 0.95rem;
    height: 2.4rem;
  }
}

