/* app/assets/css/style.css */

@media (max-width: 767px) {
  .navbar-toggler {
    border: none;
    background: transparent !important;
  }

  #menu {
    background-color: #333;
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='3' y1='2.5' x2='27' y2='2.5' stroke='%23fff' stroke-width='3'/%3E%3Cline x1='3' y1='15' x2='27' y2='15' stroke='%23fff' stroke-width='3'/%3E%3Cline x1='3' y1='27.5' x2='27' y2='27.5' stroke='%23fff' stroke-width='3'/%3E%3C/svg%3E");
  }
}

* {
  font-family: sans-serif;
}

.green-cell {
  background-color: green;
  color: white;
}

.red-cell {
  background-color: red;
  color: white;
}

.yellow-cell {
  background-color: #f6c00f;
  color: #c00603;
}

.content-table {
  border-collapse: collapse;
  box-sizing: border-box;
  margin: 25px 0;
  font-size: 0.9em;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.content-table thead tr {
  background-color: lightpink;
  color: #ffffff;
  text-align: left;
  font-weight: bold;
}

.content-table th,
.content-table td {
  padding: 12px 15px;
}

.content-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.content-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.content-table tbody tr:last-of-type {
  border-bottom: 2px solid lightpink;
}

.content-table tbody tr.active-row {
  font-weight: bold;
  color: lightpink;
}

@media screen {
  .footer {
    position: static;
  }
}

nav ul {
  overflow: initial;
  --_gap: 2rem;
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  color: inherit;
  opacity: 0.7;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
}

nav a:hover,
nav a:focus-visible {
  opacity: 1;
}

nav li {
  position: relative;
  padding: calc(var(--_gap) / 2);
  min-inline-size: 3rem;
}

nav li::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 3px;
  background-color: hotpink;
  translate: var(--_translate, 0);
  scale: var(--_scale, 0) 1;
  transition: scale 100ms var(--_scale-delay, 0ms), translate 200ms;
}

nav li:hover~li {
  --_translate: -100%;
  --_scale-delay: 200ms;
}

nav:hover li {
  --_translate: 100%;
  --_scale-delay: 200ms;
}

nav li:hover {
  --_scale: 1;
  --_translate: 0;
  --_scale-delay: 0ms;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  margin-right: 10px;
}

.smaller-font {
  font-size: 14px;
}

body {
  margin: 0;
  padding-bottom: 50px;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f5f5f5;
  padding: 10px;
}

.table-container {
  margin-bottom: 20px;
}

textarea {
  text-indent: 0;
}

table {
  border-collapse: collapse;
  width: 90%;
  margin: 0 auto;
  height: 95%;
}

.small-table {
  width: 30%;
}

.clear-border {
  border: none;
}

.rounded-border-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #f43e70;
  border-radius: 50%;
  overflow: hidden;
  padding: 20px;
}

/* ========================
   Tile styles
   ======================== */

.tile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: left;
}

.tile {
  width: 310px;
  min-height: 100px;
  height: auto;
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.tile-lg {
  width: 500px;
  min-height: 300px;
  height: auto;
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.tile-md {
  width: 330px;
  min-height: 200px;
  height: auto;
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.tile-sm {
  width: 150px;
  min-height: 100px;
  height: auto;
  background-color: #f0f0f0;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.tile-lg-chart {
  width: 500px;
  height: 300px;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  display: block;
  overflow: hidden;
  position: relative;
}

.tile-lg-chart canvas {
  width: 100% !important;
  height: 250px !important;
  display: block;
}

/* Inventory tiles */
.inv-tile {
  width: 310px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  margin: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow 0.15s;
}

.inv-tile:hover {
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
  background: #e8e8e8;
}

.inv-tile-title {
  font-size: 12px;
  font-weight: bold;
  line-height: 1.3;
  word-break: break-word;
}

.inv-tile-middle {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
}

.inv-tile-image {
  flex-shrink: 0;
}

.inv-tile-qty {
  flex: 1;
  font-size: 12px;
  text-align: right;
  line-height: 1.6;
}

.inv-tile-prices {
  font-size: 12px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #ddd;
  padding-top: 4px;
}

.inv-sale-badge {
  color: #c0392b;
  font-weight: bold;
  font-size: 11px;
}

.tile-title {
  font-size: 20px;
  position: relative;
  top: 0px;
  left: -80px;
  color: rgba(0, 0, 0, 0.5);
}

.single-number-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.single-number-content {
  font-size: 48px;
  text-align: center;
  position: relative;
  left: -70px;
}

.image-container {
  flex-shrink: 0;
  margin-right: 10px;
}

.image-container img {
  max-width: 48px;
  max-height: 70px;
  width: 100%;
}

.text-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
}

.item-title {
  font-weight: bold;
  margin: 0;
}

.item-details {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

th,
td {
  text-align: left;
  padding: 2px;
  border-bottom: 1px solid;
  border: 1px solid #ddd;
  font: 12px sans-serif;
}

.td-text-light {
  text-align: left;
  padding: 2px;
  border-bottom: 1px solid;
  border: 1px solid #ddd;
  font: 12px sans-serif;
  font-weight: 400;
  color: black;
}

.td-text-heavy {
  text-align: left;
  padding: 2px;
  border-bottom: 1px solid;
  border: 2px solid black;
  font: 14px sans-serif;
  font-weight: 700;
  color: black;
}

.hover-text {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid black;
  max-width: 200px;
  padding: 5px;
  z-index: 1;
}

.sub-table-header {
  font-size: 12px;
  font-weight: bold;
  color: black;
  background-color: rgb(227, 239, 243);
  font-family: Arial, sans-serif;
  border: none;
}

.light-pink-cell {
  background-color: rgb(245, 218, 218);
  font-size: 16px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  border: none;
}

.light-pink-cell-bk {
  background-color: rgb(245, 218, 218);
  font-size: 12px;
  color: black;
  font-family: Arial, sans-serif;
  border: none;
  max-height: 12px;
}

.comment-cell:hover .hover-text {
  display: block;
}

.comment-cell:hover .comment-text {
  display: none;
}

tr:hover {
  background-color: rgb(248, 245, 245);
  border-width: 1px;
}

th {
  background-color: #f5f5f5;
  color: rgb(149, 148, 148);
}

table.second-style {
  border-collapse: collapse;
  width: 500px;
  margin: 0 auto;
}

.second-style th,
.second-style td {
  text-align: left;
  padding: 5px;
  border-bottom: 1px solid #ddd;
  font: .7em sans-serif;
}

.second-style tr:hover {
  background-color: #f5f5f5;
  border-width: 1px;
}

#saving {
  display: none;
}

#saving-message {
  display: inline-block;
  vertical-align: middle;
}

.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.red {
  color: red;
}

.dropbtn {
  background-color: #04AA6D;
  color: white;
  padding: 4px 12px;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

.dropbtn:hover,
.dropbtn:focus {
  background-color: #3e8e41;
}

#myInput {
  box-sizing: border-box;
  background-image: url('searchicon.png');
  background-position: 14px 12px;
  background-repeat: no-repeat;
  font-size: 16px;
  padding: 14px 20px 12px 45px;
  border: none;
  border-bottom: 1px solid #ddd;
}

#myInput:focus {
  outline: 3px solid #ddd;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f6f6f6;
  min-width: 300px;
  max-width: 800px;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  z-index: 1;
}

