/**
 * Jersey Customizer
 */

.jersey-customizer {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 50px;
}

.jersey-customizer-error {
    font-family: "RAG Sans", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--hapoel-color-torch-red);
}

.jersey-customizer-stock-status {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 10px;
    background-color: #9f91c910;
    border: solid 1px #e9e7f2;
    border-radius: 100px;
    padding: 2px 12px;
    width: max-content;
    max-width: 100%;
    font-family: "RAG Sans", sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--hapoel-color-throat);
    z-index: 2;
}

.jersey-customizer-stock-status::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--hapoel-color-throat);
    transition: background-color 0.4s ease;
}

.jersey-customizer-stock-status[data-status="In Stock"]::after,
.jersey-customizer-stock-status[data-status="auction-running"]::after {
    background-color: var(--hapoel-color-success);
}

.jersey-customizer-stock-status[data-status="Backorder"]::after,
.jersey-customizer-stock-status[data-status="Out of Stock"]::after,
.jersey-customizer-stock-status[data-status="auction-ended"]::after,
.jersey-customizer-stock-status[data-status="auction-not-started"]::after {
    background-color: #d2cedf;
}

/* Jersey Customizer - Group */

.jersey-customizer-group {
    position: relative;
}

.jersey-customizer-group .jersey-customizer:not(.visible) {
    display: none;
}

#preview {
    position: absolute;
    top: calc(var(--hapoel-header-base-height) * -1);
    opacity: 0;
    visibility: hidden;
    height: 0;
}

/* Jersey Customizer - Gallery */

.jersey-customizer-gallery {
    position: relative;
    width: 470px;
    aspect-ratio: 1;
}

.jersey-customizer-gallery-sticky {
    position: sticky;
    top: var(--hapoel-header-base-height);
}

.jersey-customizer-carousel {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
}

.jersey-customizer-carousel-main {
    width: 100%;
    aspect-ratio: 468 / 672;
    position: relative;
    outline: solid 1px #e9e7f2;
    outline-offset: 1px;
}

.jersey-customizer-carousel-main .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}

.jersey-customizer-carousel-main .swiper-slide img {
    display: block;
    width: 100%;
}

.jersey-customizer-carousel-thumbnails {
    display: flex;
    column-gap: 12px;
    max-height: 100%;
    overflow: auto;
}

.jersey-customizer-carousel-thumb {
    flex: 1;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-bottom: solid 1px #f3f2f6;
    transition: opacity 0.4s ease, border-color 0.4s ease;
    overflow: hidden;
}

.jersey-customizer-carousel-thumb img {
    display: block;
    width: 100%;
    transform-origin: center center;
    transition: transform 0.4s ease;
}

.jersey-customizer-carousel-thumb:not(.active):hover img {
    transform: scale(1.035);
}

.jersey-customizer-carousel-thumb.active {
    opacity: 0.5;
    border-bottom: solid 2px var(--hapoel-color-torch-red);
    cursor: auto;
}

.jersey-customizer-carousel-navigation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.jersey-customizer-carousel-main:hover .jersey-customizer-carousel-navigation {
    opacity: 1;
}

.jersey-customizer-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.jersey-customizer-carousel-nav:not(.swiper-button-disabled):hover {
    transform: scale(1.15);
}

.jersey-customizer-carousel-nav.swiper-button-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.jersey-customizer-carousel-nav svg {
    display: block;
    width: 32px;
    height: auto;
}

html[dir="rtl"] .jersey-customizer-carousel-nav svg {
    transform: rotate(180deg);
}

/* Jersey Customizer - Product */

.jersey-customizer-product {
    flex: 1;
    max-width: calc(100% - 470px - 50px);
}

.jersey-customizer-product h2 {
    margin: 0 0 8px;
    max-width: 450px;
}

.jersey-customizer-sku-label {
    margin-bottom: 16px;
    font-family: "RAG Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #666175;
}

.jersey-customizer-custom-label {
    margin-bottom: 16px;
    background-color: #9f91c910;
    border: solid 1px #e9e7f2;
    border-radius: 100px;
    padding: 0 10px;
    width: max-content;
    max-width: 100%;
    font-family: "RAG Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--hapoel-color-throat);
}

.jersey-customizer-price {
    margin-bottom: 16px;
}

