/*
Driving Miss Daisy - Admin css
mark@kccs.co.za
*/
@media screen and (max-width: 767px) {
    .mediaSpacer {
        margin-top: 5%;
    }
}

html {
    width: 100%;
    height: 100%;
    margin: 0;
}

body{
    background: #36c6d3;
    /* background: whitesmoke; */
    width: 100%;
    height: 100%;
    margin: 0;
    font-size: 0.9rem;
}

.btn{
    min-width: 10em;
    font-size: 1em;
}

label{
    color: black;
    font-weight: bold;
    margin-top: 1em;
}

.btn-nav{
    margin-left: 0.5rem;
    height: 1.3rem;
    margin-top: 0.5rem;
    padding-bottom: 2rem;
}

.ui-autocomplete{
    z-index: 9999 !important;
}

input:read-only, textarea{
    background-color: white !important;
}

.footer-bg{
    color: aliceblue;
    background-color: #8a909d !important;
}

.footer-bg a{
    color: aliceblue !important;
}

a{
    color: black;
}

a:hover{
    color: #36c6d3;
    text-decoration: none;
}

.page-title{
    color: #36c6d3;
    font-size: 1.6rem;
    font-weight: bold;
}

.page-title-med{
    color: Teal;
    /* color: dimgray; */
    font-size: 1.2rem;
    font-weight: bold;
}

.page-title-sm, .page-title-black-sm{
    color: Teal;
    font-size: 1rem;
    font-weight: bold;
}

.page-title-xsm{
    color: #36c6d3;
    font-size: 0.8rem;
    font-weight: bold;
}

.page-title-black-sm{
    color: ghostwhite;
}

.card-header{
    background-color: white;
}

.booking-tag, .new-client-tag, .new-staff-tag{
    color: Teal;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    width: 300px;
}

#form-booking label,
#form-new-client label,
#form-new-account-holder label,
#form-client-new-enquiry label,
#form-new-staff-member label,
#form-new-invoice label{
    font-size: 0.9rem;
}

#form-booking textarea,
#form-new-client textarea,
#form-new-account-holder textarea,
#form-client-new-enquiry textarea,
#form-new-staff-member textarea{
    min-height: 8rem !important;
}

#form-new-invoice textarea{
    min-height: 5.2rem !important;
}

#form-booking input:focus, 
#form-booking select:focus, 
#form-booking textarea:focus,
#form-new-client input:focus,
#form-new-client select:focus,
#form-new-client textarea:focus,
#form-new-account-holder input:focus,
#form-new-account-holder select:focus,
#form-new-account-holder textarea:focus,
#form-client-new-enquiry input:focus,
#form-client-new-enquiry select:focus,
#form-client-new-enquiry textarea:focus,
#form-new-staff-member input:focus,
#form-new-staff-member select:focus,
#form-new-staff-member textarea:focus,
#form-new-invoice input:focus,
#form-new-invoice select:focus,
#form-new-invoice textarea:focus,
#form-quote input:focus,
#form-quote select:focus,
#form-quote textarea:focus,
#form-financial-settings input:focus,
#form-financial-settings select:focus,
#form-financial-settings textarea:focus,
#new_staff_upload_type:focus,
#new_staff_member_document_name:focus,
#new_staff_member_document_expiry_date:focus,
#quick-booking-section input:focus,
#quote-section input:focus,
#modal-cancel-reason:focus
{
    background-color: gainsboro !important;
}

.sp-top{
    margin-top: 0.2rem;
}

.btn-small{
    width: 6rem;
}

.btn-med{
    width: 8.2rem;
}

.btn-height{
    height: 2vw;
}

.div-background{
    background: whitesmoke;
    border-radius: 5px;
}

.drop-header-text{
  font-size: 20px;
  font-weight: bold;
}

#booking-statistics,
#journey-details,
#return-journey-details,
#journey-type-section,
#client-description,
#gdpr-preferences,
#emergency-contacts,
#payment-information,
#marketing-preferences,
#booking-complete,
#client-block-inactive-denied,
#section-return{
    background: whitesmoke;
    border-radius: 5px;
    border: solid lightgrey 1px;
}

