:root {
  --color-primary: #2e5dc0;
  --color-primary-accent: #154ab7;
  --color-primary-subtle: #e9ecef;
  --color-link: #0b5ec2;
  --color-danger: #e60000;
  --color-red-light: #fde2e1;
  --color-green-light: #d1e6dd;
  --color-black: #000000;
  --color-text: #4f575f;
  --color-input-border: #e6ebf1;
  --color-input-background: #f8f9fa;
  --hover-bg-light: #f8f9fa;
  --color-primary-light: #f4f6fc;
  --text-muted: #858181;
  --color-hover-bg: #f8f9fa;
  --divider: #e8e8e8;
  --color-input-control-border: #ccc8c8;
  --transition: all 0.3s ease;
  --dark-gray: #6c757d;
  --color-border: #e6ebf1;
  --color-divider: #e8e8e8;
  /* ---- */
  --color-secondary: #eb841d;
  --color-text-muted: #cdd4d8;
  /* Muted or light text for secondary use */
  --color-success: #279d42;
  --color-neutral-light: #7f7f7f;

  --color-primary-muted: #b5c4d6;
  --color-pending: #fdf5e4;
  --color-pending-border: #f8ebcf;
  --color-step-background-inactive: #f5f5f6;

  --color-info-background: #212529;
  /* --empty-state-color: #888888; */
}
.adi-shop-inventory-page-Plat-Comp-LayoutRoot {
  max-width: 1100px;
}
.adi-shop-inventory-page-uploadExcelBtn {
  background-color: var(--color-link);
  color: #fff;
  border-radius: 5px;
}
.adi-shop-inventory-page-uploadExcelBtn:hover {
  background-color: var(--color-link);
  color: #fff;
  filter: brightness(1.15);
}
.adi-shop-inventory-page-search-filter-section {
  width: 80%;
}
.adi-shop-inventory-page-selectall-checkbox,
.adi-shop-inventory-page-row-checkbox {
  width: 1rem;
  height: 1rem;
}
.adi-shop-inventory-page--header-item,
.adi-shop-inventory-page-Plat-Comp-DataGridItemRow {
  grid-template-columns: 50px 1.5fr 1.2fr 1fr 0.7fr 80px;
}
.adi-shop-inventory-page-Plat-Comp-DataGridItemRow {
  padding: 0.65rem 1.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.adi-shop-inventory-page-Plat-Comp-DataGridItemRow:hover {
  z-index: 2;
}
.adi-shop-inventory-page-inventory-list-container {
  transition: opacity 0.3s ease-in-out;
}
.Adi-Plat-Comp-Dropdown-Menu .aadi-dropdown-option {
  padding: 6px 1rem;
}
.adi-shop-inventory-page-inventory-name {
  color: var(--color-link);
  cursor: pointer;
  font-weight: 600;
}
/* Add ellipsis when Name column text overflows */
.adi-shop-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
  cursor: pointer;
  padding-right: 20px;
}

.adi-shop-inventory-page-inventory-name:hover {
  text-decoration: underline;
}
.adi-shop-inventory-page-upload-modal .modal-body,
.adi-shop-inventory-page-edit-inventory-modal .modal-body,
.adi-shop-inventory-page-viewInventoryModal .modal-body,
.adi-shop-inventory-page-deleteConfirmModal .modal-body {
  padding-inline: 20px !important;
}
.adi-shop-inventory-page-edit-inventory-modal .modal-dialog {
  padding: 20px;

  /* margin-right: 40px; */
}
.adi-shop-inventory-page-deleteConfirmModal .modal-body {
  padding-bottom: 30px !important;
}
.adi-modal-btn-submit {
  background-color: var(--color-primary) !important;
  color: white !important;
}
.adi-modal-btn-submit:hover {
  background-color: var(--color-link);
  color: #fff;
  filter: brightness(1.15);
}
.adi-shop-inventory-page-border-btn {
  border: 1px solid var(--color-primary);
}
.adi-shop-inventory-page-floating-delete-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  gap: 15px;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

