/* =========================================================
   GLOBAL STYLES ACROSS ALL FORMS
   ========================================================= */

html,
body {
  height: 100%;
}

body {
  /* min-width: 950px; removed for responsiveness */
  font-family: "Lexend Deca", "Segoe UI", Arial, sans-serif !important;
  font-optical-sizing: auto;
  font-size: 15px;
  background-color: #f5f8fa !important;
}

.text-right {
  text-align: right;
}

a {
  color: #0074c7;
  text-decoration: none;
  transition: color 0.2s ease-out;
}

a img {
  text-decoration: none;
}

input {
  padding: 2px;
  margin: 2px;
  border: 1px solid #0074c7;
  border-radius: 3px;
  font-size: 16px;
}

input.numeric {
  text-align: right;
}

input[readonly="readonly"] {
  background-color: #e0e0eb;
  color: #000;
}

textarea {
  border: 1px solid #b88a00;
  border-radius: 3px;
  font-family: "UniversCondensed", Helvetica, Arial, sans-serif;
  font-size: 16px;
  margin: 2px 0;
  padding: 5px;
}

legend {
  border-bottom: 2px solid #0074c7;
  color: #4c3000;
  font-size: 20px;
  font-weight: 700;
  padding: 5px 20px;
}

fieldset {
  border: 2px solid #0074c7;
  background-color: transparent;
  margin: 15px;

  /* removed by BG on 12/06/2025
  background: -webkit-linear-gradient(90deg, #E6F0FA, #FFFFFF) repeat scroll 0 0 transparent;
  background: -moz-linear-gradient(90deg, #E6F0FA, #FFFFFF) repeat scroll 0 0 transparent;
  */
}

fieldset input select {
  margin: 5px;
}

hr {
  display: block;
  position: relative;
  width: 100%;
  margin: 8px auto;
  clear: both;
  border: none;
  border-top: 1px dashed #aaa;
  border-bottom: 1px dashed #fff;
  font-size: 1px;
  line-height: 0;
  overflow: visible;
}

/* =========================================================
   MISC / HELPERS
   ========================================================= */

#customerSelect,
#searchItems {
  display: block;
  /* float: left; commented out to fix styling on 11/01/2025 BG */
  font-weight: 700;
  padding: 0 0 10px;
  clear: both;
}

.longInputText {
  width: 275px;
}

.shortInputText {
  width: 50px;
}

.selectedBox {
  /* Dynamic style applied to text boxes onFocus */
  background-color: #bffff5;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  margin-left: -50px; /* half width of the loader gif */
  margin-top: -50px;  /* half height of the loader gif */
  text-align: center;
  z-index: 9999;
  overflow: auto;
}

.warning {
  position: fixed;
  top: 40%;
  left: 50%;
  margin-left: -250px;
  z-index: 9999;
}

.pageTitle {
  color: #2d3e50;
  font-size: 30px;
  margin: 30px 0 0 0;
  width: 100%;
  display: inline-block;
}

/* =========================================================
   INFORMATION AREA
   ========================================================= */

#InformationContainer {
  border: 1px solid #8e846b;
}

#Information {
  padding: 10px;
}

#Information a {
  color: #0074c7;
  text-decoration: none;
}

#Information a:hover {
  color: red;
  border-bottom: 1px dotted;
  transition: border 0.2s ease-out;
}

#Information img {
  color: #0074c7;
  border-bottom: none;
  text-decoration: none;
}

.InfoDisplayTable th {
  text-align: left;
  border: none;
  width: 100px;
  font-weight: normal;
}

.InfoDisplayTable td {
  padding-right: 2px;
}

/* =========================================================
   TABLE BASE STYLES
   ========================================================= */

table {
  border-collapse: collapse;
  width: 100%;
  margin: auto;
  font-family: "UniversCondensed", Helvetica, Arial, sans-serif;
  color: #333;
}

table td {
  padding: 0;
}

/* =========================================================
   LINE-ITEM TABLE STYLES
   ========================================================= */

table.lineItemTable th,
table.lineItemTable td {
  border: 1px solid #000;
}

table.lineItemTable th {
  font-size: 18px;
}

