/* css/luchos.css */

/* Remove margins/padding from Bootstrap's container for full-width pages */
.full-width-page .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

tr.htmx-swapping td {
  opacity: 0;
  transition: opacity 1s ease-out;
}

/* Smooth transition for theme switch */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body[data-bs-theme="dark"] #lopantonavbar {
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.1) !important;
}

.bg-leafy-green {
  background-color: #388E3C !important;
  /* A rich, leafy green */
}

body[data-bs-theme="light"] #lopantonavbar.bg-leafy-green {
  background-color: #388E3C !important;
}

/* Ensure nav links are white and clear on the leafy green background */
#lopantonavbar.bg-leafy-green .navbar-nav .nav-link {
  color: #fff !important;
  /* White color for links */
  text-shadow: none !important;
  /* Remove any text shadow */
}

/* Optional: Style for active/hover states for nav-links */
#lopantonavbar.bg-leafy-green .navbar-nav .nav-link:hover,
#lopantonavbar.bg-leafy-green .navbar-nav .nav-link.active {
  color: #f8f9fa !important;
  /* A very light gray, or keep #fff */
}

/* Ensure the toggler icon (hamburger menu) is also styled for dark backgrounds */
#lopantonavbar.bg-leafy-green .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Preparar filter buttons in navbar */
#lopantonavbar .preparar-filter-btn {
  font-weight: bold;
  /* Bold text */
  text-transform: uppercase;
  /* Uppercase letters */
  color: #fff !important;
  /* White text */
  margin-right: 0.5rem;
  /* Spacing between buttons */
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: transparent;
  /* Default transparent */
  transition: background-color 0.2s ease, color 0.2s ease;
}

#lopantonavbar .preparar-filter-btn.active {
  background-color: #0d6efd !important;
  /* Bootstrap primary blue */
  color: #fff !important;
  /* Keep text white */
  border-color: #0d6efd !important;
  /* Match border to background */
}

#lopantonavbar .preparar-filter-btn:not(.active):hover {
  background-color: rgba(13, 110, 253, 0.8);
  /* Slightly darker blue on hover */
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.5);
}

.highlight {
  background-color: #46ffb3;
}

/* for header */
.hidden-logout {
  display: inline;
}

.table-extra-space {
  margin-bottom: 90px;
}

/* Default: Mobile (Auto width) */
.client-col,
.cocina-col,
.barra-col,
.pickup-col,
.price-col {
  width: auto;
  min-width: auto;
  max-width: 100%;
}

/* Tablet & Desktop (Percentage Widths) */
@media (min-width: 1024px) {

  .cocina-col,
  .barra-col {
    width: 27%;
    min-width: 180px;
  }

  .client-col {
    width: 18%;
    min-width: 150px;
  }

  .pickup-col {
    width: 9%;
    min-width: 100px;
  }

  .price-col {
    width: 9%;
    min-width: 90px;
  }

  .done-col {
    width: 3%;
    min-width: 80px;
  }

  .line-id-col {
    width: 3%;
    min-width: 70px;
  }

  /* Prevent inner div from breaking column width */
  .cocina-container,
  .barra-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  /* Ensure input does not expand */
  .cocina-container input,
  .barra-container input {
    width: 100%;
    min-width: 0;
  }

}

/* Dark mode styles for Handsontable */
body[data-bs-theme="dark"] {
  --ht-background-color: #1e1e1e !important;
  --ht-color: #cfcfcf !important;
}

body[data-bs-theme="dark"] .htCore,
.ht-dark .htCore {
  background-color: var(--ht-background-color) !important;
  color: var(--ht-color) !important;
}

body[data-bs-theme="dark"] .htCore td,
.ht-dark .htCore td {
  background-color: var(--ht-background-color) !important;
  color: var(--ht-color) !important;
}

body[data-bs-theme="dark"] .wtBorder,
.ht-dark .wtBorder {
  border-color: #444 !important;
}

body[data-bs-theme="dark"] .current,
body[data-bs-theme="dark"] .wtBorder.current,
.ht-dark .current,
.ht-dark .wtBorder.current {
  background-color: #333 !important;
  color: var(--ht-color) !important;
}

body[data-bs-theme="dark"] .wtHider,
.ht-dark .wtHider {
  background-color: var(--ht-background-color) !important;
}

/* Additional explicit styles for dark mode */
.ht-dark .htCore th,
.ht-dark .htCore td {
  background-color: var(--ht-background-color) !important;
  color: var(--ht-color) !important;
  border-color: #444 !important;
}

.ht-dark .htCore th.current,
.ht-dark .htCore td.current,
.ht-dark .htCore th.wtBorder.current,
.ht-dark .htCore td.wtBorder.current {
  background-color: #333 !important;
  color: var(--ht-color) !important;
}

.ht-dark .wtBorder {
  border-color: #444 !important;
}

.undo-redo-buttons {
  margin-bottom: 10px;
}

.undo-redo-buttons button {
  margin-right: 5px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}

.handsontable .htCore td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  /* Adjust as needed */
}

.min-vh-60 {
  min-height: 60vh !important;
}