.ecomus-size-guide-tabs {
    display: block;
}

.ecomus-size-guide-tabs__panels {
    position: relative;
}

.ecomus-size-guide-tabs__panel.active {
    opacity: 1;
    display: block;
    visibility: visible;
    position: static;
    transform: scaleY(1);
}

.ecomus-size-guide-tabs__panel {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    transform: scaleY(0);
    width: 100%;
    transition: opacity .4s;
}

.ecomus-size-guide-tabs__nav {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 10px 0 24px 0;
    z-index: 1;
    position: relative;
}

.ecomus-size-guide-tabs__nav li {
    font-weight: 600;
    font-size: 14px;
    color: #111;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    padding-bottom: 8px;
    margin: 0;
    position: relative;
    
    padding: 16px 10px;
    cursor: pointer;
    font-size: 14px;
    /* margin-bottom: 14px; */
    font-style: normal;
    font-weight: 700;
    background-color: #fff;
    border-color: #000;
    line-height: 16px;
    border: 1px solid #d0d0d0;
    list-style: none;
    min-width: 165px;
}

div#tab-ecomus_size_guide .ecomus-size-guide-tabs__nav li{
    min-width: 100px;
    padding: 10px 10px;
}

.ecomus-size-guide-tabs__nav li.active {
    background: var(--em-main-color);
    color: var(--em-main-text-color);
    border-color: var(--em-main-color);
}

.ecomus-size-guide-tabs__nav li::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    border-bottom: 1px solid;
    transition: width .4s;
}

.ecomus-size-guide-tabs__nav li:hover::after {
    width: 100%;
    left: 0;
}

.rtl .ecomus-size-guide-tabs__nav li:hover::after {
    left: auto;
    right: 0;
}

.ecomus-size-guide-tabs__nav li:last-child {
    margin-right: 0;
    border-end-end-radius: 5px; 
    border-start-end-radius: 5px; 
}

.rtl .ecomus-size-guide-tabs__nav li:last-child {
    margin-right: 0;
    margin-left: 0;
     border-end-end-radius: 5px; 
     border-start-end-radius: 5px; 
}

.ecomus-size-guide-tabs__nav li:first-child {
    margin-left: 0;
    border-start-start-radius: 5px;
    border-end-start-radius: 5px;
}

.rtl .ecomus-size-guide-tabs__nav li:first-child {
    margin-left: 0;
    margin-right: 0;
    border-start-start-radius: 5px;
    border-end-start-radius: 5px;
}

div#tab-ecomus_size_guide {
    padding: 10px 0 0 0;
}

.woocommerce-Tabs-panel--ecomus_size_guide .ecomus-size-guide-tabs {
    padding-bottom: 0;
}

.ecomus-size-guide__name {
    font-size: 22px;
    font-weight: 500;
    padding: 0 0 10px;
    margin: 0 0 10px;
}

.ecomus-size-guide-tabs .ecomus-size-guide__name{
    display: none;
}

.ecomus-size-guide-tabs__panel {
    margin-bottom: 20px;
}

.ecomus-size-guide-tabs__panel > *:not(.ecomus-size-guide__name) {
    clear: both;
}

.ecomus-size-guide__table-wrapper {
    overflow-x: auto;
}

.ecomus-size-guide__table {
    border: 1px solid var(--em-border-color);
    border-spacing: 0;
    border-collapse: collapse;
    border-radius: var(--em-rounded-x);
    box-shadow: 0 0 0 1px var(--em-border-color);
    width: 100%;
    line-height: 1.4;
    margin-bottom: 0 !important;
}

.ecomus-size-guide__table td {
    border: 1px solid var(--em-border-color);
    border-width: 0 1px 1px 0;
    padding: 10px;
}

.ecomus-size-guide__table th {
    border: 1px solid var(--em-border-color);
    padding: 10px;
    text-align: start;
    font-weight: 600;
}

.size-guide-modal.modal {
    --em-modal-content-width: 900px;
}