#additional-charges, #payment-details{
    background: white;
    border-radius: 5px;
    border: solid lightgrey 1px;
    padding-top: 1em;
}

.invoice-bg{
    background: whitesmoke;
    border-radius: 5px;
    padding: 8px;
}

#return-journey-details, #section-return{
    background: lightgrey;
}

#journey-type-section,
#marketing-preferences{
    background: lightgray;
    border-radius: 5px;
}

.mdi-asterisk{
    color: red;
    font-size: 10px;
}

.unpaid-notes-update{
    cursor: pointer;
}

.unpaid-notes-update:hover{
    color: #36c6d3;
    text-decoration: none;
}

#emergency-contact-modal, #can-contact-modal, #confidential-notes-modal, #invoice-additional-info-modal, #loading-time-modal{
    cursor: pointer;
    color: DeepSkyBlue;
}

.show-client-account-holder, #client-show-quick-bookings{
    cursor: pointer;
}

.toast {
    max-width: 100%;
}

#table-user-logins {
    display: block;
    max-height: 500px;
    overflow: scroll;
}

.modal-head {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 0.75rem;
}

.noBorder {
    border:none !important;
}

#full-calendar, #full-calendar-2 {
    font-size: 0.8rem;
}

.fc .fc-zoomIn-button, .fc .fc-zoomOut-button{
    background: #29cc97;
    border-color: #29cc97;
    min-width: 5vw;
}

.fc .fc-today-button, .fc .fc-resourceTimelineDay-button, .fc .fc-timeGridWeek-button, .fc .fc-dayGridMonth-button, .fc .fc-listWeek-button{
    min-width: 3vw;
    background: #13cae1;
    border-color: #13cae1;
}

.fc .fc-minutes-button{
    min-width: 3vw;
    background: white;
    border-color: white;
    color: dimgray;
    font-size: 0.9vw;
    font-weight: bold;
}

.tooltipevent{
    width:600px;
    background:#ccc;
    position:absolute;
    z-index:10001;
    transform:translate3d(-50%,-100%,0);
    font-size: 0.8rem;
    box-shadow: 1px 1px 3px 0px #888888;
    line-height: 1.5rem;
}
.tooltipevent div{
    padding:10px;
}
.tooltipevent div:first-child{
    font-weight:bold;
    color:White;
    background-color:#888888;
    border:solid 1px black;
}
.tooltipevent div:last-child{
    background-color:whitesmoke;
    position:relative;
}
.tooltipevent div:last-child::after, .tooltipevent div:last-child::before{
    width:0;
    height:0;
    border:solid 5px transparent;
    border-bottom:0;
    border-top-color:whitesmoke;
    position: absolute;
    display: block;
    content: "";
    bottom:-4px;
    left:50%;
    transform:translateX(-50%);
}
.tooltipevent div:last-child::before{
    border-top-color:#888888;
    bottom:-5px;
}

.status-active, .status-start, .status-yes{
    color:#29cc97;
}

.status-blocked{
    color: #13cae1;
}

.status-deleted, .status-no{
    color: #fe5461;
}

.status-complete{
    color: #13cae1;
}

.booking-view-booking{
    width: 5vw;
}

.invoice-div{
    min-height: 4.5vw;
    color: #495057;
    border: #e5e9f2 solid 1px;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.9rem;
}

#toast-container > .toast {
    position:fixed;
    top: 0;
    right:10%;
    max-width: 80%;
    width: 90%;
}

.preloader{
    display: none;
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 1000000;
    top: 0;
    left: 0;
    background-color: rgba(255,255,255,0.5);
}

.preloader-div{
    top: 40vh;
    left: 5vw;
    z-index: 1000001;
    position: fixed;
}

.lablefont{
    font-size: 0.9rem;
    color: #495057;
    font-weight: bold;
}

/* .page-item.active .page-link {
    background-color: #13cae1 !important;
    border: 1px solid #13cae1;
} */