.comment-input {
  border: none;
  outline: none;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.show {
  display: block;
}

.custom-readonly {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

.small-btn {
  font-size: 14px;
  padding: 5px 10px;
}

.btn-smaller {
  font-size: 12px;
  padding: 3px 8px;
  line-height: 1.3;
  white-space: nowrap;
}

.btn-smallest {
  font-size: 11px;
  padding: 2px 6px;
  line-height: 1.3;
  white-space: nowrap;
}

.radio-container {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
}

.radio-container input[type="radio"] {
  margin-right: 10px;
}

.radio-label-container {
  height: 30px;
  line-height: 40px;
  font-weight: bold;
}

.field-container {
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 5px;
  font-size: x-small;
  overflow-x: auto;
}

.readonly-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.readonly-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 5px;
  width: calc(25% - 5px);
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 5px;
  width: calc(66% - 5px);
}

.readonly-row label {
  flex-basis: 35%;
  font-size: 10px;
}

.readonly-row input {
  flex-basis: 65%;
  margin-left: 5px;
  font-size: 10px;
}

.page-title-box {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  background-color: rgb(245, 218, 218);
}

.page-returnMsg-box {
  border: 1px solid #ccc;
  padding: 3px;
  border-radius: 5px;
  background-color: lightblue;
  font-size: xx-small;
}

.page-search-box {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  background-color: white;
  width: 90%;
  margin: 0 auto;
}

.page-table-box {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  background-color: rgb(230, 226, 226);
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.flex-container-sm {
  display: flex;
  flex-direction: row;
  gap: 1em;
  height: 12px;
  font-size: 10px;
}

.box {
  background-color: lightblue;
  border: 1px solid blue;
  min-height: 50px;
  font-size: 2rem;
}

.flex-item {
  flex: 1 1 calc(20% - 10px);
  margin: 2px;
  padding: 4px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
}

.flex-item-2 {
  flex: 1 1 calc(40% - 10px);
  margin: 1px;
  padding: 4px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
}

.flex-item-3 {
  flex: 1 1 calc(60% - 10px);
  margin: 1px;
  padding: 4px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
}

.flex-item-full {
  flex: 1 1 100%;
  margin: 1px;
  padding: 4px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
}

@media screen and (max-width: 768px) {

  .flex-item,
  .flex-item-2,
  .flex-item-3,
  .flex-item-full {
    flex-basis: 100%;
  }
}

.flex-item-newrow {
  flex-basis: 150px;
}

.hover-container {
  position: relative;
}

.hover-image {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  height: auto;
  border: 1px solid #ccc;
  background-color: white;
  padding: 5px;
  z-index: 1;
}

.item-name:hover+.hover-image {
  display: block;
}

.hover-image img {
  width: 200px;
  height: auto;
}

.suspended-status {
  border: 1px solid red;
}

.custom-checkbox {
  opacity: 1;
}

.red-border {
  border: 2px solid red;
}

.invoice-container {
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.custom-input {
  width: 2in;
}

.form-label {
  display: inline-block;
  width: 100px;
}

.greyed-out-link {
  opacity: 0.2;
  pointer-events: none;
}

.color-circle {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
}

.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

#cameraModal .modal-dialog {
  z-index: 1050 !important;
  margin-top: 50px;
  margin-left: 50px;
}

#imageModal .modal-dialog {
  z-index: 1060 !important;
  margin-top: 100px;
  margin-left: 90px;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

/* ========================
   Status & Availability Badges
   ======================== */

.badge-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-square {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 6px;
  line-height: 1.4;
  white-space: nowrap;
}

/* Semantic colors - reused across statuses */
.badge-green {
  background-color: #EAF3DE;
  color: #27500A;
}

.badge-red {
  background-color: #FCEBEB;
  color: #791F1F;
}

.badge-blue {
  background-color: #E6F1FB;
  color: #0C447C;
}

.badge-amber {
  background-color: #FAEEDA;
  color: #633806;
}

.badge-gray {
  background-color: #F1EFE8;
  color: #444441;
  border: 1px solid #D3D1C7;
}