.size-guide-modal .modal-size-chart {
    max-height: calc(100vh - 180px);
}

/* ensure modal scroll target works by making inner content scrollable */
.size-guide-modal .modal__content.modal-size-chart {
    overflow-y: auto;
    padding: 35px 20px 17px 20px;
}

table.variations tr {
    position: relative;
}

table.variations tr .size-guide-button {
    position: absolute;
    top: 4px;
    right: 0;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.size-guide-button {
    display: inline-flex;
    align-items: center;
}

.size-guide-button .ecomus-svg-icon {
    margin-right: 12px;
}

/* Hide table Additional Info + Description */
/* .ecomus-size-guide__info,
.ecomus-size-guide__description {
    display: none !important;
} */

/* custom css*/
.entry-summary .product-size-guide {
    margin-bottom: 25px;
    z-index: 1;
}
.entry-summary .product-size-guide a{
    text-decoration: underline;
    text-underline-offset: 5px;
    font-weight: 600;
}

.product-type-variable .entry-summary .product-size-guide {
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}
.product-type-variable .entry-summary .product-size-guide a{
    position: absolute;
    top: 2px;
    right: 0;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-weight: 600;
}

html[lang="ar"] .product-type-variable .entry-summary .product-size-guide a{
    right: auto;
    left: 0;
}


/* -----------------------------------------------------------------
   HOW TO MEASURE block
   ----------------------------------------------------------------- */

/* Wrapper: now acts like a block with two parts:
   1) intro (heading + intro desc)
   2) rows (main content + image side by side)
*/
.esg-measure-section {
    /*margin-top: 30px;*/
    /*margin-bottom: 30px;*/
}

.esg-measure-section__intro {
    margin-bottom: 20px;
}

.esg-measure-section__heading {
    font-size: 22px;
    font-weight: 500;
    padding: 0 0 10px;
    margin: 0 0 10px;
}

.esg-measure-section__intro-desc {
    line-height: 1.5;
    font-size: 14px;
}

/* The row with rich text + image side by side */
.esg-measure-section__rows {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    align-content: center;
    padding: 20px;
    background: #ebedee;
    border-radius: 10px;
}

.esg-measure-section__text {
    flex: 1 1 300px;
    font-size: 14px;
    line-height: 1.5;
}

.esg-measure-section__image {
    flex: 1 1 200px;
    text-align: center;
}

.esg-measure-section__image img,
.esg-measure-section__img {
    max-width: 100%;
    height: auto;
}

/* -----------------------------------------------------------------
   "How To Measure" jump button in modal header
   ----------------------------------------------------------------- */
.size-guide-modal .modal__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    /* gap: 10px; */
    flex-direction: column;
    padding: 0;
}

.size-guide-modal .modal__header .esg-measure-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.rtl .size-guide-modal .modal__header .esg-measure-button {
    /* tweak for RTL layouts if needed */
}



.modal__button-close {
    font-size: 0;
    font-size: 1rem;
    z-index: 3;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    /* font-size: 2rem; */
    line-height: 1.5rem;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'><g stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><rect stroke='%23191919' stroke-width='1.5' fill='%23FFFFFF' x='0.75' y='0.75' width='32.5' height='32.5'/><g transform='translate(11,11)' stroke='%23000' stroke-width='2'><polyline points='12 0 6 6 12 12'/><polyline points='0 0 6 6 0 12'/></g></g></svg>");
    font-weight: 600;
    width: 34px;
    background-repeat: no-repeat;
    background-position: 82% center;
    padding-right: 10px;
    height: 34px;
    position: absolute;
    right: 0;
    top: 0;
    opacity: 1;
    color: transparent !important;
}




/* Steps layout inside How To Measure */
.esg-measure-steps {
  display: grid;
  gap: 10px;
}

