.csp-product-widget__section.is-hidden,
.csp-product-widget__price-panel.is-hidden {
    display: none;
}

.csp-product-widget {
    margin: 16px 0;
    border: 1px solid #d8d8d8;
    border-radius: 2px;
    background: #fff;
    direction: rtl;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    clear: both;
}

/* Avoid layout flash while JS moves widget under gallery. */
.product-essential > .csp-product-widget:not(.csp-product-widget--placed) {
    visibility: hidden;
    position: absolute;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
}

.csp-product-widget--under-pictures,
.csp-product-widget--placed {
    visibility: visible;
    position: static;
    height: auto;
    overflow: visible;
    display: block;
    float: none;
    margin: 16px 0 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-essential .product-pictures-column .csp-product-widget {
    float: none;
    clear: both;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.csp-product-widget__section {
    padding: 12px;
}

.csp-product-widget__section + .csp-product-widget__section {
    border-top: 1px solid #ececec;
}

.csp-product-widget__title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #222;
}

.csp-product-widget__providers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.csp-product-widget__provider,
.csp-product-widget__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.csp-product-widget__provider {
    gap: 8px;
    min-height: 52px;
    padding: 6px 8px;
}

.csp-product-widget__provider:hover,
.csp-product-widget__provider.is-active,
.csp-product-widget__tab:hover,
.csp-product-widget__tab.is-active {
    border-color: #0d6efd;
    background: #f3f8ff;
}

.csp-product-widget__provider-name,
.csp-product-widget__tab {
    font-size: 13px;
    color: #333;
}

.csp-product-widget__tab {
    flex-direction: row;
    padding: 10px 16px;
    font-size: 14px;
}

.csp-product-widget__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.csp-product-widget__help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    color: #0d6efd;
    font-size: 14px;
    text-decoration: none;
}

.csp-product-widget__provider-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.csp-product-widget__provider-image img {
    display: block;
    max-width: 72px;
    max-height: 36px;
    object-fit: contain;
}

.csp-product-widget__provider-name {
    line-height: 1.4;
    text-align: center;
}

.csp-product-widget__help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.csp-product-widget__help-link:hover {
    text-decoration: underline;
}

.csp-product-widget__help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #0d6efd;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.csp-product-widget__prices {
    display: flex;
    flex-direction: column;
}

.csp-product-widget__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
    font-size: 14px;
}

.csp-product-widget__price-row:last-child {
    border-bottom: 0;
}

.csp-product-widget__price-label {
    color: #555;
}

.csp-product-widget__price-value {
    color: #111;
    white-space: nowrap;
    font-weight: 400;
}

.csp-product-widget__empty {
    margin: 0;
    text-align: center;
    color: #777;
    font-size: 14px;
}

.csp-product-widget__warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background-color: #fff8e6;
    border: 1px solid #f0dfa8;
    color: #7a5d00;
    font-size: 13px;
    line-height: 1.8;
}

.csp-product-widget__warning-icon {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 18px;
    margin-top: 4px;
}

.csp-product-widget__warning-icon:before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid #e6a800;
}

.csp-product-widget__warning-icon:after {
    content: "!";
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.csp-product-widget__warning-text {
    flex: 1 1 auto;
    white-space: pre-line;
}

.csp-open-popup-button {
    margin-inline-start: 8px;
    vertical-align: top;
    padding: 0 15px;
    font-size: 15px !important;
    white-space: nowrap;
    border-radius: 10px !important;
    border: 0 !important;
    background-color: #f28c18 !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    cursor: pointer;
}

.csp-open-popup-button:hover,
.csp-open-popup-button:focus {
    background-color: #e07d0f !important;
    color: #fff !important;
}

.csp-open-popup-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 18px;
}

.csp-open-popup-button__text {
    line-height: 1;
}

@media (min-width: 576px) {
    .csp-open-popup-button {
        width: 240px;
    }
}

.csp-popup-host {
    display: block;
}

.csp-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.csp-popup.is-open {
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.csp-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.csp-popup__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    direction: rtl;
}

.csp-popup__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #ececec;
}

.csp-popup__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.csp-popup__close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

.csp-popup__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.csp-product-widget--in-popup {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.csp-product-widget--in-popup.csp-product-widget--placed {
    visibility: visible;
    position: static;
    height: auto;
    overflow: visible;
}

html.csp-popup-open,
body.csp-popup-open {
    overflow: hidden;
}

@media (max-width: 575px) {
    .csp-product-widget__providers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .csp-product-widget__price-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .csp-open-popup-button {
        display: block;
        width: 100%;
        margin: 8px 0 0;
    }

    .csp-popup {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .csp-popup__dialog {
        max-width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        width: 100%;
    }
}
