/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@keyframes highlight-fade {
  from { background-color: rgb(254 249 195); }
  to { background-color: transparent; }
}

.highlight {
  animation: highlight-fade 1.5s ease-out;
}

.toast-enter { animation: toast-in 0.3s ease-out; }
.toast-exit { animation: toast-out 0.3s ease-in forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-1rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-1rem); }
}

/* Bottom sheet dialog — dialog is a full-viewport transparent container,
   .sheet-panel is the visible white sheet pinned to the bottom */
.sheet-dialog {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
  overflow: hidden;
}

.sheet-dialog[open] {
  display: flex;
  align-items: flex-end;
}

.sheet-panel {
  width: 100%;
  max-height: 80dvh;
  overflow-y: auto;
  background: white;
  border-radius: 0.75rem 0.75rem 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0.75rem);
  transform: translateY(100%);
  transition: transform 0.25s ease-out;
}

.sheet-dialog[open] .sheet-panel {
  transform: translateY(0);
}

.sheet-dialog.closing .sheet-panel {
  transform: translateY(100%);
}

.sheet-dialog::backdrop {
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease-out;
}

.sheet-dialog[open]::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.sheet-dialog.closing::backdrop {
  background: rgba(0, 0, 0, 0);
}


@media print {
  @page {
    margin: 0;
    size: 3in 2in;
  }

  body:has(#barcode-print-page) * {
    visibility: hidden;
  }

  body:has(#barcode-print-page) #printable-barcode,
  body:has(#barcode-print-page) #printable-barcode * {
    visibility: visible;
  }

  body:has(#barcode-print-page) #printable-barcode {
    position: fixed;
    left: 0;
    top: 0;
    width: 3in;
    height: 2in;
    padding: 0.1in;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  body:has(#barcode-print-page) #printable-barcode > div {
    padding: 0.08in;
    border-width: 1px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  body:has(#barcode-print-page) #printable-barcode .text-center {
    padding-bottom: 0.06in;
    margin-bottom: 0.06in;
  }

  body:has(#barcode-print-page) #printable-barcode .text-xs {
    font-size: 6pt;
    margin-bottom: 1px;
  }

  body:has(#barcode-print-page) #printable-barcode .text-lg {
    font-size: 9pt;
  }

  body:has(#barcode-print-page) #printable-barcode .font-semibold {
    font-size: 7pt;
    line-height: 1.2;
  }

  body:has(#barcode-print-page) #printable-barcode .font-medium {
    font-size: 7pt;
  }

  body:has(#barcode-print-page) #printable-barcode img {
    height: 0.4in;
  }

  body:has(#barcode-print-page) #printable-barcode .space-y-2 {
    margin-top: auto;
  }

  body:has(#barcode-print-page) #printable-barcode .space-y-2 > * + * {
    margin-top: 0.04in;
  }

  body:has(#barcode-print-page) #printable-barcode .space-y-4 > * + * {
    margin-top: 0;
  }

  body:has(#barcode-print-page) #printable-barcode .mt-2 {
    margin-top: 0.04in;
  }
}
