button.btn-merge-order,
button.btn-confirm-create-route {
  padding-left: 0;
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: 0;
  border-radius: 4px;
  border: 1px solid var(--color-gray);
}

button.btn-confirm-create-route {
  margin-right: 8px;
  background: var(--color-surface);
}

.list-to-create {
  margin-right: 18px !important;
}

.col-md-80 .d-flex .ml-auto {
  height: 46px;
}

.selected-toolbar .btn-merge-order,
.selected-toolbar .btn-confirm-create-route {
  border-top-left-radius: 4px !important;
  border-bottom-left-radius: 4px !important;
  border: 1px solidvar(--color-gray) !important;
}

#merge-order-data-table {
  display: none; /* Ẩn div này */
  position: absolute; /* Đặt vị trí tuyệt đối */
  z-index: 99; /* Đảm bảo nằm trên các phần tử khác */
  margin-top: 5px;
  right: 0px; /* Khoảng cách với thẻ p */
  background-color: var(--color-surface) !important;
  max-height: 320px; /* Set the max height for the scrollable area */
  overflow-y: auto;
  width: 60vw;
  overflow-x: auto;
}
#merge-order-data-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
#merge-order-data-table table th, #merge-order-data-table td {
  width: 120px !important; /* Đặt độ rộng cho cột */
}
#merge-order-data-table table tbody {
  max-height: 100px !important;
  overflow-y: auto !important;
}
#merge-order-data-table table thead {
  background-color: var(--color-gray-lighter);
  position: sticky; /* Enable sticky positioning */
  top: 0; /* Stick to the top of the table container */
  z-index: 1;
}

#merge-order-data-table th{
  background-color: var(--color-navy) !important;
  color: var(--color-white) !important;
}

/* start for map */

.show-map {
  position: relative;
  z-index: 2;
}
.maplibregl-control-container {
  display: none;
}

#journey_map {
  width: 100%;
  height: calc(50vh);
  border: 1px solid var(--color-gray-light);
  z-index: 98;
}
.map-style-selector.right-bottom {
  position: absolute;
  bottom: 16px;
  right: 10px;
  z-index: 999;
  font-family: var(--font-family);
}
.popover-style {
  position: absolute;
  bottom: 100%;
  margin-bottom: 5px;
  background: var(--color-surface);
  border: 1px solid var(--color-gray);
  border-radius: 4px;
  z-index: 1000; 
  display: flex;
  flex-direction: column;
  padding: 4px;
  gap: 4px;
  right: 0;
}