/* Hide labels on desktop */
@media (min-width: 768px) {
  .adi-shop-inventory-page-mobile-label {
    display: none;
  }
}
.adi-shop-inventory-page-floating-delete-bar.visible {
  visibility: visible !important;
  opacity: 1 !important;
}
/* Form Styling */
.Adi-Plat-Comp-Form-Label {
  font-weight: 700;
  font-size: 1rem;
  color: #343a40;
  margin-bottom: 0.25rem;
}
.Adi-Plat-Comp-Form-Control {
  margin-bottom: 10px !important;
  border-radius: 0.275rem !important;
  padding: 6px 15px !important;
  background-color: #fff !important;
}
.Adi-Plat-Comp-Form-Control:focus {
  box-shadow: 0 0 0 0.05rem rgb(90, 155, 246) !important;
}

/* Validation: remove green ticks/red borders */
.Adi-Plat-Comp-Form-Control.is-valid,
.Adi-Plat-Comp-Form-Control:valid {
  border-color: #ced4da !important;
  background-image: none !important;
  padding-right: 0.75rem !important;
}
.Adi-Plat-Comp-Form-Control.is-invalid,
.Adi-Plat-Comp-Form-Control:invalid {
  border-color: #ced4da !important;
  background-image: none !important;
  padding-right: 0.75rem !important;
}
.invalid-feedback {
  color: var(--color-danger);
  margin-top: -7px;
  font-size: 0.9rem;
}
.Adi-Plat-Comp-Form-Section-Heading {
  font-size: 1rem;
  color: var(--color-primary);
  padding-left: 8px;
}
.Adi-Plat-Comp-Form-Drop-Zone {
  border: 1px solid #ced4da;
  padding: 2rem;
  margin-top: 5px;
}
.Adi-Plat-Comp-Form-Drop-Zone:hover {
  border: 1px solid rgb(69, 145, 216);
}
/* Reorder box */
.adi-shop-inventory-page-reorder-fields {
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: #fcfcfc;
}

/* Style for the displayed values */
.adi-shop-inventory-page-value {
  font-size: 1rem;
  line-height: 1.5;
  padding-left: 0.1rem;
  color: #495057;
  min-height: calc(1.5em + 0.75rem + 2px);
  display: block;
}

/* Reorder fields styling  */
.adi-shop-inventory-page-reorder-fields {
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: #fcfcfc;
}
/* Subtle “row updated” flash */
@keyframes rowPulse {
  0% {
    background-color: #dee7f0;
  }
  100% {
    background-color: transparent;
  }
}
.Adi-Plat-Comp-row-updated {
  animation: rowPulse 1s ease-in-out;
}
.adi-shop-inventory-page-fa-cloud-arrow-up {
  font-size: 1.5rem;
}
.adi-shop-inventory-page-form-check-input {
  border: 1px solid #acb0b4 !important ;
}
.adi-shop-inventory-page-form-check-label {
  padding-top: 2px;
}
/* Highlight selected rows */
.Plat-Comp-DataGridItemRow.selected-row {
  background-color: #f1f8ff; /* light blue background */
  transition: background-color 0.2s ease;
}
/* Specific z-index handling only for ADI Shop Inventory Page */
body.transport-active-contracts-body
  #floatingDeleteBar.adi-shop-inventory-page-floating-delete-bar {
  z-index: 1040 !important; /* Below the modal */
}

/* Target only the delete confirmation modal and its backdrop */

.adi-shop-inventory-page-deleteConfirmModal.modal.show {
  z-index: 1055 !important; /* Slightly above backdrop */
}