table.lineItemTable tr,
.itemRow,
.blankRow {
  border-bottom: 1px dotted #000;
}

table.lineItemTable {
  border: 1px solid #000;
}

#fintotal,
#baltotal,
#apptotal,
#unapptotal {
  font-size: 120%;
  font-weight: 700 !important;
}

.itemRow input.numeric {
  width: 65px;
  text-align: right;
}

#lineItemTable {
  background-color: #fff;
  width: 100% !important;
}

/* =========================================================
   DATATABLES (LEGACY) COMMON STYLES
   ========================================================= */

.page {
  width: 60%;
  margin: auto;
  height: 20px;
  text-align: right;
  margin-bottom: 5px;
}

.paginate_disabled_previous,
.paginate_enabled_previous,
.paginate_disabled_next,
.paginate_enabled_next {
  height: 19px;
  width: 19px;
  margin-left: 3px;
  float: left;
}

.paginate_disabled_previous {
  background-image: url("/JSI/js/DataTables-1.7.5/media/images/back_disabled.jpg");
}

.paginate_enabled_previous {
  background-image: url("/JSI/js/DataTables-1.7.5/media/images/back_enabled.jpg");
}

.paginate_disabled_next {
  background-image: url("/JSI/js/DataTables-1.7.5/media/images/forward_disabled.jpg");
}

.paginate_enabled_next {
  background-image: url("/JSI/js/DataTables-1.7.5/media/images/forward_enabled.jpg");
}

.paging_full_numbers {
  width: 400px;
  height: 22px;
  line-height: 22px;
}

.paging_full_numbers span.paginate_button,
.paging_full_numbers span.paginate_active {
  padding: 2px 5px;
  margin: 0 3px;
  cursor: pointer;
  border: 1px solid #d19405;
  border-radius: 5px;
  font-family: Helvetica, Arial, sans-serif;
  text-shadow: 0 1px 0 #fff;
  color: #000;
  background: -moz-linear-gradient(center top, #fcfcfc, #d9dde0) repeat scroll 0 0 transparent;
}

.paging_full_numbers span.paginate_button {
  background-color: #ddd;
}

.paging_full_numbers span.paginate_button:hover {
  background-color: #ccc;
}

.paging_full_numbers span.paginate_active {
  background-color: #99b3ff;
}

.dataTables_processing {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 30px;
  margin-left: -125px;
  margin-top: -15px;
  padding: 14px 0 2px 0;
  border: 1px solid red;
  text-align: center;
  color: #000;
  font-size: 14px;
  font-weight: bold;
  background-color: #deebff;
}

/* =========================================================
   CC TABLE
   ========================================================= */

table.ccTable {
  width: 60%;
  border-collapse: collapse;
  border: 1px solid #000;
  text-align: center;
}

table.ccTable td {
  border: 1px solid #000;
  text-align: center;
}

input.RentalButton {
  font-size: xx-large;
  font-weight: bold;
  color: blue;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.CommonSubmit,
input#EquityButton,
input#ExchangeButton,
input#ReturnButton,
input#PaymentButton,
input#ReopenButton,
input#AddButton,
input#applycredits,
input#autoapply,
input#VoidTransactionButton,
input#submit,
input#PrintNoticeButton {
  background: -moz-linear-gradient(center top, #fcfcfc, #d9dde0) repeat scroll 0 0 transparent;
  border: 1px solid #b88a00;
  border-radius: 5px;
  font-family: "Segoe UI", Arial, sans-serif !important;
  font-size: 15px !important;
  padding: 5px;
  text-shadow: 0 1px 0 #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}

.CommonSubmit:hover,
input#EquityButton:hover,
input#ExchangeButton:hover,
input#ReturnButton:hover,
input#PaymentButton:hover,
input#ReopenButton:hover,
input#AddButton:hover,
input#applycredits:hover,
input#autoapply:hover,
input#VoidTransactionButton:hover,
input#submit:hover,
input#PrintNoticeButton:hover {
  box-shadow: 0 0 5px #cc7a00;
  color: #d19405;
}

input[type="button"],
input[type="submit"] {
  background: -moz-linear-gradient(center top, #fcfcfc, #d9dde0) repeat scroll 0 0 transparent;
  border-radius: 5px;
  border: 1px solid #b88a00;
  cursor: pointer;
  font-family: "Segoe UI", Arial, sans-serif !important;
  padding: 5px;
  font-weight: 700;
  transition: all 0.25s ease-in-out;
}

/* =========================================================
   FORMS / LAYOUT
   ========================================================= */

#POSToggle {
  margin: 0 30px;
}

#soSelect,
#invSelect {
  border: 1px solid #d19405;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  margin-right: 15px;
}

#PrintReceiptFormContainer {
  float: right;
}