.map-style-option {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.map-style-option:hover {
  transform: scale(1.05);
}

.hidden {
  display: none;
}

.map-style-selector img {
  width: 36px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.journey-vehicle-item {
  list-style: none;
  padding: 4px;
}

.journey-vehicle-item:hover,
.journey-vehicle-item.active {
  cursor: pointer;
  color: var(--color-green);
  background: var(--color-gray-lighter);
  border-color: var(--color-green-light);
  transition: 0.1s ease-in;
}

.journey-vehicle-item p {
  margin-bottom: 0;
}

.journey-vehicle-item span {
  font-size: var(--font-size-md);
}

.status {
  border: 1px solid var(--color-green);
  border-radius: 4px;
  padding: 1px;
  color: var(--color-white);
  background-color: var(--color-green);
  font-size: var(--font-size-xs) !important;
}

.status.fail {
  background-color: var(--color-red-dark);
  border: 1px solid var(--color-red-dark);
}

.status.drive {
  background-color: var(--color-blue);
  border: 1px solid var(--color-blue);
}

.status.hold {
  background-color: var(--color-yellow-dark);
  border: 1px solid var(--color-yellow-dark);
}

.detail-item-sep {
  width: 100%;
  border-bottom: 1px solid var(--color-gray);
  height: 1px;
  list-style: none;
}

.vehicle-plate {
  width: 100px;
  height: 20px;
  border: 1px solid var(--color-red);
  border-radius: 5px;
  background: var(--color-gray-light);
  color: var(--color-red);
  text-align: center;
  line-height: 20px;
  font-weight: bold;
  font-size: var(--font-size-base);
  opacity: 1 !important;
}

.content-iw p {
  margin-bottom: 0;
}

.content-iw span {
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  font-weight: bold;
}

.vehicle-content {
  display: flex;
  justify-content: space-between;
  position: relative;
}
.vehicle-content > div {
  flex: 1;
}
.vehicle-list {
  padding-left: 0px;
  overflow: hidden auto;
  height: 364px;
  padding-bottom: 0;
}

.collapse-bar {
  color: var(--color-navy);
  padding: 5px;
  margin-left: 20px;
  cursor: pointer;
}

.filter {
  width: 340px;
  padding: 8px;
  z-index: 1;
  position: absolute;
  background: var(--color-surface);
  height: 750px;
  overflow: hidden;
  top: 0;
  box-shadow: 1px 1px 4px var(--color-gray);
  left: 0;
  z-index: 99;
}
.journey-map {
  width: 100%;
  position: relative;
}

.btn.journey-btn-filter {
  font-size: var(--font-size-sm);
  padding: 6px 8px;
  height: 35px;
  background-color: var(--color-primary);
  border-color: var(--color-primary)
}

.filter-list-vehicle-team {
  display: flex;
  flex-wrap: wrap;
}

.show-total-txt {
  font-size: var(--font-size-base);
  font-weight: bold;
  line-height: 18px;
  margin-bottom: 5px;
  margin-top: 10px;
}

.show-total-list {
  display: flex;
  flex-wrap: wrap;
  height: auto;
  max-height: 600px;
  padding: 10px 0;
  overflow: auto;
}

.filter-border {
  border-top: 1px solid var(--color-gray-light);
  width: 100%;
}

.show {
  display: block;
}

.journey-content {
  position: relative;
  width: 100%;
}

/* .form-control{
  margin-left : 4px;
  border-radius : 0px;
  height: 29px;
} */
.search-input-icon {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: var(--font-size-xl);
}

.filter-condition {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vehicle-list .badge-light {
  color: var(--color-gray-darkest);
  background-color: var(--color-gray);
}

.vehicle-list .badge {
  font-weight: var(--font-weight-medium);
  padding: 6px 10px;
  font-size: var(--font-size-sm);
  margin-top: 1px;
  cursor: pointer;
}

.vehicle-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.journey-footer {
  display: none;
  /* position: absolute; */
  left: 0;
  bottom: 0;
  /* width: 100%; */
  padding: 8px px;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-gray);
}

.vehicle-reg-no {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vehicle-reg-no b, .vehicle-statust .status {
  font-weight: 400 !important;
  font-size: var(--font-size-md) !important;
}

.vehicle-list-meta {
  margin-top: 5px;
  padding-left: 18px;
  color: var(--color-gray-dark);
  font-size: var(--font-size-sm);
}

.vehicle-group-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.vehicle-group-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-loading-ratios {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 3px;
}

.vehicle-loading-ratios b {
  color: var(--color-blue);
  font-weight: 600;
}
.btn.btn-filter {
  border-radius: 0px;
  padding: 3px 4px;
}

.info-vehicle {
  display: none;
  flex-direction: column;
  border-bottom: 1px solid var(--color-gray);
  padding: 0 8px 4px 8px;
  font-size: var(--font-size-sm);
  height: 364px;
  overflow: auto;
}
.close-info-vehicle {
  display: none;
  justify-content: flex-end;
  padding: 8px 12px 4px;
}
.map-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-gray);
  padding: 0 8px 0 0;
}
.map-title b {
  font-weight: 500 !important;
}
.journey-show-route-button:hover {
  color: var(--color-blue);
}

.filter-item,
.filter-total {
  display: inline-block;
  font-size: var(--font-size-base);
  line-height: 17px;
  position: relative;
  width: 100%;
}

.filter-item__title {
  border-radius: 4px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-gray);
  cursor: pointer;
  padding: 5px 10px;
  overflow: hidden;
  height: 35px;
  line-height: 19px;
  width: 100%;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.filter-show {
  display: none;
  background-color: var(--color-surface);
  box-shadow: 0 2px 20px var(--color-black-50);
  max-width: 274px;
  position: absolute;
  padding: 4px;
  top: 45px;
  width: 600px;
  white-space: normal;
  z-index: 3;
}

.show-team {
  left: 0;
}

.show-group {
  right: 0
}

.filter-item__title span {
  padding-right: 12px;
  position: relative;
  width: 100%;
  display: block;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
}

.c-btnbox {
  align-items: center;
  border: 1px solid var(--color-gray-light);
  color: var(--color-gray-darker);
  display: flex;
  font-size: var(--font-size-sm);
  justify-content: center;
  line-height: 17px;
  margin-bottom: 6px;
  padding: 4px 8px;
  cursor: pointer;
  width: 100%
}

.c-btnbox:hover {
  border: 1px solid var(--color-blue-dark);

}


.filter-item__title span::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--color-gray-darker);
  content: '';
  height: 0;
  position: absolute;
  top: 8px;
  right: 0;
  width: 0;
}

.marker-vehicle-plates {
  width: 85px;
  background: var(--color-surface);
  border: 1px solid var(--color-black);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  font-weight: 700;
  position: absolute;
  right: -25px
}

.journey-footer .view-detail-info {
  background: var(--color-gray-lighter);
  border: 1px solid var(--color-cyan-light);
  border-radius: 4px;
  color: var(--color-blue);
  cursor: pointer;
  font-size: var(--font-size-sm);
  line-height: 20px;
  opacity: 1;
  padding: 0 7px;
  white-space: nowrap
}

.journey-footer .view-detail-info:hover {
  background: var(--color-cyan-light)
}

.journey-vehicle-list-order {
  margin-top: 4px
}

.maplibregl-popup-content {
  background: var(--color-surface);
  border-radius: 3px;
  box-shadow: 0 1px 2px var(--color-black-10);
  padding: 15px 10px;
  pointer-events: auto;
  position: relative;
}