@media screen and (max-width: 1600px) {
    
    #form-booking label, #form-new-client label{
        font-size: 0.8rem;
    }

    .sp-top{
        margin-top: 0.1rem;
    }

    .page-title-sm, .page-title-black-sm{
        color: #36c6d3;
        font-size: 0.8rem;
        font-weight: bold;
    }

    .lablefont{
        font-size: 0.8rem;
        color: #495057;
        font-weight: bold;
    }
}

@media screen and (max-width: 1400px) {
    
    #form-booking label, #form-new-client label{
        font-size: 0.7rem;
    }

    .sp-top{
        margin-top: 0.1rem;
    }

    .btn-height{
        height: 2.5vw;
    }

    .page-title-sm, .page-title-black-sm{
        color: #36c6d3;
        font-size: 0.6rem;
        font-weight: bold;
    }

    .lablefont{
        font-size: 0.6rem;
        color: #495057;
        font-weight: bold;
    }
}

@media (max-width: 900px){
    .btn{
        min-width: 5em;
        font-size: 0.9em;
    }

    .booking-view-booking{
        width: 10vw;
    }

    label{
        color: black;
        font-weight: bold;
        font-size: 0.9em;
        margin-top: 0.5em;
    }
}

/* Nikolai */

#navbarSupportedContent .nav-link {
    padding-top: 2px;
    padding-bottom: 0;
}

.ui-autocomplete {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 14px 30px;    
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);        
}

.ui-menu.ui-widget-content.ui-autocomplete {
    max-width: 100%;
    width: 500px !important;
}

.ui-menu.ui-widget-content.ui-autocomplete .ui-menu-item-wrapper {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 0;
}

.ui-menu.ui-widget-content.ui-autocomplete .ui-menu-item-wrapper:hover {
    background-color: #f0f0f0;
    color: #333;
    cursor: pointer;
}

