/* Custom styling for Tabulator table */
.tabulator {
    margin-top: 2rem;
    border-radius: 12px;
    overflow-x: auto;
    /* Remove box-shadow for a flat look */
    box-shadow: none;
    width: 100%;
}
.tabulator .tabulator-table {
    /* Ensure table is always wide enough for headers */
    min-width: 1000px;
}
.tabulator .tabulator-cell,
.tabulator .tabulator-col {
    min-width: 170px !important;
    white-space: nowrap;
}
.tabulator .tabulator-header .tabulator-col {
    font-size: 1rem !important;
    letter-spacing: 0.02em;
}
/* Button styling */
.run-btn {
    min-width: 120px;
    margin-bottom: 0; /* Remove bottom margin since it's now in a row */
    display: block;
    width: 100%; /* Full width on mobile */
}
@media (min-width: 768px) {
    .run-btn {
        width: auto; /* Auto width on larger screens */
    }
}
.refresh-btn {
    min-width: 100px;
    margin-top: 0;
    margin-left: 0;
    float: none;
    display: block;
}
@media (min-width: 992px) {
    .refresh-btn {
        float: right;
        display: inline-block;
        margin-bottom: 1rem;
    }
}
/* Navbar logo styling */
.navbar-brand img {
    height: 40px;
}
.navbar-brand {
    padding-left: 1rem;
}
/* Offcanvas (mobile nav) styling */
.offcanvas {
    background-color: #fff;
}

.navbar-nav .nav-link {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.offcanvas-body .nav-link {
    font-size: 1.15rem;
    padding: 1rem 0;
    padding-left: 1rem;
}
@media (max-width: 991.98px) {
    .toast-mobile-margin {
        margin-bottom: 2.5rem !important;
        margin-right: 1rem !important;
    }
}
/* Remove border and shadow from navbar toggler */
.navbar-toggler {
    border: none !important;
    box-shadow: none !important;
}
.offcanvas-divider {
    border: 0;
    border-top: 1.5px solid #adb5bd;
    margin: 2rem 0 1rem 0;
}

/* Off-canvas user profile styling */
.offcanvas-user-profile .user-avatar img {
    width: 3rem !important;
    height: 3rem !important;
}

.offcanvas-user-profile .user-avatar i {
    font-size: 3rem !important;
}

.offcanvas-user-profile .user-display-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.offcanvas-user-profile .user-email {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* Dropdown user profile styling */
.dropdown-user-profile .user-email {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.1rem;
}

.dropdown-user-profile .user-display-name {
    font-weight: 600;
}

/* Code styling to match Bootstrap primary button color */
code {
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-radius: 0.375rem;
    padding: 0.125rem 0.375rem;
}

/* Style Bootstrap icons in modal to match primary color */
.modal-body .bi {
    color: #0d6efd !important;
}

/* Location dropdown auto-width styling */
.location-dropdown-container {
    width: fit-content !important;
    min-width: 200px; /* Reduced minimum width */
    max-width: 100%; /* Prevent overflow on narrow screens */
}

.location-dropdown-container .form-select {
    width: auto !important;
    min-width: 200px; /* Reduced minimum width */
    max-width: 100%; /* Prevent overflow */
    white-space: nowrap;
    padding: 0.70rem 2.25rem 0.70rem 0.75rem; /* Match btn-lg padding exactly */
    border-color: #0d6efd; /* Bootstrap primary blue color */
    border-width: 1px;
    /* Remove font-size and line-height to keep default select styling */
}

.location-dropdown-container .form-select:focus {
    border-color: #86b7fe; /* Bootstrap focus blue */
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* Date and time input field styling */
.date-time-input {
    max-width: 100%; /* Prevent overflow */
    white-space: nowrap;
    padding: 0.70rem 0.5rem 0.70rem 0.5rem; /* Match btn-lg padding exactly */
    border-color: #0d6efd; /* Bootstrap primary blue color */
    border-width: 1px;
    border-radius: 0.375rem; /* Match Bootstrap form control border radius */
}

.date-time-input:focus {
    border-color: #86b7fe; /* Bootstrap focus blue */
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .location-dropdown-container {
        width: 100% !important;
        min-width: unset;
    }
    
    .location-dropdown-container .form-select {
        width: 100% !important;
        min-width: unset;
    }
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    width: 100%; /* Adjust to take full width of the container */
    max-width: 250px; /* Limit the maximum width */
    min-width: 100px; /* Set a reasonable minimum width */
    white-space: nowrap;
    padding: 0.70rem 1rem 0.70rem 1rem; /* Adjust padding for better proportions */
    border-color: #0d6efd; /* Bootstrap primary blue color */
    border-width: 1px;
    border-radius: 0.375rem; /* Match Bootstrap form control border radius */
}

input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus {
    border-color: #86b7fe; /* Bootstrap focus blue */
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap focus shadow */
}

label[for="toDateTimePicker"],
label[for="fromDateTimePicker"],
label[for="locationSelect"]{
    font-weight: bold;
}

.info-tooltip + .tooltip .tooltip-inner {
    font-size: 1.1rem; /* Make tooltip text larger */
}

