/*
 * Sutura_Tabel configurations table styles (module).
 * Dynamic colors are exposed via CSS vars:
 *  - --sutura-primary
 *  - --sutura-secondary
 */

body.page-product-configurable .page-main .columns .confiurable_table_sut.table.sortable {
    margin: 0 auto 30px auto;
    max-width: 1100px;
}

/* Scroll container for the table (keep the table as a real table for rowspan) */
body.page-product-configurable .confiurable_table_sut .table_sut_wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
body.page-product-configurable .confiurable_table_sut .table_sut {
    width: 100%;
    border-collapse: collapse;
}

/* First column cell: keep table-cell behaviour (NO display:flex here) */
body.page-product-configurable tbody tr td.lungime_ac_txt {
    position: relative;
    overflow: visible;
    max-height: none;
    vertical-align: middle;
}

/* Inner wrapper used for alignment without breaking rowspan */
body.page-product-configurable tbody tr td.lungime_ac_txt .lungime-cell-wrap {
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* Swatch: natural size but bounded */
body.page-product-configurable .page-main .columns .confiurable_table_sut tbody.sut_tbody td.lungime_ac_txt img.swatch_img {
    display: inline-block;
    position: static;
    width: auto !important;
    height: auto !important;
    max-width: 120px;
    max-height: 120px;
    margin: 6px 0 0 0 !important;
    padding: 0 !important;
    z-index: 9;
}

body.page-product-configurable .table_sut tr td {
    border-bottom: 1px solid #ccc;
}

body.page-product-configurable .page-main .columns .confiurable_table_sut.table.sortable .header_s {
    background-color: #ffffff;
    border-bottom: 2px solid var(--sutura-primary);
    cursor: pointer;
}

body.page-product-configurable .page-main .columns .confiurable_table_sut.table.sortable .header_s span {
    display: inline-block;
    padding: 18px;
    font-weight: bold;
}

body.page-product-configurable .table_sut .header_sut {
    background: #eee;
}

body.page-product-configurable .table_sut tr:hover {
    background: #eee;
}

body.page-product-configurable .table_sut tr:hover .lungime_ac_txt {
    background-color: white;
}

body.page-product-configurable .table_sut tr td {
    min-height: 50px;
    vertical-align: middle;
}

body.page-product-configurable .border-top-sut {
    border-top: 1px solid lightgrey !important;
    margin-top: 0 !important;
}

/* Filters look/feel kept for compatibility */
body.page-product-configurable .filter_attributes_sut .filtru_tip_ac ul li.active {
    background: #e62261;
    color: white;
}
body.page-product-configurable .filter_attributes_sut .filtru_tip_ac ul li {
    border: 1px solid transparent;
}
body.page-product-configurable .filter_attributes_sut .filtru_tip_ac ul li:hover {
    border: 1px solid #e62261;
}

body.page-product-configurable .filter_attributes_sut .filtru_tip_ac,
body.page-product-configurable .filter_attributes_sut .filtru_usp,
body.page-product-configurable .filter_attributes_sut .filtru_fir {
    background-color: #eee;
}

body.page-product-configurable .table_sut .active_td,
body.page-product-configurable .table_sut .active_td_fir {
    background-color: #eee;
    color: #e62261;
}

body.page-product-configurable .confiurable_table_sut .heading_image_table {
    padding-left: 40px;
}

body.page-product-configurable .filter_attributes_sut .filtru_usp .filter_attribute_usp.active,
body.page-product-configurable .filter_attributes_sut .filtru_fir .filter_attribute_usp.active,
body.page-product-configurable .filter_attributes_sut .filtru_usp .filter_attribute_fir.active,
body.page-product-configurable .filter_attributes_sut .filtru_fir .filter_attribute_fir.active {
    background: #e62261;
}

/* Qty + add to cart */
body.page-product-configurable .table_sut .add_to_cart_form .btn {
    padding: 0;
}

body.page-product-configurable .field .control {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
}

body.page-product-configurable td input.qty {
    border: 0 !important;
    min-width: 30px;
    height: 30px;
    text-align: center;
}

body.page-product-configurable table td form {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
}

body.page-product-configurable div.custom-qty.reduced,
body.page-product-configurable div.custom-qty.increase {
    display: inline-flex;
    background-color: #ffffff;
    padding: 4px 5px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield !important;
}

body.page-product-configurable .table_sut .add_to_cart_form .btn .action {
    padding: 5px;
    height: 30px;
    line-height: 16px;
    font-size: 15px !important;
    font-weight: 400;
    background: var(--sutura-primary);
    border: 1px solid var(--sutura-primary);
}

body.page-product-configurable .table_sut .add_to_cart_form .btn .action:hover {
    border: 1px solid var(--sutura-primary);
    color: var(--sutura-primary);
    background: #ffffff;
}

body .coltf8 {
    width: 20%;
}

body.page-product-configurable .table_sut .plusminus {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ccc;
    width: 90px;
    height: 32px;
}

/* Visibility class used by JS */
body.page-product-configurable .sut_tbody {
    display: none;
}
body.page-product-configurable .sut_tbody.visible_tbody {
    display: table-row-group;
}
