/* ==========================================================================
   Base Plugin Styles (Barn2 Tiered Pricing Columns)
   ========================================================================== */

html body .btpc-tier-price-cell { 
    position: relative; 
    text-align: center; 
    vertical-align: middle; 
    white-space: nowrap; 
}

html body .btpc-tier-price-cell:not(.btpc-tier-not-available) { 
    cursor: pointer; 
    user-select: none; 
    transition: background-color 0.15s ease; 
}

html body .btpc-tier-price-cell .btpc-tier-price { 
    font-weight: 600; 
}

html body .btpc-tier-data-column { 
    display: none !important; 
}

html body .btpc-tier-not-available { 
    opacity: 0.35; 
    cursor: not-allowed !important; 
    pointer-events: none; 
}

html body .wc-product-table { 
    overflow-x: auto; 
}

html body table.wc-product-table tbody tr,
html body table.wc-product-table-table tbody tr {
    position: relative;
}

html body table.wc-product-table tbody tr td,
html body table.wc-product-table-table tbody tr td {
    position: relative;
}

/* Row Hover Overlay */
html body table.wc-product-table tbody tr.btpc-row-hover td::before,
html body table.wc-product-table-table tbody tr.btpc-row-hover td::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 1;
}

/* Column Hover Overlay */
html body table.wc-product-table tbody tr td.btpc-col-hover::before,
html body table.wc-product-table-table tbody tr td.btpc-col-hover::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 2;
}

/* Cell Hover Overlay */
html body table.wc-product-table tbody tr td.btpc-cell-hover::before,
html body table.wc-product-table-table tbody tr td.btpc-cell-hover::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.13) !important;
    pointer-events: none;
    z-index: 3;
}

html body table.wc-product-table tbody tr td.btpc-cell-hover *,
html body table.wc-product-table-table tbody tr td.btpc-cell-hover * {
    position: relative;
    z-index: 4;
}

html body th.btpc-tier-price-heading {
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 700 !important;
    padding: 8px 6px !important;
    font-size: 13px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}

html body .btpc-sku-cell { 
    position: relative; 
    cursor: pointer; 
}

/* Image Tooltip Styles */
#btpc-image-tooltip {
    position: fixed;
    z-index: 99999;
    display: none;
    pointer-events: none;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.15s ease-in-out;
    opacity: 0;
    box-sizing: border-box;
}

#btpc-image-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #ffffff;
    filter: drop-shadow(-1px 0px 0px #dcdfe6);
}

#btpc-image-tooltip.btpc-visible {
    display: block;
    opacity: 1;
}

#btpc-image-tooltip img {
    display: block;
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}

/* Multiline Header Delimiter Styling */
html body .btpc-dim-line { 
    display: block; 
    text-align: center; 
}

/* Dimension Unit Switcher Header Controls - Stacked Under Text */
html body th.col-ext-dim,
html body th[data-column="ext-dim"] {
    text-align: center !important;
}

html body .btpc-dim-toggle-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3px !important;
    margin: 5px auto 0 auto !important;
    clear: both !important;
    width: fit-content !important;
}

