/* =========================================================
   SUPPLIER ORDER MODAL - srednja tabela NAROČILO / POTRDILO
   Tabulator prikaz
   ========================================================= */

#supplier-order-detail-tabulator {
    width: 100%;
    height: 145px;
    font-size: 11px;
}

#so-detail-pane .tabulator {
    border: 1px solid #d0d0d0;
    background-color: #ffffff;
}

#so-detail-pane .tabulator .tabulator-tableholder {
    background-color: #ffffff;
}

#so-detail-pane .tabulator .tabulator-table {
    background-color: #ffffff;
}

#so-detail-pane .tabulator .tabulator-row {
    min-height: 24px;
}

#so-detail-pane .tabulator .tabulator-row .tabulator-cell {
    padding: 3px 5px;
    border-right: 1px solid #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#so-detail-pane .tabulator .tabulator-header {
    font-size: 11px;
    font-weight: bold;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col {
    background-color: #f8f9fa;
    border-right: 1px solid #d0d0d0;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: normal;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col.tabulator-col-group {
    text-align: center;
    letter-spacing: 4px;
    font-weight: bold;
}

#so-detail-pane .tabulator .so-nabavni-cell {
    background-color: #e8f4fd !important;
    font-weight: bold;
}

#so-detail-pane .tabulator .akcija-enako {
    color: #333;
    font-weight: normal;
}

#so-detail-pane .tabulator .akcija-sprememba {
    color: #d00000;
    font-weight: bold;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) {
    letter-spacing: normal !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) .tabulator-col-title {
    letter-spacing: normal !important;
    text-align: center;
}

#so-detail-pane .tabulator .tabulator-row .tabulator-cell {
    line-height: 18px;
}

#so-detail-pane .tabulator .tabulator-tableholder {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

#so-detail-pane .tabulator .tabulator-row .tabulator-cell.so-wrap-cell {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 14px;
    padding-top: 3px;
    padding-bottom: 3px;
}

/* Krovna vrstica NAROČILO / POTRDILO naj ostane nizka */
#so-detail-pane .tabulator .tabulator-header .tabulator-col.tabulator-col-group {
    min-height: 18px !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col.tabulator-col-group > .tabulator-col-content {
    min-height: 18px !important;
    height: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spodnja vrstica z imeni stolpcev naj bo višja */
#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) {
    min-height: 1cm !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) > .tabulator-col-content {
    min-height: 1cm !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) .tabulator-col-content {
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 3px !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) .tabulator-col-title-holder {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) .tabulator-col-title {
    line-height: 12px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: center !important;
    padding-right: 0 !important;
    width: 100% !important;
    letter-spacing: normal !important;
    word-break: normal !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) .tabulator-col-sorter {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 8px !important;
    margin-top: 2px !important;
    text-align: center !important;
}

#so-detail-pane .tabulator .tabulator-header .tabulator-col:not(.tabulator-col-group) .tabulator-col-sorter .tabulator-arrow {
    margin: 0 auto !important;
}
#so-detail-pane {
    overflow: hidden !important;
}


/* Aktivni naslov NAROČILO v srednjem Tabulatorju */
#so-detail-pane .tabulator .tabulator-header .tabulator-col.tabulator-col-group.so-tabulator-order-active {
    background-color: #fff3cd !important;
    font-weight: bold !important;
}

/* Aktivni naslov POTRDILO v srednjem Tabulatorju */
#so-detail-pane .tabulator .tabulator-header .tabulator-col.tabulator-col-group.so-tabulator-confirmation-active {
    background-color: #d4edda !important;
    font-weight: bold !important;
}

/* Če ima katerakoli vrstica akcijo različno od "Enako", je naslov Akcija rdeč */
#so-detail-pane .tabulator .so-action-header-change {
    color: #d00000 !important;
    font-weight: bold !important;
}

/* =========================================================
   MANUAL CONFIRMATION PREVIEW - fokus/editor čez celo celico
   ========================================================= */

/* Ko je celica v urejanju, odstrani notranji padding celice */
#manual-preview-modal .tabulator .tabulator-cell.tabulator-editing {
    padding: 0 !important;
    overflow: visible !important;
}

/* Input/editor naj zapolni celo celico */
#manual-preview-modal .tabulator .tabulator-cell.tabulator-editing input,
#manual-preview-modal .tabulator .tabulator-cell.tabulator-editing input[type="text"],
#manual-preview-modal .tabulator .tabulator-cell.tabulator-editing input[type="number"] {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 4px !important;
    border: 2px solid #007bff !important;
    outline: none !important;
    background-color: #ffffff !important;
    font-size: 11px !important;
    line-height: 18px !important;
}

/* Fokusirana Tabulator celica naj ima okvir čez celo celico */
#manual-preview-modal .tabulator .tabulator-cell:focus,
#manual-preview-modal .tabulator .tabulator-cell.tabulator-selected {
    outline: 2px solid #007bff !important;
    outline-offset: -2px !important;
}

/* === Plantmaster alert modal === */
.pm-alert-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.pm-alert-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
    width: 420px;
    max-width: 90vw;
    overflow: hidden;
}

.pm-alert-header {
    background-color: #343a40;
    color: #ffffff;
    font-weight: bold;
    padding: 10px 14px;
    font-size: 14px;
}

.pm-alert-body {
    padding: 18px 20px;
    font-size: 14px;
    color: #333333;
    line-height: 1.5;
}

.pm-alert-body p {
    margin: 0;
}

.pm-alert-footer {
    padding: 12px 16px;
    border-top: 1px solid #dddddd;
    text-align: right;
    background-color: #f8f9fa;
}

#pm-alert-ok-btn {
    padding: 5px 16px;
    border: 1px solid #999999;
    border-radius: 4px;
    background-color: #e9ecef;
    cursor: pointer;
}

#pm-alert-ok-btn:hover {
    background-color: #dfe3e6;
}