/* Bootstrap Color Override */
:root {
  --bs-primary: #5fb193;
  --bs-primary-rgb: 95, 177, 147;
  --bs-primary-text-emphasis: #254035;
  --bs-primary-bg-subtle: #d1e8df;
  --bs-primary-border-subtle: #a3d4c3;
}

/* Brand utilities to unify green tones across Tailwind/Bootstrap */
.brand-bg { background-color: #5fb193 !important; }
.brand-bg-hover:hover { background-color: #4c9c82 !important; }
.brand-text { color: #5fb193 !important; }
.brand-border { border-color: #5fb193 !important; }
.brand-ring { box-shadow: 0 0 0 2px rgba(95,177,147,.25) !important; }
.brand-focus:focus { outline: none !important; border-color: #5fb193 !important; box-shadow: 0 0 0 2px rgba(95,177,147,.25) !important; }

/* Accent button utilities for consistent red/orange styling */
.accent-bg { background-color: #f38466 !important; color: white !important; }
.accent-bg-hover:hover { background-color: #d16a46 !important; color: white !important; }
.accent-text { color: #f38466 !important; }

/* Additional primary color overrides */
.btn-primary {
  --bs-btn-bg: #5fb193;
  --bs-btn-border-color: #5fb193;
  --bs-btn-hover-bg: #4c9c82;
  --bs-btn-hover-border-color: #4c9c82;
  --bs-btn-active-bg: #3a8771;
  --bs-btn-active-border-color: #3a8771;
}

.text-primary {
  color: #5fb193 !important;
}

.bg-primary {
  background-color: #5fb193 !important;
}

.border-primary {
  border-color: #5fb193 !important;
}

/* Link and Checkbox Color Override */
a {
  color: #f38466;
  text-decoration: none;
}

a:hover {
  color: #b54423;
  text-decoration: none;
}

/* Checkbox styling */
.form-check-input:checked {
  background-color: #f38466 !important;
  border-color: #f38466 !important;
}

.form-check-input:focus {
  border-color: #f38466 !important;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(243, 132, 102, 0.25) !important;
}

.form-check-input:checked:focus {
  box-shadow: 0 0 0 0.25rem rgba(243, 132, 102, 0.25) !important;
}

/* Checkbox hover effect */
.form-check-input:hover {
  border-color: #f38466 !important;
}

/* Footer styling */
footer {
  color: #284e3e;
  background-color: #f7f7f7;
  border-top-color: #f5eb9c !important;
}

footer a {
  color: #f38466;
}

/* Keep base font-size reasonable with Tailwind */
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 #5fb193;
}

html {
  position: relative;
  min-height: 100%;
}

body { margin-bottom: 60px; }

/* Mobile helpers: ensure sticky header spacing and visible cart */
@media (max-width: 768px) {
  /* Prevent hidden nav due to overflow rules */
  .category-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  
  /* Mobile table responsive design */
  .desktop-orders-table {
    display: block;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    /* Force horizontal scroll on mobile */
    max-width: calc(100vw - 3rem);
    margin: 0 -1rem;
    padding: 0 1rem;
  }
  
  /* Ensure table can scroll horizontally */
  .desktop-orders-table table {
    min-width: 800px !important;
    width: max-content !important;
  }
  
  /* Remove constraints that prevent scrolling */
  .max-w-7xl {
    overflow-x: visible !important;
  }
  
  /* Show webkit scrollbars */
  .desktop-orders-table::-webkit-scrollbar {
    height: 8px;
  }
  
  .desktop-orders-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  .desktop-orders-table::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  
  .desktop-orders-table::-webkit-scrollbar-thumb:hover {
    background: #999;
  }
}

.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;
}

:root {
  --bs-nav-link-font-size: 1.2rem; 
}

.navbar-expand-sm .navbar-nav .nav-link {
  padding-right: 16px;
  padding-left: 16px;
}

/* Navigation link styling - remove underlines */
.navbar-nav .nav-link {
  text-decoration: none !important;
}

.navbar-nav .nav-link:hover {
  text-decoration: none !important;
  border-radius: 0.375rem;
  color: #4c9c82 !important;
  background-color: rgba(95, 177, 147, 0.15);
}

/* Active navigation item styling */
.navbar-nav .nav-link.active {
  color: #5fb193 !important;
  font-weight: 600;
  border-radius: 0.375rem;
  text-decoration: none !important;
}

.navbar-nav .nav-link.active:hover {
  color: #4c9c82 !important;
  background-color: rgba(95, 177, 147, 0.15);
  text-decoration: none !important;
}

/* Keep navbar sizing consistent even when Tailwind preflight is present */
.navbar {
  --bs-navbar-padding-y: .5rem;
}

.navbar-brand img {
  height: 48px !important;
  width: auto !important;
  max-height: 48px !important;
}

.navbar-nav .nav-link {
  font-size: 1rem !important;
}

/* Admin dropdown active state */
.navbar-nav .dropdown-toggle.active {
  color: #5fb193 !important;
  font-weight: 600;
}

.dropdown-menu .dropdown-item.active {
  color: #5fb193 !important;
  font-weight: 600;
  background-color: rgba(95, 177, 147, 0.1);
}

/* Navbar text and logout button alignment */
.navbar-nav .nav-item .btn-link.nav-link {
  padding: 0.5rem 1rem;
  line-height: inherit;
  border: none;
  background: none;
  margin: 0;
  vertical-align: baseline;
}

.navbar-nav .nav-item .btn-link.nav-link:hover {
  background-color: rgba(95, 177, 147, 0.15);
  border-radius: 0.375rem;
  color: #4c9c82 !important;
  text-decoration: none;
}

/* Ensure both welcome text and logout button have same baseline */
.nav-item.d-flex .nav-link {
  display: inline-flex;
  align-items: center;
}

.menu-button-overlay :hover {
  color: #f5ec9c !important;
}

h1 {
  font-size: 27px !important;
}

h2 {
  font-size: 24px !important;
}

h3 {
  font-size: 20px !important;
}

.btn-primary.a :hover {
  color: #f5ec9c !important;
  text-decoration: none !important;
}

.btn.a :hover {
  color: #f5ec9c !important;
  text-decoration: none !important;
}