﻿/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

.ymx-navbar .navbar-brand {
    font-size: 1rem;
    white-space: nowrap;
    margin-right: 0.25rem;
}

.ymx-navbar .navbar-nav .nav-link {
    white-space: nowrap;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    font-size: 0.9375rem;
}

.ymx-nav-user .ymx-user-toggle {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ymx-navbar .dropdown-menu {
    font-size: 0.9375rem;
}

@media (min-width: 576px) {
    .ymx-navbar .navbar-collapse {
        flex-wrap: nowrap;
    }

    .ymx-nav-main {
        flex-wrap: nowrap;
    }
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}

.qty-stepper .form-control {
    max-width: none;
    width: 4rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.qty-stepper .btn {
    min-width: 2rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.table .qty-stepper {
    flex-wrap: nowrap;
}

.analysis-grid {
    margin-bottom: 0.5rem;
}

.analysis-grid.tabulator,
.analysis-grid .tabulator {
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    width: 100%;
    overflow: visible !important;
    transform: none !important;
}

.analysis-grid .tabulator-header {
    z-index: 2;
    background-color: #f8f9fa;
}

.analysis-grid-sticky-header-shell.tabulator {
    overflow: hidden !important;
    transform: none !important;
    border: none;
    background-color: #f8f9fa;
    font-size: 0.875rem;
}

.analysis-grid-sticky-header-shell .tabulator-header.analysis-tabulator-header-clone {
    pointer-events: none;
}

.analysis-grid-sticky-header-shell .tabulator-header {
    position: relative;
    width: 100%;
    margin: 0;
    z-index: 2;
    background-color: #f8f9fa;
    overflow: hidden;
    white-space: nowrap;
}

.analysis-grid-sticky-header-shell .tabulator-header .tabulator-header-contents {
    overflow: hidden;
    position: relative;
}

.analysis-grid-sticky-header-shell .tabulator-header .tabulator-headers {
    display: inline-block;
    white-space: nowrap;
}

.analysis-grid-sticky-header-shell .tabulator-header .tabulator-col {
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

.analysis-grid-sticky-header-shell {
    display: none;
    position: fixed;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.analysis-grid-sticky-header-shell .tabulator-header .tabulator-col-content {
    background-color: #f8f9fa;
}

.analysis-grid-sticky-header-shell .tabulator-header-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    min-height: 14px;
    padding: 0 4px;
    line-height: 1;
    vertical-align: middle;
}

.analysis-grid-sticky-header-shell .excel-filter-icon {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    vertical-align: middle;
}

.analysis-grid .tabulator-header.analysis-tabulator-header-fixed {
    margin: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    background-color: #f8f9fa;
    position: fixed;
}

.analysis-grid-header-spacer {
    display: none;
    width: 100%;
    flex: 0 0 auto;
}

.analysis-grid .tabulator-tableholder {
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
}

.analysis-grid .tabulator-header .tabulator-col {
    background-color: #f8f9fa;
}

.analysis-grid .tabulator-header .tabulator-col-content {
    background-color: #f8f9fa;
}

.analysis-grid .tabulator-header-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    min-height: 14px;
    padding: 0 4px;
    line-height: 1;
    vertical-align: middle;
}

.analysis-grid .excel-filter-icon {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    vertical-align: middle;
}

.analysis-grid .excel-filter-icon.excel-filter-active,
.analysis-grid .tabulator-header-popup-button.excel-filter-active .excel-filter-icon {
    color: #0d6efd !important;
}

.analysis-grid .analysis-product-thumb {
    display: block;
    height: 36px;
    width: auto;
    max-width: 48px;
    margin: 0 auto;
    object-fit: contain;
}

.analysis-grid .tabulator-cell[tabulator-field="ImageUrl"] {
    padding: 2px 4px;
    overflow: hidden;
    max-height: 44px;
}

.analysis-grid .tabulator-group-header {
    background-color: #eef2f7;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
    font-weight: 600;
}

.analysis-grid .analysis-group-count {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.8125rem;
}

.excel-filter-popup {
    min-width: 200px;
    max-width: 280px;
    padding: 0.5rem;
}

.excel-filter-popup .excel-filter-search {
    max-width: none;
    width: 100%;
    margin-bottom: 0.35rem;
}

.excel-filter-popup .excel-filter-select-all {
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #dee2e6;
}

.excel-filter-popup .excel-filter-list {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.excel-filter-popup .excel-filter-item {
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.excel-filter-popup .excel-filter-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.excel-filter-popup .form-check-input,
.excel-filter-popup .form-check-label {
    cursor: pointer;
}

#txtGlobalSearch {
    max-width: none;
}

.column-picker-wrap {
    display: inline-block;
}

.column-picker-menu {
    display: none;
    position: fixed;
    z-index: 1060;
    width: 480px;
    max-width: calc(100vw - 1rem);
    padding: 0.75rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.column-picker-menu.is-open {
    display: block;
}

.column-picker-menu .column-picker-search {
    max-width: none;
    width: 100%;
    margin-bottom: 0.35rem;
}

.column-picker-menu .column-picker-select-all {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 0.875rem;
}

.column-picker-list {
    max-height: 360px;
    overflow-y: auto;
}

.column-picker-group {
    margin-bottom: 0.65rem;
}

.column-picker-group:last-child {
    margin-bottom: 0;
}

.column-picker-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.35rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #e9ecef;
}

.column-picker-group-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
}

.column-picker-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.3;
    user-select: none;
}

.column-picker-item .column-picker-checkbox {
    flex: 0 0 auto;
    margin: 0;
    cursor: pointer;
}

.column-picker-item .column-picker-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-plans-page input,
.work-plans-page select,
.work-plans-page textarea {
    max-width: none;
}

.work-plans-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.work-plans-row-actions .btn {
    margin: 0 !important;
}

.work-plans-mobile-card {
    border-color: #dee2e6;
}

.work-plans-mobile-card .work-plans-mobile-title {
    word-break: break-word;
}
