/* Bootstrap bridge for EatWise — maps brand + keeps SPA layout */
:root {
  --bs-primary: #0D9F6E;
  --bs-success: #0D9F6E;
  --bs-success-rgb: 13, 159, 110;
  --bs-primary-rgb: 13, 159, 110;
  --bs-body-font-family: 'Cairo', system-ui, sans-serif;
  --bs-body-bg: #F3F4F6;
  --bs-body-color: #111827;
  --bs-border-radius: 0.75rem;
  --bs-border-radius-lg: 1rem;
}

body {
  font-family: var(--bs-body-font-family) !important;
  background: var(--bs-body-bg) !important;
}

/* SPA screens must not become Bootstrap containers accidentally */
.screen {
  display: none !important;
  min-height: 100vh;
  width: 100%;
}
.screen.active {
  display: flex !important;
  flex-direction: column !important;
}

/* Full-width primary actions */
.btn-full { width: 100%; }

/* Map legacy outline class */
.btn-outline:not(.btn-outline-secondary):not(.btn-outline-success):not(.btn-outline-danger) {
  --bs-btn-color: #374151;
  --bs-btn-border-color: #D1D5DB;
  --bs-btn-hover-bg: #F3F4F6;
  --bs-btn-hover-border-color: #9CA3AF;
}

.btn-success, .btn-primary {
  --bs-btn-bg: #0D9F6E;
  --bs-btn-border-color: #0D9F6E;
  --bs-btn-hover-bg: #0B8A5F;
  --bs-btn-hover-border-color: #0B8A5F;
  --bs-btn-active-bg: #097A54;
  --bs-btn-active-border-color: #097A54;
}

/* Forms inside app */
.input-group {
  display: block !important;
  width: 100%;
  margin-bottom: 0.85rem;
}
.input-group > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 0.35rem;
}
.input-group input,
.input-group select,
.input-group textarea,
.meals-search {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: #111827;
  background-color: #fff;
  border: 1px solid #DEE2E6;
  border-radius: 0.75rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.input-group input:focus,
.input-group select:focus,
.meals-search:focus {
  border-color: #0D9F6E;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 159, 110, 0.18);
}

/* Cards */
.meal-card-full,
.package-card,
.day-meals-card,
.order-card,
.help-card,
.help-item,
.weekly-summary {
  border-radius: var(--bs-border-radius-lg) !important;
}

/* Bottom nav above bootstrap fixed elements */
.bottom-nav {
  z-index: 1030 !important;
}

/* Tables */
.data-table {
  width: 100%;
  margin-bottom: 0;
}
.data-table-wrap {
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
}

/* Profile list-group polish */
.profile-menu.list-group {
  border: 1px solid #E5E7EB;
  background: #fff;
}
.profile-menu .list-group-item {
  border-color: #F3F4F6;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
}
.profile-menu .list-group-item:active {
  background: #EDF8F3;
  color: #0D9F6E;
}

/* Filter chips stay pill-like with bootstrap */
.filter-btn, .cat-chip {
  border-radius: 50rem !important;
}

/* Toast stays above everything */
.toast {
  z-index: 1090 !important;
}

/* Help accordion-like details */
.help-item {
  transition: box-shadow 0.15s ease;
}
.help-item[open] {
  box-shadow: 0 0.25rem 0.75rem rgba(13, 159, 110, 0.08);
}


/* Modal overlay keep full-screen SPA behavior */
.modal-overlay {
  z-index: 1055 !important;
}

/* Bootstrap Modal SPA */
.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.15);
}
.modal-header {
  border-bottom: 1px solid #E5E7EB;
  padding: 1rem 1.15rem;
}
.modal-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #111827;
}
.modal-body {
  padding: 1rem 1.15rem 1.25rem;
}
.modal-body .auth-form {
  margin: 0;
}
.btn-close {
  margin-left: 0;
  margin-right: auto;
}
/* prevent old overlay rules from hiding bs modals */
.modal.fade .modal-dialog {
  transition: transform 0.2s ease-out;
}

/* Progress stats not bootstrap stretched */
#progress .progress-stats.row { display: grid !important; }
#progress .p-stat.card { height: auto !important; }
#progress .p-stat .card-body { padding: 0 !important; }