.esg-measure-step {
  /*display: grid;*/
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.esg-measure-step__num {
  display: inline-flex;
    align-items: center;
    justify-content: center;
    /* min-width: 28px; */
    /* height: 28px; */
    border-radius: 50%;
    color: #000000;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    margin-inline-end: 5px;
}

.esg-measure-step__text {
  font-size: 16px;
  line-height: 1.5;
  display: inline;
}

















#size-guide-modal .modal__wrapper {
    max-width: 680px;
    margin: auto;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0;
}

.size-guide-modal a.esg-measure-button.esg-measure-jump{
    color: #000;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 2px;
    line-height: 3em;
    /*margin: 15px 0;*/
}

.esg-measure-jump-div{
    margin: 15px 0;
}


.modal-size-chart h3.modal__title.em-font-h5 {
    font-size: 35px;
    line-height: 1.1;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
}


#size-guide-modal tr td, #size-guide-modal tr th, div#tab-ecomus_size_guide tr td, div#tab-ecomus_size_guide tr th{
    /* width: 130px; */
    min-width: 130px;
    min-height: 50px;
    padding: 10px;
    line-height: 15px;
    border: 0;
    height: 50px;
    text-align: center;
}

/*div#tab-ecomus_size_guide tr td, div#tab-ecomus_size_guide tr th{}*/


#size-guide-modal tr td{
    color: #000;
}

#size-guide-modal tr td:nth-child(1), div#tab-ecomus_size_guide tr td:nth-child(1) {
    /* border-block-end: 1px solid #000; */
    border-inline-end: 1px solid #000;
    font-weight: 700;
    /*left: 0;*/
    /*position: -webkit-sticky;*/
    /*position: sticky;*/
    /*z-index: 1;*/
    background: #fff;
}
#size-guide-modal tr th:nth-child(1) {
    /*left: 0;*/
    /*position: -webkit-sticky;*/
    /*position: sticky;*/
    /*z-index: 1;*/
}
#size-guide-modal tr td:nth-child(2n), div#tab-ecomus_size_guide tr td:nth-child(2n) {
    background: #ebedee;
}


#size-guide-modal tr th, div#tab-ecomus_size_guide tr th{
    background: var(--em-main-color) !important;
    color: var(--em-main-text-color) !important;
    border-color: var(--em-main-color) !important;
}

.single-product div.product .woocommerce-tabs .ecomus-size-guide__table {
    border-radius: 5px;
    overflow: hidden;
}


.ecomus-size-guide-title-block, .esg-measure-section {
    margin-top: 60px;
}

h4.ecomus-size-guide__name.em-font-h6, h4.esg-measure-section__heading.em-font-h6{
    font-size: 30px;
    line-height: 28px;
    margin-bottom: 0;
    margin-top: 10px;
    letter-spacing: 1.5px;
    font-style: oblique;
    font-weight: 400;
    text-transform: uppercase;
    padding: 0;
}

.ecomus-size-guide-title-block p, .esg-measure-section p{
    font-size: 16px;
    line-height: 22px;
    margin: 10px 0 0 0;
    margin-bottom: 16px;
    font-weight: 400;
    color: #707070;
    letter-spacing: 1px;
}
.esg-measure-section__rows p{
    color: #333;
}

th.label {
    position: relative;
}

.product-type-variable .entry-summary .product-size-guide.beside_attribute {
    position: absolute;
    right: 0;
    top: 2px;
}
html[lang="ar"] .product-type-variable .entry-summary .product-size-guide.beside_attribute{
    right: auto;
    left: 0;
}

.product-type-variable .entry-summary .product-size-guide.beside_attribute a {
    position: static;
}

@media (max-width: 767px) {
    .modal__button-close{
        transform: translate(0, -150%);
    }
    body{
        padding: 0 !important;
    }
    .modal--open .modal__container {
        top: 0% !important;
    }
    .size-guide-modal .modal__content.modal-size-chart {
        padding: 35px 20px 160px 20px;
    }
    
    .ecomus-size-guide-tabs__nav li{
        min-width: 130px;
    }
    
    div#tab-ecomus_size_guide .ecomus-size-guide-tabs__nav li{
    min-width: 100px;
}
}


