﻿#datatable-customers tbody tr:hover {
  background-color: #f8f9fa; /* Very light grey - Bootstrap's light color */
  cursor: default; /* Keep default cursor unless rows are clickable */
}

.datatable-hidden {
  display: none;
}

/* Overrides ToastR */
/* Remove transparency for all toasts */
.toast {
  opacity: 1 !important;
}

.toast-success {
  background-color: orange !important;
  border-color: orange !important;
}

.vue3-modal-placeholder-grey::placeholder {
  color: #d3d3d3;
  opacity: 1;
  font-style: italic;
}

.unread-badge {
  background-color: var(--bs-red);
  font-size: 10px;
}

.no-select {
  user-select: none;
}

/* DataGrid */
.datagrid-row {
  cursor: pointer;
}

  .datagrid-row:hover {
    background-color: #fafafa;
  }

.datagrid-action-column-header {
  width: 0px;
}

.datagrid th.sortable {
  position: relative;
  padding-right: 5px;
  cursor: pointer;
  vertical-align: middle;
}

.datagrid-header-caption {
  display: flex;
  align-items: center;
  justify-content: space-between; /* caption left, icon right */
  width: 100%;
  padding-top: 4px;
  box-sizing: border-box;
}

.datagrid th.sortable[rowspan="2"] {
  vertical-align: bottom;
}

.datagrid-sort-icon {
  display: inline-block;
  width: 1em;
  text-align: center;
  font-style: normal;
  margin-left: 4px;
  line-height: 1;
  vertical-align: middle;
  font-size: 0.7em; /* overall size */
}

.datagrid-sort-icon::before,
.datagrid-sort-icon::after {
  display: block;
  line-height: 0.9em; /* spacing between arrows */
  color: #ccc; /* inactive color */
}

.datagrid-sort-icon::before {
  content: '▲';
}

.datagrid-sort-icon::after {
  content: '▼';
}

/* Ascending active */
.datagrid-sort-icon[data-sort="asc"]::before {
  color: #888;
}

/* Descending active */
.datagrid-sort-icon[data-sort="desc"]::after {
  color: #888;
}

/* DataGrid Historic view classes */
.datagrid-historic-past-row {
    /*background-color: #f0f0f0;*/
    /*text-decoration: line-through;*/

    color: darkgray;
}

.datagrid-historic-past-row * {
    color: inherit !important;
}

.datagrid-historic-current-row {
}

tr.datagrid-historic-current-row span.datagrid-historic-current-row-first-field {
    font-weight: bold;
}
.datagrid-historic-future-row {
    font-style: italic;
}

.datagrid-actions-menu:hover {
    color: var(--bs-green) !important;
}

.datagrid-column-quickaction-icon {
    transform: scale(1.6);
    transform-origin: center;
    display: inline-block;
    color: #e0e0e0 !important;
    
}

.datagrid-column-quickaction-icon-active {
    color: var(--bs-green) !important;
}

.datagrid-column-quickaction-icon-available:hover {
    color: orange !important;
}

/* DateTimePicker */
.datetimepicker-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.datetimepicker-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  z-index: 2;
}

.datetimepicker-display-disabled {
    opacity: 0.5;
    pointer-events: none; 
    background-color: #f0f0f0;
    user-select: none;
}

.datetimepicker-text {
  flex: 1;
}

.datetimepicker-icon {
  font-size: 14px;
  margin-left: 8px;
}

.datetimepicker-native {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  pointer-events: none;
}

.tabbar.nav-link.active {
  background-color: #41cc83 !important;
  border-color: #41cc83 !important;
  color: white !important;
}

/* EditPrice Component */
.edit-price-zero {
  color: black !important;
}

.edit-price-negative {
  color: #41cc83 !important;
}

.editable-wrapper {
  display: inline-block;
  position: relative;
}

.editable-wrapper.editing {
  position: relative;
  z-index: 100;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.editable-price-link {
  text-decoration: underline;
  cursor: pointer;
  color: #e32626
}

.edit-mode {
  display: flex;
  align-items: center;
}

.editable-input {
  width: 80px;
  font-size: 1em;
}

.save-btn,
.cancel-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  padding: 0px;
  margin: 0px;
}

/* EditSplitValue */
.edit-split {
  display: inline-block;
  position: relative;
  z-index: 1;
}

.edit-split.editing {
  background: white;
  z-index: 1000;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.edit-link {
  cursor: pointer;
}

.edit-link:hover {
  color: orange;
}

.edit-fields {
  display: flex;
  align-items: center;
}

.edit-input {
  width: 50px;
  padding: 2px;
}

/* Select2 */
/* Base Select2 container to look like Bootstrap form-select */
.select2-container--default .select2-selection--single {
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem; /* same as Bootstrap's .form-select */
  height: calc(2.25rem + 2px); /* matches .form-select height */
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.select2-container--default .select2-selection__arrow b {
  display: none; /* removes native arrow triangle */
}

.select2-container--default .select2-selection--single .select2-selection__arrow::after {
  content: '';
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #6c757d;
  border-bottom: 2px solid #6c757d;
  transform: rotate(45deg); /* down-right */
  position: absolute;
  top: 50%;
  right: 0.6rem;
  margin-top: -0.25rem; /* adjusts vertical alignment */
}

/* Remove default Select2 arrow and add Bootstrap-like one if needed */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 0.75rem;
  width: 1.75rem;
}

/* Style the selected text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #212529;
  line-height: 1.5;
  padding-left: 0;
}

/* Focus state (optional to match Bootstrap's focus ring) */
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap's focus ring */
}

/* Dropdown styling */
.select2-container--default .select2-dropdown {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15); /* Optional Bootstrap-like dropdown shadow */
}

/* Optional: hover effect */
.select2-container--default .select2-selection--single:hover {
  border-color: #b3b3b3;
}

/* Adds the magnifier to the searchbox */
.select2-search-container-search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #6c757d;
  pointer-events: none;
}

/* Adds padding to the input for searching, so the text doesn't overflow on the icon */
.select2-search-container-input {
  padding-right: 2rem !important;
}

/* Fixes for when in use on a bootstrap modal */
.modal-select2 .select2-selection--single {
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 8px !important;
}

.modal-select2 .select2-selection__rendered {
  line-height: normal !important;
  display: flex !important;
  align-items: center !important;
}

.modal-select2 .select2-selection__arrow {
  height: 100% !important;
  top: 0 !important;
  display: flex;
  align-items: center;
}

/* EditSelect */
.edit-select-wrapper {
    display: inline-block;
    position: relative;
    z-index: 1;
}

.edit-select-wrapper.editing {
    background: white;
    z-index: 1000;
    padding: 4px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.edit-select-link {
    cursor: pointer;
}

.edit-select-link:hover {
    color: orange;
}

.edit-select-fields {
    display: flex;
    align-items: center;
    gap: 4px;
}

.edit-select-dropdown {
    padding: 2px 6px;
    width: 70px;
}