/* Jersey Customizer - Switcher */

.jersey-customizer-switcher {
    overflow: auto;
}

.jersey-customizer-switcher-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.jersey-customizer-switch {
    width: 120px;
    aspect-ratio: 1;
    cursor: pointer;
    border: solid 1px #e9e7f2;
    border-radius: 10px;
    transition: border-color 0.4s ease;
    overflow: hidden;
}

.jersey-customizer-switch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.jersey-customizer-switch:not(.active):hover {
    border-color: black;
}

.jersey-customizer-switch.active {
    pointer-events: none;
    border-color: var(--hapoel-color-torch-red);
}

/* Jersey Customizer - Form */

.jersey-customizer-handler {
    padding-top: 30px;
}

.jersey-customizer-handler form,
.jersey-customizer-fieldset {
    display: flex;
    flex-direction: column;
    row-gap: 30px;
}

.jersey-customizer-hint {
    display: none;
    pointer-events: none;
}

.jersey-customizer-field .jersey-customizer-label {
    margin: 0 0 16px;
    display: block;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
    color: black;
}

/* radio */

.jersey-customizer-radiogroup {
    width: 100%;
    overflow: auto;
}

.jersey-customizer-radiogroup-inner {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
}

.jersey-customizer-radiogroup label {
    flex: 1;
    max-width: 200px;
    height: 52px;
    min-width: 94px;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 600;
    color: black;
    border: solid 1px #e9e7f2;
    border-radius: 100px;
    cursor: pointer;
    transition: border-color 0.4s ease;
}

.jersey-customizer-radiogroup label:hover {
    border-color: black;
}

.jersey-customizer-radiogroup label input {
    display: none;
}

.jersey-customizer-radiogroup label:has(input:checked) {
    border-color: var(--hapoel-color-torch-red);
    pointer-events: none;
}

.jersey-customizer-radiogroup:has(.jersey-customizer-radio-image),
.jersey-customizer-radiogroup:has(.jersey-customizer-radio-data) {
    align-items: stretch;
}

.jersey-customizer-radiogroup:has(.jersey-customizer-radio-image) label,
.jersey-customizer-radiogroup:has(.jersey-customizer-radio-data) label {
    flex: unset;
    height: auto;
    padding: 10px 30px;
}

.jersey-customizer-radiogroup label:has(.jersey-customizer-radio-image),
.jersey-customizer-radiogroup label:has(.jersey-customizer-radio-data) {
    flex: 1;
    column-gap: 10px;
    padding: 10px 24px;
}

.jersey-customizer-radio-image {
    width: max-content;
    height: auto;
    width: 60px;
}

.jersey-customizer-radio-image img {
    display: block;
    width: auto;
    height: 100% !important;
}

.jersey-customizer-radio-data {
    display: flex;
    flex-direction: column;
    row-gap: 2px;
}

.jersey-customizer-radio-title {
    font-weight: 400;
    white-space: nowrap; /* fix title */
}

.jersey-customizer-radio-info {
    font-size: 12px;
    line-height: 1.2;
    color: #666175;
}

/* textfield */

.jersey-customizer-field input[type="text"] {
    width: 200px;
    height: 52px;
    padding: 0 24px;
    border-radius: 100px;
    box-shadow: none;
    outline: none;
    border: solid 1px #e9e7f2;
    font-size: 18px;
    font-weight: 600;
    transition: border-color 0.4s ease;
}

.jersey-customizer-field input[type="text"]:hover {
    border-color: black;
}

.jersey-customizer-field input[type="text"]:focus {
    border-color: var(--hapoel-color-torch-red);
}

/* validation */

.jersey-customizer-field.error input {
    border: solid 1px var(--hapoel-color-torch-red);
}

.jersey-customizer-field.error .jersey-customizer-hint {
    display: block;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    margin-top: 4px;
    color: var(--hapoel-color-torch-red);
    pointer-events: all;
}

/* footer */

.jersey-customizer-footer,
.jersey-customizer-footer-controls {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    gap: 24px 12px;
}

.jersey-customizer-footer {
    justify-content: space-between;
}

/* Jersey Customizer - Customizer */

/* fonts */

