/* Define the font using @font-face */
@font-face {
  font-family: "Montserrat";
  src: url("/static/core/fonts/Montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
  /* src: url('/static/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf') format('truetype'); */
  /* Add other font formats here if available */
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: #333333 !important;
  font-family: "Montserrat" !important;
}

.text-ellipsis,
.mb-3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f8f9fa;
}

.table thead tr {
  position: relative;
}

.invalid-feedback {
  color: red;
}

td {
  vertical-align: middle;
}

button,
a {
  min-width: 44px !important;
  min-height: 44px !important;
}

/* General Select2 container styling */
.select2-container .select2-selection {
  height: calc(2.25rem + 2px) !important;
  /* Match Bootstrap input height */
  border: 1px solid #ced4da !important;
  border-radius: 0.375rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  background-color: #fff !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  padding: 0.375rem 0.75rem !important;
  /* Match Bootstrap padding */
  overflow: hidden;
  /* Prevent floating */
}

/* --------- SINGLE SELECT --------- */
.select2-container .select2-selection--single {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.375rem 0.75rem !important;
  /* Match Bootstrap padding */
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 0 !important;
  /* Remove extra padding */
  color: #495057 !important;
  /* Match Bootstrap text color */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  /* Make arrow full height */
  display: flex !important;
  align-items: center !important;
  padding-right: 0.75rem !important;
  /* Match Bootstrap padding */
}

/* --------- MULTIPLE SELECT --------- */
.select2-container .select2-selection--multiple {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  padding: 0.375rem 0.5rem !important;
  /* Match Bootstrap padding */
  min-height: calc(2.25rem + 2px) !important;
  height: auto !important;
  overflow: visible !important;
  position: relative;
}

/* Fix the height and wrapping behavior of the selected tags (choices) */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: calc(2.25rem + 2px - 0.75rem) !important;
  max-height: 9rem !important;
  overflow-y: auto !important;
  flex-grow: 1 !important;
  /* Allow container to expand */
}

/* Style individual selected items (tags) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #e9ecef !important;
  /* Light gray like Bootstrap */
  color: #495057 !important;
  border: 1px solid #ced4da !important;
  border-radius: 0.375rem !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.875rem !important;
  display: flex !important;
  align-items: center !important;
}

/* Adjust input field height inside multiple select */
.select2-container--default .select2-selection--multiple .select2-search__field {
  height: calc(2.25rem - 1px) !important;
  /* Match height */
  font-size: 1rem !important;
  line-height: 1.5 !important;
  border: none !important;
  /* Remove border */
  outline: none !important;
  flex: 1 !important;
  /* Expand inside container */
  margin: 0 !important;
  padding: 0 !important;
}

a.primary-link i {
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex;
  /* Ensures dimensions apply correctly */
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background-color: #0D4A2D !important;
  color: #FCFDFD !important;
}

.primary-btn:hover {
  background-color: #FCFDFD !important;
  color: #0D4A2D !important;
  border: 1px solid #0D4A2D !important;
}

.secondary-btn {
  background-color: #00379E !important;
  color: #ffffff !important;
}

.secondary-btn:hover {
  background-color: #ffffff !important;
  color: #00379E !important;
  border-color: #00379E !important;
}

.danger-btn {
  color: #7D1F1C !important;
  background-color: #FCFDFD !important;
  border-color: #7D1F1C !important;
}

.danger-btn:hover {
  color: #FCFDFD !important;
  background-color: #7D1F1C !important;
  border-color: #FCFDFD !important;
}

.excel-btn {
  color: #0D4A2D !important;
  background-color: #FCFDFD !important;
  border-color: #0D4A2D !important;
}

.excel-btn:hover {
  color: #FCFDFD !important;
  background-color: #0D4A2D !important;
  border-color: #FCFDFD !important;
}

.search-btn {
  color: #1D4267 !important;
  background-color: #fdfefe !important;
  border-color: #1D4267 !important;
}