/* end for map */

#contractor-production-scroll-wrapper,
#contractor-selection {
    max-height: calc(100vh - 365px);
    min-height: 160px;
    overflow-y: auto;
}

#contractor-production-scroll-wrapper thead th {
    position: sticky;
    top: 0;
    background: var(--color-gray-lighter);
    z-index: 1;
}

#contractor-production-scroll-wrapper table {
    width: 100%;
    min-width: 390px;
}

#contractor-production-scroll-wrapper table tr th:last-child,
#contractor-production-scroll-wrapper table tr td:last-child {
    width: 150px;
    min-width: 150px;
    white-space: nowrap;
}

#sort-contractor-production {
    white-space: nowrap;
}

#filter-contractor {
    min-width: 0;
    flex: 1 1 auto;
}

#contractor-production-filter button[type="submit"] {
    flex: 0 0 auto;
}

#contractor-production-list td:first-child {
    min-width: 140px;
    overflow-wrap: anywhere;
}

/* start css for ds tài xế trong right_sidebar */

.driver-list table {
    width: 100%;
    border-collapse: collapse;
    /* table-layout: fixed; */
}
.driver-list th,
.driver-list td {
    border: 1px solid var(--color-gray-light);
    text-align: center;
    padding: 4px;
}
.driver-list th {
    background-color: var(--color-gray-lighter);
}
.driver-list tbody td {
    background-color: var(--color-surface) !important;
    font-size: var(--font-size-lg);
}
#driver-list-scroll-wrapper {
    max-height: 82vh;
    overflow-y: auto;
}
.driver-total {
  padding-bottom: 10px;
 text-align: right;
 padding-right: 10px;
 font-weight: 500;
}
.driver-list .salary-column {
  text-align: right;
  width: 25%; 
  max-width: 25%;
  white-space: normal;
  word-break: break-word;
}

.driver-list .full_name_column {
  text-align: left;
  width: 35%; 
  max-width: 35%;
  white-space: normal;
  word-break: break-word;

}

.driver-list .mobile-no-column {
  text-align: right;
  width: 20%; 
  max-width: 20%;

}

.driver-list .reg-no-column {
    text-align: left;
  width: 20%; 
    max-width: 20%;
      white-space: normal;
    word-break: break-word;
}

.table-sorting-salary {
    display: inline-block;
    position: relative;
    text-align: left;
    padding-right: 1.5em;
    vertical-align: middle;
}

.table-sorting-salary:before {
    position: absolute;
    right: 0.5em;
    content: "\2191"; 
    opacity: 0.3;
    color: var(--color-slate); 
    transition: color 0.2s; 
}

.table-sorting-salary:after {
    position: absolute;
    right: 0;
    content: "\2193"; 
    opacity: 0.3;
    color: var(--color-slate); 
    transition: color 0.2s; 
}

.table-sorting-salary.sorting_asc:after {
    opacity: 1;
    color: var(--color-navy); 
}

.table-sorting-salary.sorting_desc:before {
    opacity: 1;
    color: var(--color-navy); 
}

.table-sorting-salary.sorting_asc:before,
.table-sorting-salary.sorting_desc:after {
    color: var(--color-slate); 
}

#sort-salary {
    display: inline-block;
    vertical-align: middle;
}
.driver-list th {
    position: relative;
}
.driver-list .mobile-no-column a {
    color: var(--color-blue); 
    text-decoration: none; 
}

.driver-list .mobile-no-column a:hover {
    text-decoration: underline; 
}
.driver-list th {
    background-color: var(--color-gray-lighter);
    position: sticky;
    top: 0; 
    z-index: 1; 
}
#sort-salary:hover {
    color: var(--color-blue); 
}
.driver-list .full_name_column .full-name-text {
    font-weight: bold;
}

/* css cảnh báo đơn đến hạn màn list */
tr.red td {
  background: var(--color-pink-light) !important;
}
tr.yellow td {
  background: var(--color-yellow-light) !important;
}
.vehicle-team-label {
    font-weight: 500; 
}
.team-badge-brown {
    background-color: var(--color-surface);
    color: var(--color-black);
    border: 1px solid var(--color-gray-medium);
}
.team-badge {
    padding: 3px 5px;
    font-size: var(--font-size-lg);
}
.team-badge {
    display: inline-block;
    padding: .25em .4em;
    vertical-align: baseline;
    border-radius: .25rem;
    margin-top: 3px;
}
.bg-aqua {
    background-color: var(--color-cyan)!important
}
.bg-red {
    background-color: var(--color-red)!important
}
.bg-green {
    background-color: var(--color-green)!important
}
.bg-yellow {
    background-color: var(--color-orange)!important
}
.bg-orange {
    background-color: var(--color-orange)
}
.bg-ini {
    background-color: var(--color-navy)
}
.bg-brown {
    background-color: var(--color-brown)
}
.bg-blue {
    background-color: var(--color-blue)
}
.bg-stpink {
    background-color: var(--color-rose)
}