#bookings-today-table tbody tr td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
#bookings-today-table thead th {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Bookings today table: mobile/tablet – expand-down, full width */
@media screen and (max-width: 992px) {
    .bookings-today-table-wrapper,
    .bookings-today-table-wrapper .dataTables_wrapper,
    .bookings-today-table-wrapper .dataTables_wrapper .dataTables_scroll,
    .bookings-today-table-wrapper .dataTables_wrapper .dataTables_scrollBody {
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .bookings-today-table-wrapper {
        box-sizing: border-box;
    }
    #bookings-today-table {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.85rem;
        table-layout: fixed;
    }
    /* Force first column 100%, rest 0 – otherwise table-layout:fixed splits width across all 11 columns */
    #bookings-today-table colgroup col:first-child {
        width: 100% !important;
    }
    #bookings-today-table colgroup col:nth-child(n+2) {
        width: 0 !important;
        min-width: 0 !important;
    }
    /* Show only first column (Client Name); hide the rest and give them no width */
    #bookings-today-table thead th:nth-child(n+2) {
        display: none;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    #bookings-today-table tbody tr td:nth-child(n+2) {
        display: none;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    #bookings-today-table thead th:first-child {
        width: 100% !important;
        box-sizing: border-box;
    }
    #bookings-today-table thead th:first-child,
    #bookings-today-table tbody tr td:first-child {
        padding: 0.75rem 0.75rem;
    }
    /* Clickable row: full width, show it can expand */
    #bookings-today-table tbody tr:not(.child) td:first-child {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        cursor: pointer;
        position: relative;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        padding-right: 2rem;
    }
    #bookings-today-table tbody tr td:first-child::after {
        content: '';
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #36c6d3;
        transition: transform 0.2s ease;
    }
    #bookings-today-table tbody tr.booking-row-expanded td:first-child::after {
        transform: translateY(-50%) rotate(180deg);
    }
    /* Child row (expanded details) – DataTables inserts a tr with one td[colspan]; force full width */
    #bookings-today-table tbody tr.child,
    #bookings-today-table tbody tr.dt-hasChild + tr {
        display: table !important;
        width: 100% !important;
        table-layout: fixed;
    }
    #bookings-today-table tbody tr.child td.dtr-details,
    #bookings-today-table tbody tr.child td,
    #bookings-today-table tbody tr td[colspan] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0.75rem 0.75rem;
        background: #f8f9fa;
        border-left: 3px solid #36c6d3;
        font-size: 0.85rem;
    }
    #bookings-today-table .booking-detail-fields {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
        box-sizing: border-box;
    }
    #bookings-today-table .booking-detail-fields .booking-detail-row-item {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    #bookings-today-table .booking-detail-fields .booking-detail-row-item strong {
        min-width: 6rem;
        flex-shrink: 0;
    }
    #bookings-today-table .booking-detail-fields .booking-view-booking {
        margin-top: 0.25rem;
        min-width: 100%;
    }

    /* All Client Invoices: mobile single column (Client Name = 5th) + expand */
    .invoices-all-table-wrapper,
    .invoices-all-table-wrapper .dataTables_wrapper,
    .invoices-all-table-wrapper .dt-container,
    .invoices-all-table-wrapper .dataTables_wrapper .dataTables_scroll,
    .invoices-all-table-wrapper .dataTables_wrapper .dataTables_scrollBody,
    .invoices-all-table-wrapper .dt-container .dt-scroll,
    .invoices-all-table-wrapper .dt-container .dt-scroll-body {
        overflow-x: visible !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Block layout — avoids table-layout:fixed column-position bug when cells are display:none */
    .invoices-all-table-wrapper #dataTable-table,
    .invoices-all-table-wrapper #dataTable-table thead,
    .invoices-all-table-wrapper #dataTable-table tbody {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .invoices-all-table-wrapper #dataTable-table colgroup {
        display: none !important;
    }
    .invoices-all-table-wrapper #dataTable-table thead tr,
    .invoices-all-table-wrapper #dataTable-table tbody tr:not(.child) {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-bottom: 1px solid #dee2e6;
    }
    .invoices-all-table-wrapper #dataTable-table thead th {
        display: none !important;
    }
    .invoices-all-table-wrapper #dataTable-table thead th:nth-child(5) {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.75rem 0.75rem;
        font-size: 0.85rem;
    }
    .invoices-all-table-wrapper #dataTable-table tbody tr:not(.child) td {
        display: none !important;
    }
    .invoices-all-table-wrapper #dataTable-table tbody tr:not(.child) td:nth-child(5) {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        font-size: 0.85rem;
        cursor: pointer;
        position: relative;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .invoices-all-table-wrapper #dataTable-table tbody tr:not(.child) td:nth-child(5)::after {
        content: '';
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #36c6d3;
        transition: transform 0.2s ease;
    }
    .invoices-all-table-wrapper #dataTable-table tbody tr.invoice-row-expanded td:nth-child(5)::after {
        transform: translateY(-50%) rotate(180deg);
    }
    .invoices-all-table-wrapper #dataTable-table tbody tr.child,
    .invoices-all-table-wrapper #dataTable-table tbody tr.dt-hasChild + tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .invoices-all-table-wrapper #dataTable-table tbody tr.child td.dtr-details,
    .invoices-all-table-wrapper #dataTable-table tbody tr.child td,
    .invoices-all-table-wrapper #dataTable-table tbody tr td[colspan] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0.75rem 0.75rem;
        background: #f8f9fa;
        border-left: 3px solid #36c6d3;
        font-size: 0.85rem;
    }
    .invoices-all-table-wrapper #dataTable-table .booking-detail-fields {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
        box-sizing: border-box;
    }
    .invoices-all-table-wrapper #dataTable-table .booking-detail-fields .booking-detail-row-item {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .invoices-all-table-wrapper #dataTable-table .booking-detail-fields .booking-detail-row-item strong {
        min-width: 6rem;
        flex-shrink: 0;
    }

    /* All Bookings: mobile single column (Client Name = first) + expand */
    .bookings-all-table-wrapper,
    .bookings-all-table-wrapper .dataTables_wrapper,
    .bookings-all-table-wrapper .dt-container,
    .bookings-all-table-wrapper .dataTables_wrapper .dataTables_scroll,
    .bookings-all-table-wrapper .dataTables_wrapper .dataTables_scrollBody,
    .bookings-all-table-wrapper .dt-container .dt-scroll,
    .bookings-all-table-wrapper .dt-container .dt-scroll-body {
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .bookings-all-table-wrapper #bookings-all-table {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.85rem;
        table-layout: fixed;
    }
    .bookings-all-table-wrapper #bookings-all-table thead th:nth-child(n+2) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    .bookings-all-table-wrapper #bookings-all-table tbody tr:not(.child) td:nth-child(n+2) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    .bookings-all-table-wrapper #bookings-all-table thead th:first-child {
        width: 100% !important;
        box-sizing: border-box;
    }
    .bookings-all-table-wrapper #bookings-all-table thead th:first-child,
    .bookings-all-table-wrapper #bookings-all-table tbody tr:not(.child) td:first-child {
        padding: 0.75rem 0.75rem;
    }
    .bookings-all-table-wrapper #bookings-all-table tbody tr:not(.child) td:first-child {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        cursor: pointer;
        position: relative;
        padding-right: 2rem;
    }
    .bookings-all-table-wrapper #bookings-all-table tbody tr td:first-child::after {
        content: '';
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #36c6d3;
        transition: transform 0.2s ease;
    }
    .bookings-all-table-wrapper #bookings-all-table tbody tr.booking-all-row-expanded td:first-child::after {
        transform: translateY(-50%) rotate(180deg);
    }
    .bookings-all-table-wrapper #bookings-all-table tbody tr.child,
    .bookings-all-table-wrapper #bookings-all-table tbody tr.dt-hasChild + tr {
        display: table !important;
        width: 100% !important;
        table-layout: fixed;
    }
    .bookings-all-table-wrapper #bookings-all-table tbody tr.child td.dtr-details,
    .bookings-all-table-wrapper #bookings-all-table tbody tr.child td,
    .bookings-all-table-wrapper #bookings-all-table tbody tr td[colspan] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0.75rem 0.75rem;
        background: #f8f9fa;
        border-left: 3px solid #36c6d3;
        font-size: 0.85rem;
    }
    .bookings-all-table-wrapper #bookings-all-table .booking-detail-fields {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
        box-sizing: border-box;
    }
    .bookings-all-table-wrapper #bookings-all-table .booking-detail-fields .booking-detail-row-item {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .bookings-all-table-wrapper #bookings-all-table .booking-detail-fields .booking-detail-row-item strong {
        min-width: 6rem;
        flex-shrink: 0;
    }

    /* Franchisees Vehicles: mobile single column (Vehicle Name = first) + expand */
    .vehicles-table-wrapper,
    .vehicles-table-wrapper .dataTables_wrapper,
    .vehicles-table-wrapper .dt-container,
    .vehicles-table-wrapper .dataTables_wrapper .dataTables_scroll,
    .vehicles-table-wrapper .dataTables_wrapper .dataTables_scrollBody,
    .vehicles-table-wrapper .dt-container .dt-scroll,
    .vehicles-table-wrapper .dt-container .dt-scroll-body {
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .vehicles-table-wrapper #vehicle-table {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.85rem;
        table-layout: fixed;
    }
    .vehicles-table-wrapper #vehicle-table thead th:nth-child(n+2) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    .vehicles-table-wrapper #vehicle-table tbody tr:not(.child) td:nth-child(n+2) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    .vehicles-table-wrapper #vehicle-table thead th:first-child {
        width: 100% !important;
        box-sizing: border-box;
    }
    .vehicles-table-wrapper #vehicle-table thead th:first-child,
    .vehicles-table-wrapper #vehicle-table tbody tr:not(.child) td:first-child {
        padding: 0.75rem 0.75rem;
    }
    .vehicles-table-wrapper #vehicle-table tbody tr:not(.child) td:first-child {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        cursor: pointer;
        position: relative;
        padding-right: 2rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .vehicles-table-wrapper #vehicle-table tbody tr td:first-child::after {
        content: '';
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #36c6d3;
        transition: transform 0.2s ease;
    }
    .vehicles-table-wrapper #vehicle-table tbody tr.vehicle-row-expanded td:first-child::after {
        transform: translateY(-50%) rotate(180deg);
    }
    .vehicles-table-wrapper #vehicle-table tbody tr.child,
    .vehicles-table-wrapper #vehicle-table tbody tr.dt-hasChild + tr {
        display: table !important;
        width: 100% !important;
        table-layout: fixed;
    }
    .vehicles-table-wrapper #vehicle-table tbody tr.child td.dtr-details,
    .vehicles-table-wrapper #vehicle-table tbody tr.child td,
    .vehicles-table-wrapper #vehicle-table tbody tr td[colspan] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0.75rem 0.75rem;
        background: #f8f9fa;
        border-left: 3px solid #36c6d3;
        font-size: 0.85rem;
    }
    .vehicles-table-wrapper #vehicle-table .booking-detail-fields {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
        box-sizing: border-box;
    }
    .vehicles-table-wrapper #vehicle-table .booking-detail-fields .booking-detail-row-item {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .vehicles-table-wrapper #vehicle-table .booking-detail-fields .booking-detail-row-item strong {
        min-width: 6rem;
        flex-shrink: 0;
    }

    .card-header,
    .card-header .page-title-med,
    .card-header .text-right {
        display: block !important;
        margin-bottom: 0.5rem;
    }

}

