table.display thead th {
    position: relative;
    padding-right: 30px; /* Ge plats åt pilarna till höger */
    padding-top: 12px;
    padding-bottom: 12px;
    font-weight: bold;
    color: #5a5a5a !important;
    background: none !important;
    border: none !important;
    text-align: left;
    white-space: nowrap;
    text-align: left !important;
    vertical-align: middle;
    line-height: 1.5;
}

/* Positionera span.dt-column-order - justera top för att flytta ner */
table.display thead th .dt-column-order {
    position: absolute !important;
    right: 8px;
    top: calc(50% + 3px) !important; /* Flytta ner 3px från mitten */
    transform: translateY(-50%);
    color: #5a5a5a !important;
    fill: #5a5a5a !important;
    opacity: 1 !important;
    pointer-events: none;
    float: none !important;
    width: 12px;
    height: 20px;
}

/* Överstyr DataTables positionering för ::before och ::after */
table.display thead th .dt-column-order::before,
table.display thead th .dt-column-order::after {
    position: absolute !important;
    left: 0 !important;
    color: #5a5a5a !important;
    fill: #5a5a5a !important;
    opacity: 1 !important;
    line-height: 1 !important;
    font-size: 0.8em !important;
    float: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Asc-pil (::before) - DataTables använder bottom: 50%, justera för att flytta ner */
table.display thead th .dt-column-order::before {
    bottom: calc(50% - 2px) !important; /* Flytta ner 2px från mitten */
    top: auto !important;
}

/* Desc-pil (::after) - DataTables använder top: 50%, justera för att flytta ner */
table.display thead th .dt-column-order::after {
    top: calc(50% + 2px) !important; /* Flytta ner 2px från mitten */
    bottom: auto !important;
}

table.display thead th .dt-column-order svg {
    fill: #5a5a5a !important;
}

/* För säkerhets skull ta bort float på alla sorteringspilar */
table.display thead th.sorting_asc .dt-column-order,
table.display thead th.sorting_desc .dt-column-order,
table.display thead th.sorting .dt-column-order,
table.display thead th.dt-orderable-asc .dt-column-order,
table.display thead th.dt-orderable-desc .dt-column-order,
table.display thead th.dt-ordering-asc .dt-column-order,
table.display thead th.dt-ordering-desc .dt-column-order {
    float: none !important;
}

/* Överstyr DataTables standard - justera padding-top för sorteringsbara kolumner */
table.dataTable thead > tr > th.dt-orderable-asc, 
table.dataTable thead > tr > th.dt-orderable-desc, 
table.dataTable thead > tr > th.dt-ordering-asc, 
table.dataTable thead > tr > th.dt-ordering-desc, 
table.dataTable thead > tr > td.dt-orderable-asc, 
table.dataTable thead > tr > td.dt-orderable-desc, 
table.dataTable thead > tr > td.dt-ordering-asc, 
table.dataTable thead > tr > td.dt-ordering-desc {
    position: relative !important;
    padding-right: 30px !important;
    padding-top: 12px !important; /* Justera detta värde för att flytta texten ner */
    padding-bottom: 12px !important;
}

/* Ta bort den gamla regeln som inte fungerar */
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    float: none !important;
    margin-top: 0 !important;
    display: none !important;
}

/* Justera padding även när sortering är aktiv */
table.display thead th.sorting,
table.display thead th.sorting_asc,
table.display thead th.sorting_desc,
table.display thead th.dt-orderable-asc,
table.display thead th.dt-orderable-desc,
table.display thead th.dt-ordering-asc,
table.display thead th.dt-ordering-desc {
    padding-right: 30px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    text-align: left !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
}

/* Rad-data vänsterjusterad */
table.display tbody td {
    text-align: left;
}

table.display td.dt-type-numeric {
    text-align: left !important;
}

table.display th.dt-type-numeric {
    text-align: left !important;
}

table.display td.dt-type-date {
    text-align: left !important;
}

table.display th.dt-type-date {
    text-align: left !important;
}

.joodit-datatable-wrap {
    max-width: 100%;
}

.joodit-datatable-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.joodit-datatable-wrap table.dataTable {
    width: 100% !important;
}

.joodit-datatable-wrap .dt-layout-row {
    gap: 12px;
}

@media screen and (max-width: 767px) {
    .joodit-datatable-wrap .dt-layout-row {
        display: block;
    }

    .joodit-datatable-wrap .dt-layout-cell {
        margin-bottom: 10px;
    }
}

tr.new-product {
  border-top: 2px solid #666;
  padding-top: 10px;
}