.search-btn:hover {
  color: #fdfefe !important;
  background-color: #1D4267 !important;
  border-color: #fdfefe !important;
}

.primary-link {
  color: #013B92 !important;
  transition: color .15s ease, transform .15s ease;
}

/* Premium skeleton for BPM employee cells */
td.bpm-employee {
  color: inherit;
}

.bpm-skeleton {
  display: block;
  width: 100%;
  max-width: 320px;
  min-height: 30px;
}

.bpm-skeleton__line {
  height: 12px;
  margin: 6px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d8d8d8 0%, #efefef 50%, #d8d8d8 100%);
  background-size: 200% 100%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: bpm-skeleton-shimmer 1.2s ease-in-out infinite;
}

.bpm-skeleton__line--short {
  width: 70%;
  opacity: 0.9;
}

@keyframes bpm-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bpm-skeleton__line {
    animation: none;
  }
}

.primary-link:hover i {
  transform: translateY(-1px) !important;
  /* Move the icon up */
}

.primary-link[class*="view"]:hover {
  color: #6b7280 !important; /* gris ver */
}

.primary-link[class*="edit"]:hover {
  color: #0d6efd !important; /* azul editar */
}

.primary-link[class*="delete"]:hover {
  color: #dc3545 !important; /* rojo eliminar */
}

.app-link:hover {
  color: #013B92 !important;
  transform: translateY(-3px);
}

.nav-style {
  background-color: #013B92 !important;
}

.nav-bar-link {
  border-radius: 10px;
  color: #fdfefe !important;
  padding: 8px 16px !important;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f8f9fa !important;
  color: #303030;
}

.table-rows {
  color: #333333 !important;
}

.table tbody tr:nth-child(odd) > * {
  background-color: #ffffff;
}

.table tbody tr:nth-child(even) > * {
  background-color: #fafbfc;
}

.table .action-btn {
  color: #6c757d;
  transition: color .15s ease, transform .15s ease;
}

.table .action-btn:hover {
  color: #0d6efd;
  transform: translateY(-1px);
}

.table .action-btn.delete:hover {
  color: #dc3545;
}

input,
select {
  background-color: #f8f8f8 !important;
  border-color: #ced4da !important;
}

div#div_id_form-0-numero_cestas,
div#div_id_form-0-numero_rampla,
div#div_id_form-0-nombre_materia_prima,
div#div_id_form-0-tipo_calidad,
div#div_id_form-0-libras_rampla {
  margin: 0 !important;
}

.form-check-input:checked {
  background-color: #0d6efd !important;
  /* Change to your desired background color */
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit,
      minmax(400px, 1fr));
  /* Adjust min and max values as needed */
  gap: 16px;
  height: calc(100vh - 200px);
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px #007bff;
  }

  50% {
    box-shadow: 0 0 15px #007bff;
  }

  100% {
    box-shadow: 0 0 5px #007bff;
  }
}

.attention {
  animation: glow 1s ease-in-out infinite;
}

.popover-parametros {
  z-index: 1040 !important;
}

.pop-error-message .popover-body {
  font-size: 0.8rem;
  border-left: 5px solid rgb(187, 0, 0);
  border-radius: 6px;
}

.pop-error-message i {
  font-size: 0.8rem;
  color: rgb(187, 0, 0);
}

.error-messages {
  margin-top: 10px;
}

.error-messages .error-message {
  color: red;
  font-size: 14px;
  margin-top: 4px;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 200px);
}

/* Define a grid container for monitoreo basculas */
.scale-container {
  display: grid;
  background-color: #677b888a;
  grid-template-columns: repeat(3, 0.5fr);
  /* 3 equal-width columns */
  grid-template-rows: repeat(3,
      auto);
  /* 3 rows with a fixed height of 100px */
  gap: 5px;
  /* Gap between grid items */
  border: 5px solid #677b888a;
}