/* Keep length and search on one row, search to the right (All Bookings, All Invoices, etc.).
   Target both DataTables 1.x wrapper (.dataTables_wrapper) and DataTables 2 (.dt-container).
   Bootstrap 5 .row > * sets width: 100% on direct children, so override for inline layout. */
.dataTables_wrapper .row.top-information,
.dt-container .row.top-information {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
}
.dataTables_wrapper .row.top-information > *,
.dt-container .row.top-information > * {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
}
/* DT 2 uses .dt-length / .dt-search; DT 1.x uses .dataTables_length / .dataTables_filter */
.dataTables_wrapper .row.top-information .dt-length,
.dataTables_wrapper .row.top-information .dt-search,
.dataTables_wrapper .row.top-information .dataTables_length,
.dataTables_wrapper .row.top-information .dataTables_filter,
.dt-container .row.top-information .dt-length,
.dt-container .row.top-information .dt-search,
.dt-container .row.top-information .dataTables_length,
.dt-container .row.top-information .dataTables_filter {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.dataTables_wrapper .row.top-information label,
.dt-container .row.top-information label {
    margin-top: unset;
}

/* Fallback: same layout when length + search are in one row without .top-information (default dom, etc.) */
.dataTables_wrapper > div:first-child:has(.dt-length):has(.dt-search),
.dataTables_wrapper > div:first-child:has(.dataTables_length):has(.dataTables_filter),
.dt-container > div:first-child:has(.dt-length):has(.dt-search),
.dt-container > div:first-child:has(.dataTables_length):has(.dataTables_filter) {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
}
.dataTables_wrapper > div:first-child:has(.dt-length):has(.dt-search) > *,
.dataTables_wrapper > div:first-child:has(.dataTables_length):has(.dataTables_filter) > *,
.dt-container > div:first-child:has(.dt-length):has(.dt-search) > *,
.dt-container > div:first-child:has(.dataTables_length):has(.dataTables_filter) > * {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
}

/* Legacy: same behaviour for bookings-today wrapper (already has .dataTables_wrapper) */
.bookings-today-table-wrapper .top-information .dt-length,
.bookings-today-table-wrapper .top-information .dt-search {
    display: flex !important;
    align-items: center;
    gap: 0.35rem;
    flex: 0 1 auto;
    width: auto !important;
}
.bookings-today-table-wrapper .top-information label {
    margin-top: unset;
}

/* DataTables top bar: stacked layout on mobile/tablet (incl. landscape) so layout is correct below 992px */
@media screen and (max-width: 992px) {
    .dataTables_wrapper .row.top-information,
    .dt-container .row.top-information,
    .basic-data-table .dataTables_wrapper .row.top-information,
    .basic-data-table .dt-container .row.top-information,
    .card-body .dt-container .row.top-information,
    .card-body .dt-container > div:first-child {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
    }
    .dataTables_wrapper .row.top-information > *,
    .dt-container .row.top-information > *,
    .basic-data-table .dt-container .row.top-information > *,
    .basic-data-table .dt-container > div:first-child > *,
    .card-body .dt-container .row.top-information > *,
    .card-body .dt-container > div:first-child > * {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .dataTables_wrapper > div:first-child:has(.dt-length):has(.dt-search),
    .dataTables_wrapper > div:first-child:has(.dataTables_length):has(.dataTables_filter),
    .dt-container > div:first-child:has(.dt-length):has(.dt-search),
    .dt-container > div:first-child:has(.dataTables_length):has(.dataTables_filter) {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
    }
    .dataTables_wrapper > div:first-child:has(.dt-length):has(.dt-search) > *,
    .dataTables_wrapper > div:first-child:has(.dataTables_length):has(.dataTables_filter) > *,
    .dt-container > div:first-child:has(.dt-length):has(.dt-search) > *,
    .dt-container > div:first-child:has(.dataTables_length):has(.dataTables_filter) > * {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    /* Force length and search blocks to full width so they stack */
    .dt-container .dt-length,
    .dt-container .dt-search,
    .dt-container .dataTables_length,
    .dt-container .dataTables_filter,
    .dataTables_wrapper .dt-length,
    .dataTables_wrapper .dt-search,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .dataTables_wrapper .row.top-information .dt-search input,
    .dataTables_wrapper .row.top-information .dataTables_filter input,
    .dt-container .row.top-information .dt-search input,
    .dt-container .row.top-information .dataTables_filter input,
    .dataTables_wrapper > div:first-child:has(.dt-search) input,
    .dataTables_wrapper > div:first-child:has(.dataTables_filter) input,
    .dt-container > div:first-child:has(.dt-search) input,
    .dt-container > div:first-child:has(.dataTables_filter) input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Generic single-column + expand pattern for standard list tables */
    .data-table-standard-wrapper,
    .data-table-standard-wrapper .dataTables_wrapper,
    .data-table-standard-wrapper .dt-container,
    .data-table-standard-wrapper .dataTables_wrapper .dataTables_scroll,
    .data-table-standard-wrapper .dataTables_wrapper .dataTables_scrollBody,
    .data-table-standard-wrapper .dt-container .dt-scroll,
    .data-table-standard-wrapper .dt-container .dt-scroll-body {
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .data-table-standard-wrapper table {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.85rem;
        table-layout: fixed;
    }
    /* Default: show only first column, hide the rest */
    .data-table-standard-wrapper table thead th:nth-child(n+2) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    .data-table-standard-wrapper table tbody tr:not(.child) td:nth-child(n+2) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0;
        border: 0;
    }
    .data-table-standard-wrapper table thead th:first-child {
        width: 100% !important;
        box-sizing: border-box;
    }
    .data-table-standard-wrapper table thead th:first-child,
    .data-table-standard-wrapper table tbody tr:not(.child) td:first-child {
        padding: 0.75rem 0.75rem;
    }
    .data-table-standard-wrapper table tbody tr:not(.child) td:first-child {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        cursor: pointer;
        position: relative;
        padding-right: 2rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .data-table-standard-wrapper table tbody tr td:first-child::after {
        content: '';
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #36c6d3;
        transition: transform 0.2s ease;
    }
    .data-table-standard-wrapper table tbody tr.dt-mobile-row-expanded td:first-child::after {
        transform: translateY(-50%) rotate(180deg);
    }
    .data-table-standard-wrapper table tbody tr.child,
    .data-table-standard-wrapper table tbody tr.dt-hasChild + tr {
        display: table !important;
        width: 100% !important;
        table-layout: fixed;
    }
    .data-table-standard-wrapper table tbody tr.child td.dtr-details,
    .data-table-standard-wrapper table tbody tr.child td,
    .data-table-standard-wrapper table tbody tr td[colspan] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 0.75rem 0.75rem;
        background: #f8f9fa;
        border-left: 3px solid #36c6d3;
        font-size: 0.85rem;
    }
    .data-table-standard-wrapper table .booking-detail-fields {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: 100%;
        box-sizing: border-box;
    }
    .data-table-standard-wrapper table .booking-detail-fields .booking-detail-row-item {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .data-table-standard-wrapper table .booking-detail-fields .booking-detail-row-item strong {
        min-width: 6rem;
        flex-shrink: 0;
    }
}

/* Bottom bar: full-width row, "Showing x of y" left, page dropdown far right.
   Override Bootstrap 5 .row > * (width: 100%) so children stay on one line. */
.bookings-today-table-wrapper .dataTables_wrapper .row.bottom-information {
    width: 100%;
    max-width: 100%;    
}
.bookings-today-table-wrapper .bottom-information {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    min-width: 0;
}
/* Prevent Bootstrap .row > * from forcing 100% width on each child */
.bookings-today-table-wrapper .bottom-information > * {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
}
.bookings-today-table-wrapper .bottom-information .dt-info,
.bookings-today-table-wrapper .bottom-information .dt-paging {
    display: flex;
    align-items: center;
}

/* Hide default paging (<< < 1 > >>); we use a custom page dropdown in .bottom-information. */
.bookings-today-table-wrapper .bottom-information .dt-paging {
    display: none !important;
}

/* Page dropdown in bottom bar: force to far right. */
.bookings-today-table-wrapper .bottom-information > .dt-page-select-wrap {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    margin-left: auto !important;
}
.bookings-today-table-wrapper .bottom-information > .dt-page-select-wrap select.dt-page-select {
    min-width: 3.5rem;
    padding: 0.25rem 0.5rem;
}

#bookings-today-table_wrapper .bottom-information .dt-page-select-wrap label {
    margin-top: unset;
}

/* Invoice tables (#dataTable-table): same pagination style as Today's bookings - dropdown instead of arrows */
#dataTable-table_wrapper .bottom-information,
.invoices-all-table-wrapper .bottom-information,
.invoice-unpaid-table-wrapper .bottom-information,
.invoice-uninvoiced-table-wrapper .bottom-information,
/* Generic wrapper for other list tables */
.data-table-standard-wrapper .bottom-information {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    min-width: 0;
}
#dataTable-table_wrapper .bottom-information,
#bookings-all-table_wrapper .bottom-information {
    padding-top: 1rem;
}
#bookings-all-table_wrapper .bottom-information .dt-page-select-wrap label {
    margin-top: 0;
}
#dataTable-table_wrapper .bottom-information > *,
.invoices-all-table-wrapper .bottom-information > *,
.invoice-unpaid-table-wrapper .bottom-information > *,
.invoice-uninvoiced-table-wrapper .bottom-information > *,
.data-table-standard-wrapper .bottom-information > * {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
}
#dataTable-table_wrapper .bottom-information .dt-paging,
.invoices-all-table-wrapper .bottom-information .dt-paging,
.invoice-unpaid-table-wrapper .bottom-information .dt-paging,
.invoice-uninvoiced-table-wrapper .bottom-information .dt-paging,
.data-table-standard-wrapper .bottom-information .dt-paging {
    display: none !important;
}
#dataTable-table_wrapper .bottom-information > .dt-page-select-wrap,
.invoices-all-table-wrapper .bottom-information > .dt-page-select-wrap,
.invoice-unpaid-table-wrapper .bottom-information > .dt-page-select-wrap,
.invoice-uninvoiced-table-wrapper .bottom-information > .dt-page-select-wrap,
.data-table-standard-wrapper .bottom-information > .dt-page-select-wrap {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    margin-left: auto !important;
}
#dataTable-table_wrapper .bottom-information > .dt-page-select-wrap select.dt-page-select,
.invoices-all-table-wrapper .bottom-information > .dt-page-select-wrap select.dt-page-select,
.invoice-unpaid-table-wrapper .bottom-information > .dt-page-select-wrap select.dt-page-select,
.invoice-uninvoiced-table-wrapper .bottom-information > .dt-page-select-wrap select.dt-page-select,
.data-table-standard-wrapper .bottom-information > .dt-page-select-wrap select.dt-page-select {
    min-width: 3.5rem;
    padding: 0.25rem 0.5rem;
}
#dataTable-table_wrapper .bottom-information .dt-page-select-wrap label {
    margin-top: unset;
}

.dropdown .dropdown-menu {
    position: relative;
    z-index: 1000;
}