html body .btpc-dim-toggle-btn {
    display: inline-block;
    padding: 1px 5px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    border: 1px solid #707070;
    background-color: #ffffff;
    color: #333333;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

html body .btpc-dim-toggle-btn:hover {
    background-color: #e0e0e0;
}

html body .btpc-dim-toggle-btn.active {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}


/* ==========================================================================
   Porto Custom Rules (High Specificity Overrides)
   ========================================================================== */

html body th.col-tiered_prices.sorting {
    display: none !important;
}

html body table.wc-product-table thead {
    text-align: center !important;
}

html body th.all.col-sku.sorting {
    border-left: none !important;
}

html body table.dataTable thead > tr > th.sorting {
    border-left: solid 2px #ffffff !important;
    border-right: solid 1px #ffffff !important;
    text-align: center !important;
    padding: 5px 5px 5px 5px !important;
    vertical-align: middle !important;
}

html body th.btpc-super-header {
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 700 !important;
    background-color: #e5e9f0 !important;
    color: #2e3440 !important;
    border-bottom: 1px solid #d8dee9 !important;
    padding: 5px 5px !important;
    font-size: 11px !important;
    letter-spacing: 0.5px;
    border-right: 1px solid #ffffff !important;
    border-left: 2px solid #ffffff !important;
}

html body table.dataTable thead > tr > th.btpc-tier-price-heading {
    width: 65px !important;
    text-align: center !important;
}

html body th.sorting_disabled {
    border-left: solid 2px #ffffff !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 5px!important;
}

html body table.dataTable thead > tr > th.sorting::before {
    display: none !important;
}

html body table.dataTable thead > tr > th.sorting::after {
    display: none !important;
}

html body table.dataTable tbody td {
    text-align: center !important; 
    vertical-align: middle !important; 
    padding: 0 !important;
}

html body td.col-sku.dtr-control.btpc-sku-cell,
html body td.col-ext-dim,
html body td.col-pcs_per_pack,
html body td.col-mikos,
html body td.col-platos,
html body td.col-ipsos,
html body td.col-temaxio-paketo,
html body td.col-paxos,
html body td.col-dema-temaxia{
    font-weight: 700 !important;
}

html body .btpc-tier-price-cell.btpc-tier-active {
    text-align: center !important;
    outline: 1px solid currentColor !important;
    outline-offset: -1px !important;
    border-radius: 0px !important;
}

html body .btpc-tier-price-cell.btpc-tier-active .btpc-tier-price {
    font-weight: 800 !important;
}

/* 1st Tier Header (Index 0) */
html body th.btpc-tier-price-heading[data-btpc-tier-index="0"] {
    background-color: #f391b7 !important;
    border-top: 3px solid #ffffff !important;
    color: #ffffff !important;
    font-size:11px!important;
}

/* 2nd Tier Header (Index 1) */
html body th.btpc-tier-price-heading[data-btpc-tier-index="1"] {
    background-color: #f66198 !important;
    border-top: 3px solid #ffffff !important;
    color: #ffffff !important;
    font-size:11px!important;
}

/* 3rd Tier Header (Index 2) */
html body th.btpc-tier-price-heading[data-btpc-tier-index="2"] {
    background-color: #f73279 !important;
    border-top: 3px solid #ffffff !important;
    color: #ffffff !important;
    font-size:11px!important;
}

/* 4th Tier Header (Index 3) */
html body th.btpc-tier-price-heading[data-btpc-tier-index="3"] {
    background-color: #fb035b !important;
    border-top: 3px solid #ffffff !important;
    color: #ffffff !important;
    font-size:11px!important;
}

/* 5th Tier Header (Index 4) */
html body th.btpc-tier-price-heading[data-btpc-tier-index="4"] {
    background-color: #d6004c !important;
    border-top: 3px solid #ffffff !important;
    color: #ffffff !important;
    font-size:11px!important;
}

html body td.btpc-tier-price-cell.col-buy.col-add-to-cart {
    text-align: center !important;
}

html body td.btpc-tier-price-cell.btpc-tier-not-available.col-buy.col-add-to-cart {
    text-align: center !important; 
    background-color: #f1f4f9 !important;
}

html body .wc-product-table .product .add-to-cart-wrapper button.button {
    background-color: #bcc4e7 !important;
    border-radius: 5px !important;
    line-height: 33px !important;
    padding: 0 !important;
    width: 30px !important;
    vertical-align: middle !important;
    max-height: 30px !important;
    margin-top: 4px !important;
}

html body .wc-product-table .product .add-to-cart-wrapper button.button::before {
    content: "\f217" !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 20px !important;
}

/* Hide all filter controls above product tables */
html body .wc-product-table-wrapper .wc-product-table-above,
html body .wc-product-table-wrapper .wc-product-table-controls,
html body .wc-product-table-wrapper .wc-product-table-above-controls,
html body .wc-product-table-wrapper .wc-product-table-filters,
html body .wc-product-table-wrapper .wc-product-table-search,
html body .wc-product-table-wrapper .dataTables_wrapper .dataTables_filter,
html body .wc-product-table-wrapper .wc-product-table-above select,
html body .wc-product-table-controls,
html body .wc-product-table-above,
html body .dataTables_wrapper .dataTables_filter,
html body .wc-product-table-filter-dropdown {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}