#ButtonMenuleft {
  float: left;
  width: 75%;
}

#ButtonmenuRight {
  float: left;
  width: 25%;
  text-align: right;
}

#ccmaintenance {
  margin-top: 10px;
}

#RentalForm {
  padding: 0 0 15px 0;
}

#searchForm {
  text-align: left;
  padding: 0 0 10px 0;
  clear: both;
}

#lineItemHolder {
  padding: 25px 0;
  margin-bottom: 5px;
}

#salesOrders,
#loadInvoices {
  text-align: right;
  clear: both;
}

#tabStrip {
  clear: both;
}

#warningDisplay {
  background-color: #f2f2f2 !important;
  border: 3px solid red !important;
  border-radius: 5px;
  box-shadow: 0 0 10px #fc4a14;
  color: #fc4a14;
  font-size: large;
  font-weight: bold;
  padding: 5px;
  /* width: 475px!important; commented out style for responsiveness */
}

/* Checkboxes */
#lrush,
#lhold,
#ldeclined,
#lnopartialshipments,
#lautochrg,
#lodachrg,
#lmaneq,
#lrestrict,
#notices,
#lsoemail {
  margin-right: 15px;
}

/* Radio Buttons */
#overwriteBilling,
#overwriteShipping {
  margin-right: 5px;
}

#autochargefields {
  margin: 10px;
}

/* =========================================================
   TABLE THEMING (shared)
   ========================================================= */

#CCDialogTable,
#ItemInfoTable,
#transactionTable,
#SearchTable,
#rentalTable {
  background-color: #fff;
  font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
  font-size: 12px;
  text-align: left !important;
  border-collapse: collapse;
  border: 2px solid #2d3e50;
}

#ItemInfoTable tr {
  border-bottom: 1px dotted #000;
}

#ItemInfoTable tbody {
  border: 1px solid #000;
}

#lineItemTable th,
#ItemInfoTable th,
#transactionTable th,
#SearchTable th,
#rentalTable th {
  font-size: 14px;
  font-weight: 700;
  padding: 8px;
  border: 1px dotted #aabcfe;
  background: #fff;
  border-top: 2px solid #0074c7;
  border-bottom: 1px solid #fff;
  color: #0074c7;
}

#lineItemTable td,
#ItemInfoTable td,
#transactionTable td,
#SearchTable td,
#rentalTable td {
  border: 1px dotted #aabcfe;
  padding: 0 8px;
  border-bottom: 1px solid #fff;
  color: #000;
  border-top: 1px solid transparent;
}

#lineItemTable tr:hover td,
#ItemInfoTable tr:hover td,
#transactionTable tr:hover td,
#SearchTable tr:hover td,
#rentalTable tr:hover td {
  background: #ff9f0f;
  color: #000;
}

caption {
  color: #0074c7;
  font-weight: 700;
  font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
  padding-bottom: 5px;
}

/* CC Dialog table cells */
#CCDialogTable td,
#CCDialogTable th {
  border: none !important;
  padding: 3px;
}

/* =========================================================
   SEARCH TABLE (authoritative block)
   ========================================================= */

#SearchTable {
  border-collapse: collapse;
  margin-top: 10px;
  max-width: 100% !important;
  text-align: center;
}

#SearchTable_info {
  width: 50%;
  height: 20px;
  float: right;
  font-weight: bold;
  text-align: right;
}

#SearchTable_paginate {
  float: right;
  width: 50%;
  text-align: right;
}

