html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: 'Libre Baskerville', serif;
  /* Added Baskerville font */
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* DataToDelicious custom styles */
.pantry-item {
  transition: all 0.3s ease;
}

.pantry-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Items expiring soon will have a light warning background */
.pantry-item .text-danger {
  font-weight: bold;
}

/* Inline editing styles */
.inline-edit-input {
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}

.inline-edit-input:focus {
  outline: none;
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Badge-style input should maintain the badge appearance */
.inline-edit-input.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.badge-like {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.btn-icon-green {
  color: #059669;
  transition: all 0.15s ease-in-out;
}

.btn-icon-green:hover {
  color: #047857;
  background-color: #ecfdf5;
}

.btn-icon-gray {
  color: #6b7280;
  transition: all 0.15s ease-in-out;
}

.btn-icon-gray:hover {
  color: #374151;
  background-color: #f9fafb;
}

/* Animate adding new items */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pantry-item:last-child {
  animation: fadeIn 0.5s ease-in-out;
}

/* Make the "Add Item" button more prominent */
.btn-primary {
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
}

/* Hero section with image background */
.hero-section {
  position: relative;
  background-color: #f8f9fa;
  padding: 5rem 0;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.02);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo-container {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
}

.logo-container img {
  max-width: 90%;
  max-height: 350px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }

  .logo-container img {
    max-height: 250px;
  }
}

/* Meal Card Styles */
.meal-card {
  transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
}

/* Removed conflicting hover styles - now handled by Tailwind classes */

/* Meal image container styles */
.meal-image-container img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  max-height: 200px;
}

.meal-image-container video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  max-height: 200px;
}

.meal-image-container div {
  color: #ef4444;
  text-align: center;
  padding: 1rem;
  background-color: #fef2f2;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Print-specific meal image styles */
.print-meal-image img {
  width: 100%;
  height: auto;
  display: block;
}

.print-meal-image video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.print-meal-image div {
  color: #ef4444;
  text-align: center;
  padding: 0.5rem;
}

/* Shimmer Placeholder Styles */
.shimmer-wrapper {
  width: 100%;
  padding-top: 66.67%;
  /* 3:2 Aspect Ratio (2/3 * 100%) */
  background-color: #e0e0e0;
  /* Light gray background */
  position: relative;
  overflow: hidden;
  border-top-left-radius: var(--bs-card-inner-border-radius);
  /* Match card border radius */
  border-top-right-radius: var(--bs-card-inner-border-radius);
}

.shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.6) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Ensure card body elements stack correctly */
.card-body.d-flex.flex-column {
  display: flex;
  flex-direction: column;
  /* height: 100%; Remove fixed height to allow natural flow */
}

.card-title a {
  color: inherit;
  /* Make link color same as card title */
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-text.flex-grow-1 {
  flex-grow: 1;
  /* Allows description to take up available space */
}

.card-footer {
  padding-top: 0;
  /* Reduce space if footer only has button */
}

/* Meal Card Fade Out Transition for HTMX Delete */
.meal-card-item {
  transition: opacity 0.5s ease-out, max-height 0.5s ease-out;
  overflow: hidden;
  /* Needed for max-height transition */
  max-height: 500px;
  /* Adjust if cards can be taller */
}

.meal-card-item.htmx-swapping {
  opacity: 0;
  max-height: 0;
  /* Optional: Add padding/margin transitions if needed */
  /* padding-top: 0; */
  /* padding-bottom: 0; */
  /* margin-top: 0; */
  /* margin-bottom: 0; */
}

/* Ensure the container adjusts smoothly */
#meals-list-container {
  transition: height 0.5s ease-out;
  /* Optional: may help if container height changes drastically */
}

/* Optional: Add some icons if using Bootstrap Icons */
/* Ensure this is imported if not already present in _Layout.cshtml */
/* @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css"); */