@font-face {
    font-family: "RAG Marom Poster";
    src: url("../fonts/RAGMaromPoster/RAG-Marom-Poster-1.2-Ultra.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* @font-face {
    font-family: "Tusker Grotesk";
    src: url("../fonts/TuskerGrotesk-5800Super/TuskerGrotesk-5800Super.woff2") format("woff2"),
         url("../fonts/TuskerGrotesk-5800Super/TuskerGrotesk-5800Super.woff") format("woff"),
         url("../fonts/TuskerGrotesk-5800Super/TuskerGrotesk-5800Super.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
} */

/* fields */

.jersey-customizer-controls {
    display: none;
    pointer-events: none;
}

.jersey-customizer-controls.visible {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 12px;
    pointer-events: all;
}

/* styles */

.jersey-customizer-gallery:has(.jersey-customizer-preview.visible) .jersey-customizer-carousel {
    display: none;
}

.jersey-customizer-preview {
    position: relative;
    display: none;
    pointer-events: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 468 / 672;
    background-color: white;
    color: white;
    outline: solid 1px #e9e7f2;
    outline-offset: 1px;
    line-height: 1;
    z-index: 1;
    overflow: hidden;
}

.jersey-customizer-preview.visible {
    display: flex;
    pointer-events: all;
}

.jersey-customizer-preview-aligner {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    container-type: inline-size;
}

.jersey-customizer-preview img {
    display: block;
    width: 100%;
}

.jersey-customizer-preview-name,
.jersey-customizer-preview-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: inherit;
    width: max-content;
}

.jersey-customizer-preview-name {
    font-family: "RAG Marom Poster", sans-serif;
    top: 21%;
    font-size: 9cqw;
    letter-spacing: 0.05em;
    transform: translateX(calc(-50% + 2%));
}

.jersey-customizer-preview-name.small {
    top: 20%;
    font-size: 7cqw;
    line-height: 1.35;
}

.jersey-customizer-preview-number {
    /* font-family: "Tusker Grotesk", sans-serif; */
    font-family: "RAG Marom", sans-serif;
    top: 34%;
    font-size: 32cqw;
    letter-spacing: 0.015em;
    transform: translateX(calc(-50% + 5%));
}

.jersey-customizer-preview-sponsors {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.jersey-customizer-preview-presset {
    width: 100%;
    display: none;
}

.jersey-customizer-preview-presset.visible {
    display: block;
}

.jersey-customizer-preview-presset img {
    display: block;
    width: 100%;
}

/* anchor */

.jersey-customizer-field + .hapoel-mobile {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.jersey-customizer-anchor {
    text-align: center;
    text-decoration: underline !important;
    color: black;
    margin-bottom: 5px;
}

/* Responsive Styles */

@media screen and (max-width: 1199.9px) {
    .jersey-customizer {
        flex-direction: column;
        padding: 0 25px;
    }

    .jersey-customizer-gallery {
        width: 100%;
    }

    .jersey-customizer-carousel-navigation {
        opacity: 1;
    }

    .jersey-customizer-product {
        max-width: 100%;
    }

    .jersey-customizer-product h2 {
        font-size: 38px !important;
        max-width: 100%;
    }

    .jersey-customizer-handler form,
    .jersey-customizer-switcher {
        margin: 0 -10px -10px;
    }

    .jersey-customizer-radiogroup-inner,
    .jersey-customizer-switcher-inner {
        width: max-content;
    }

    .jersey-customizer-switcher,
    .jersey-customizer-radiogroup,
    .jersey-customizer-controls {
        padding: 0 10px 10px;
    }

    .jersey-customizer-label,
    .jersey-customizer-footer {
        padding: 0 10px;
    }

    .jersey-customizer-controls .jersey-customizer-label {
        padding: 0;
    }
}

@media screen and (max-width: 767.9px) {
    .jersey-customizer {
        padding: 0;
        row-gap: 35px;
    }

    .hapoel-price[data-component="jersey-customizer-price"] {
        font-size: 32px;
        column-gap: 8px;
    }

    .jersey-customizer-footer {
        flex-direction: column;
    }

    .jersey-customizer-footer-controls {
        width: 100%;
    }

    .jersey-customizer-footer-controls .hapoel-button {
        flex: 1;
    }

    .jersey-customizer-controls .jersey-customizer-field {
        flex: 1;
    }

    .jersey-customizer-controls .jersey-customizer-field input {
        width: 100%;
    }
}