.dataTables_wrapper .dataTables_filter {
  float: none !important;
  text-align: left !important;
}

div.top {
  height: 40px;
}

/* =========================================================
   DATATABLES RESPONSIVE CONTROL-CELL (the CSS you asked for)
   Place here so it overrides generic table styles cleanly.
   ========================================================= */

/* Make the control cell easier to tap */
#SearchTable td.dtr-control {
  position: relative;
  min-width: 48px;
  width: 48px;
  padding: 0;
}

/* Center the responsive icon in the top half (arrow zone) */
#SearchTable td.dtr-control::before {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

/* Divider between arrow zone and radio zone */
#SearchTable td.dtr-control::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
}

/* Place radio button in lower half */
#SearchTable td.dtr-control input[type="radio"] {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) scale(1.15);
}

/* =========================================================
   JQUERY UI DIALOG (Search Dialog)
   ========================================================= */

.ui-dialog {
  z-index: 1005 !important;
}

.ui-widget-header {
  border: 1px solid #2d3e50;
  background: #2d3e50;
}

.ui-dialog-title {
  color: #e2e2e2;
}

.ui-dialog-titlebar-close {
  width: 24px;
  height: 24px;
  background: #e2e2e2;
}

.ui-dialog-titlebar-close::before {
  content: "×";
  font-size: 30px;
  line-height: 8px;
}

.ui-dialog .ui-dialog-titlebar-close {
  position: absolute;
  right: 0.3em;
  top: 50%;
  width: 22px !important;
  height: 20px;
  margin: -11px 0 0 0;
  padding: 1px;
}

.ui-dialog .ui-dialog-content {
  /* your mobile override adjusts this further */
}

#LookupDialog table {
  background-color: #fff;
}

/* Datepicker */
.ui-datepicker-trigger {
  width: 26px;
  height: 26px;
  margin: 8px 5px;
}

/* =========================================================
   BRUCE'S OVERRIDES / BOOTSTRAP-ish
   ========================================================= */

.form-signin {
  max-width: 330px;
  padding: 1rem;
}