.adi-shop-inventory-page-deleteConfirmModal + .modal-backdrop.show {
  z-index: 1050 !important; /* Backdrop above floating bar */
}
/* Sorting */
.adi-shop-inventory-page-sortable {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.adi-shop-inventory-page-sortable:hover .sort-icon {
  color: #000;
}
.adi-shop-inventory-page-sortable.active-sort {
  font-weight: 600;
  color: #000;
}
@media (min-width: 360px) and (max-width: 767px) {
  .adi-shop-inventory-page-search-filter-section {
    width: 100%;
  }

  /* Mobile-friendly layout for adi-shop rows */
  /* Make each row a stacked card */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow {
    display: flex;
    flex-direction: column;
    padding: 12px 14px 10px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    position: relative;
  }

  /* Hide table header */
  .adi-shop-inventory-page--header-item {
    display: none !important;
  }

  /* --- FIRST LINE (Name + Checkbox + Dropdown) --- */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(2) {
    font-weight: 600;
    font-size: 1rem;
    color: #222;
    padding-right: 70px;
  }

  /* Position checkbox and dropdown side by side (top-right) */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(1),
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(6) {
    position: absolute;
    top: 15px;
  }

  /* Checkbox on right side, before dropdown */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(1) {
    right: 75px;
    z-index: 2;
  }

  /* Dropdown on far right */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(6) {
    top: 5px;
    right: 12px;
    /* left: 90%; */
    z-index: 3;
    width: fit-content;
  }

  /* Ensure dropdown menu opens above other elements */
  .Adi-Plat-Comp-Dropdown-Menu {
    z-index: 9999 !important;
  }

  /* --- SECOND LINE (Inventory Number) --- */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(3) {
    order: 3;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #000000;
  }

  /* --- THIRD LINE (Unit Price + Stock together) --- */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(4),
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(5) {
    order: 4;
  }

  .adi-shop-item-unitprice,
  .adi-shop-item-stock {
    display: flex !important;
    align-items: center;
    font-size: 0.9rem;
    color: #000000 !important;
    width: 100%;
    margin-top: 5px;
  }
  .adi-shop-item-unitprice {
    margin-right: auto;
  }

  .adi-shop-item-stock {
    margin-left: auto;
  }

  /* Disable grid layout from desktop */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow {
    grid-template-columns: none !important;
  }
  .adi-shop-inventory-page-mobile-label {
    display: inline-block;
    font-size: 0.95rem;
    color: #646363;
  }

  .adi-shop-item-name {
    font-weight: 600;
    font-size: 1rem;
  }
  .adi-shop-inventory-page-floating-delete-bar.visible {
    padding-inline: 0.5rem;
    gap: 8px;
    bottom: 50px;
  }
  .adi-shop-inventory-page-floating-delete-bar .btn-danger {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }
  .adi-shop-inventory-page-floating-delete-bar .deselect-All-Btn {
    padding: 0.35rem 0.7rem;
  }

  /* Make the two columns share one flex row */
  .adi-shop-item-unitprice {
    order: 4;

    margin-top: 5px;
  }

  .adi-shop-item-stock {
    order: 5;

    margin-top: 5px;
  }

  /* Force both to sit side by side, not stacked */
  .adi-shop-item-unitprice + .adi-shop-item-stock {
    display: flex;
  }

  /* Optional — hide any transparent color mistake */
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(4),
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(5) {
    color: #000 !important;
  }
  .adi-shop-item-laptop-only {
    display: none !important;
  }
  .adi-shop-inventory-page-mobile-sort-dropdown {
    width: fit-content;
    min-width: 90px;
    padding: 2px 8px;
    font-size: 14px;
    border-radius: 6px;
    display: inline-block;
  }
}
@media (min-width: 360px) and (max-width: 567px) {
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(1) {
    right: 50px;
  }
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(6) {
    left: 90%;
  }
}
@media (min-width: 360px) and (max-width: 450px) {
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(1) {
    right: 47px;
  }
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(6) {
    left: 88%;
  }
}
@media (min-width: 360px) and (max-width: 370px) {
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(1) {
    right: 42px;
  }
  .adi-shop-inventory-page-Plat-Comp-DataGridItemRow > div:nth-child(6) {
    left: 88%;
  }
}