/* Style for grid items (placeholders) */
.grid-item {
  background-color: #124364;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 20px;
  min-width: 0;
  /* Allow it to shrink */
  overflow: scroll;
  /* Prevent content from overflowing */
}

/* Prevent input-group from breaking layout */
.input-group-sm,
.input-group {
  display: flex;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.reference-box {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reference-item {
  background-color: #00801c8a;
  color: #003605;
  width: 200px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: monospace;
  font-size: 24px;
  border: 5px solid grey;
}

/* Create grid icon for pesos in monitoreo basculas */
.text-and-icon-container {
  display: flex;
  align-items: center;
  justify-content: start;
}

.icon-container {
  display: inline-block;
}

.grid-icon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 23.5px;
  /* Adjust the width as needed */
  height: 23.5px;
  /* Adjust the height as needed */
}

.grid-square {
  border: 1px solid #333333;
  /* Border color */
}

.shaded-square {
  background-color: #333333;
  /* Shade color */
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
}

.username {
  color: #303030;
}

.master-table-container {
  height: 60vh;
  overflow: auto;
}

.master-table-container thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f8f9fa;
}

.reporte-gradient {
  background: repeating-linear-gradient(45deg,
      #dee2e6ab,
      #e9ecef99 10px,
      #adb5bd26 10px,
      #e9ecef9e 20px);
}

/* style for subtitle in control aceites/ingredientes/quimicos */
.subtitle {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.subtitle-text {
  font-weight: 500;
  color: #212529;
}

.subtitle-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #f1f3f5;
  color: #495057;
  line-height: 1.2;
}

.meta-date {
  background: #e7f1ff;
  color: #2f6ad9;
}

.meta-lote {
  background: #fff3cd;
  color: #b58105;
}

.category-uniformes {
  background: #ffffff !important;
}

.category-higiene {
  background: #f6fbf8 !important;
}

.category-accesorios {
  background: #fafafa !important;
}

tbody td label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.table thead tr:first-child th {
  background: #f8f9fa;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2d3d;
  border-bottom: 1px solid #dee2e6;
}

.table thead tr:nth-child(2) th {
  background: #fbfcfd;
  font-size: .92rem;
  font-weight: 600;
  color: #495057;
}

textarea {
  background: #fcfcfc;
}

/* Responsive Design: Mobile First */

@media (max-width: 430px) {

  /* Navbar adjustments */
  .navbar-collapse {
    justify-content: center !important;
  }

  .nav-item {
    margin: 5px 5px;
  }

  .navbar-nav {
    flex: 1 !important;
  }

  /* Card layout adjustment */
  .card-container {
    grid-template-columns: 1fr !important;
    /* Stack cards on small screens */
    gap: 12px;
  }

  /* Button adjustments */
  button,
  a {
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .primary-link i {
    min-width: 38px !important;
    min-height: 38px !important;
  }
}

@media (max-width: 768px) {}

@media (min-width: 1025px) {

  /* Desktop layout */
  .navbar-collapse {
    display: flex !important;
    justify-content: space-evenly !important;
  }

  .card-container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Adjust cards for larger screens */
  }

  .grid-item {
    font-size: 22px;
    /* Adjust font size for desktop */
  }
}

.rampla-section-heads th {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rampla-section-heads th.section-general {
  background: #eef2f7 !important;
}

.rampla-section-heads th.section-muestras {
  background: #e6f4f1 !important;
}

.rampla-section-heads th.section-defectos {
  background: #fdeceb !important;
}

.rampla-section-heads th.section-especificaciones {
  background: #fff6e5 !important;
}

.rampla-section-heads th.section-prueba-sensorial {
  background: #ede9fe !important;
}

.numeric-value {
  text-align: right;
}

.time-value {
  text-align: center;
}

.numeric-value,
.time-value {
  font-variant-numeric: tabular-nums;
}