.form-signin .form-floating:focus-within {
  z-index: 2;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.LoginForm h1 span,
a.navbar-brand span {
  font-family: "Nunito", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color: #0b5ed7;
  letter-spacing: 12px;
  font-weight: 800;
  font-size: 16px;
  border-top: 1px solid #0b5ed7;
  border-bottom: 1px solid #0b5ed7;
  padding: 3px 0 4px 10px;
}

div[class^="col-"] {
  margin: 0.5rem 0 !important;
}

.mnotepad,
.cemail {
  max-width: 100%;
}

.navbar {
  position: relative;
  z-index: 1000;
  background-color: #2d3e50 !important;
}

.dropdown-divider {
  border-top: 1px solid #ccc !important;
}

.brandLogo {
  max-width: 200px;
}

.welcomeMsg {
  color: #ffffff;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show,
.navbar-nav .nav-link {
  color: rgb(223, 227, 235) !important;
}

.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.ui-widget {
  font-family: inherit !important;
  font-size: 1em;
}

.ui-widget-header {
  border: 1px solid #fff !important;
  background: #2d3e50 !important;
}

.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
  padding: 0.35em 0.5em !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.btn.btn-primary {
  font-weight: 700 !important;
  color: #fff;
  border-color: rgb(232, 113, 83) !important;
  background-color: rgb(232, 113, 83) !important;
}

.btn:hover {
  color: #fff;
  background-color: rgb(255, 143, 115) !important;
  border-color: rgb(255, 143, 115) !important;
}

select {
  width: 100% !important;
  max-width: 100% !important;
}

@media (min-width: 992px) {
  .longInputText {
    width: 275px !important;
    flex-grow: 0;
  }

  select {
    width: 275px !important;
    max-width: 275px !important;
  }
}

.form-check-input-lg {
  width: 1.5em;
  height: 1.5em;
}

#ccustno {
  text-transform: uppercase;
}

footer {
  font-size: 10px;
  font-weight: 800;
}

/* =========================================================
   RESPONSIVE: DIALOG + SEARCH TABLE LAYOUT
   ========================================================= */

@media (max-width: 600px) {
  .ui-dialog {
    width: 95% !important;
    left: 2.5% !important;
    height: 100%;
    top: 10px !important;
  }

  .ui-dialog .ui-dialog-content {
    padding: 0.25em !important;
  }

  .desktop-footer {
    display: none;
  }

  .mobile-footer {
    display: block;
    font-size: 1.25rem;
  }

  .copyright {
    font-size: 1.25rem;
  }

  #SearchTable_filter {
    padding-left: 10px;
    float: none;
    width: 100%;
  }

  table.dataTable > tbody > tr.child ul.dtr-details {
    margin-top: 5px !important;
  }

  /* Stack DataTables filter + pagination inside the "top" container */
  #SearchTable_wrapper .top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto !important;
  }

  /* Kill DataTables floats so they stop overlapping */
  #SearchTable_wrapper .dataTables_filter,
  #SearchTable_wrapper .dataTables_paginate {
    float: none !important;
    width: 100% !important;
    position: static !important;
  }

  /* Pagination centered */
  #SearchTable_wrapper .dataTables_paginate {
    clear: both;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 12px 0 4px;
    text-align: left;
  }

  #SearchTable_wrapper .dataTables_paginate span {
    display: inline-flex;
    gap: 6px;
  }

  #SearchTable_wrapper .dataTables_paginate a {
    float: none !important;
  }

  /* Make the label a horizontal flex container */
  .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding-right: 20px;
  }

  .dataTables_filter input[type="search"] {
    flex: 1 1 auto;
    width: auto;
  }

  .dataTables_processing {
    top: 75% !important;
    padding-top: 3px !important;
  }

  /* IMPORTANT:
     Remove manual nth-child hiding here if Responsive is handling it.
     If you leave these, you'll fight Responsive.
     (Leaving commented as a reminder.)
  */
  /*
  .searchTable th:nth-child(7),
  .searchTable th:nth-child(6),
  .searchTable td:nth-child(7),
  .searchTable td:nth-child(6) {
    display: none;
  }
  */

  /* MOBILE: custom triangle arrow + rotation */
  #SearchTable tbody td.dtr-control::before {
    content: "";
    display: inline-block;

    /* triangle */
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #333;

    /* position in top half */
    pointer-events: none;
    margin: 0 !important;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    transform-origin: 4px 7px;
    transition: transform 160ms ease-in-out;
  }

  /* Down when open (DataTables adds tr.parent) */
  #SearchTable tbody tr.parent td.dtr-control::before {
    transform: translateX(-50%) rotate(90deg);
  }
}

/* Tablet/Desktop dialog sizing */
@media (min-width: 601px) {
  .ui-dialog {
    width: 1200px !important;
    top: 10px !important;
  }

  #SearchDialog {
    max-height: 750px;
  }

  .desktop-footer {
    display: block;
  }

  .mobile-footer {
    display: none;
  }
}

/* =========================================================
   OPTIONAL: Hide arrow icon on desktop/tablet (keeps cell for radio)
   ========================================================= */

@media (min-width: 768px) {
  #SearchTable td.dtr-control::before {
    display: none !important;
  }
}

/* =========================================================
   TABLE CARD VIEW (separate component)
   ========================================================= */

.table_card_view {
  border-collapse: collapse;
}

@media only screen and (max-width: 768px) and (min-width: 200px) {
  .table_card_view,
  .table_card_view thead,
  .table_card_view tbody,
  .table_card_view th,
  .table_card_view td,
  .table_card_view tr {
    display: block;
  }

  .table_card_view thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table_card_view tr {
    border: 1px solid #ccc;
    margin-top: 4%;
    border-radius: 7px;
  }

  .table_card_view td {
    border: none;
    border-bottom: 0 solid #eee;
    position: relative;
    padding-left: 50%;
  }

  .table_card_view td::before {
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-column);
    color: #000;
    font-weight: bold;
  }
}

/* =========================================================
   LINE ITEM CARDS / GRID
   ========================================================= */

/* ---------- Line item cards ---------- */
.line-item-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.line-item-card:hover {
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
  border-left-color: #0d6efd;
  transform: translateY(-2px);
}

.line-item-card.locked-item {
  background-color: #f8f9fa;
  opacity: 0.9;
}

.line-item-card.locked-item:hover {
  border-left-color: #ffc107;
}

/* ---------- Dashed add-row style ---------- */
.border-dashed {
  border: 2px dashed #dee2e6;
  background-color: #f8f9fa;
}

.border-dashed:hover {
  border-color: #0d6efd;
  background-color: #fff;
}

/* ---------- Text helpers ---------- */
.item-number-display {
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 768px) {
  .card-body {
    padding: 1rem !important;
  }

  .item-number-display {
    font-size: 0.85rem;
  }

  .fw-semibold {
    margin-left: 10px;
  }

  .itemRow {
    border-bottom: 1px dotted #273746;
  }

  .itemRow:last-child {
    border-bottom: none;
  }
}

/* ---------- Line-item grid (no grid on mobile) ---------- */

/* Mobile/default: stacked, no borders */
.line-item-grid {
  font-size: 0.9rem;
}

.line-item-grid .cell {
  padding: 0.35rem 0.5rem;
}

/* Desktop/tablet and up: show grid */
@media (min-width: 768px) {
  .line-item-grid {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    overflow: hidden;
  }

  .line-item-grid .grid-row {
    border-bottom: 1px solid #dee2e6;
  }

  .line-item-grid .grid-row:last-child {
    border-bottom: 0;
  }

  .line-item-grid .cell {
    border-right: 1px solid #dee2e6;
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
  }

  .line-item-grid .cell:last-child {
    border-right: 0;
  }

  .line-item-grid .header-row {
    background-color: #f8f9fa;
    font-weight: 600;
  }
}


/*******************************************************
  FINAL OVERRIDES — SearchTable (put at very bottom)
*******************************************************/

/* Base table frame + grid */
#SearchDialog #SearchTable {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #2D3E50;
  background: #fff;
}

/* Grid lines (force visible borders) */
#SearchDialog #SearchTable th,
#SearchDialog #SearchTable td {
  border: 1px solid rgba(45, 62, 80, 0.45);
  padding: 8px;
  vertical-align: top;
}

/* Header styling (force dark header back) */
#SearchDialog #SearchTable thead th {
  background: #2D3E50 !important;
  color: #ffffff !important;
  border-color: #2D3E50 !important;
  font-weight: 700;
}

/* Optional: keep row hover without destroying readability */
#SearchDialog #SearchTable tbody tr:hover > td {
  background: #FF9F0F;
  color: #000;
}

/* Keep DataTables responsive child-row formatting readable */
#SearchDialog #SearchTable tbody tr.child td {
  background: #fff;
}

/* ----- Control column (arrow + radio split) ----- */
#SearchDialog #SearchTable tbody td.dtr-control {
  position: relative;
  padding: 0 !important;
  width: 64px;
  min-width: 64px;
}

/* Divider between arrow zone and radio zone */
#SearchDialog #SearchTable tbody td.dtr-control::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  border-top: 1px solid rgba(45, 62, 80, 0.25);
}

/* Arrow (mobile only) — triangle that rotates when open */
@media (max-width: 767.98px) {
  #SearchDialog #SearchTable tbody td.dtr-control {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  #SearchDialog #SearchTable tbody td.dtr-control::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #2D3E50;
    transform: translateX(-50%) rotate(0deg);
    transform-origin: 6px 8px;
    transition: transform 160ms ease-in-out;
    pointer-events: none; /* never blocks the click */
  }

  /* DataTables adds tr.parent when open */
  #SearchDialog #SearchTable tbody tr.parent td.dtr-control::before {
    transform: translateX(-50%) rotate(90deg);
  }

  /* Radio in lower half */
  #SearchDialog #SearchTable tbody td.dtr-control input[type="radio"] {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) scale(1.15);
  }
}

/* Desktop/tablet: no arrow shown (all columns visible anyway) */
@media (min-width: 768px) {
  #SearchDialog #SearchTable tbody td.dtr-control::before {
    display: none !important;
    content: "" !important;
  }
}
