.ebcb-widget { direction: rtl; }

.ebcb-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font: inherit;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: color .25s ease, background-color .25s ease, box-shadow .35s ease, border-color .25s ease;
}

.ebcb-button::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(110deg, transparent 18%, rgba(255,255,255,.24) 45%, transparent 72%);
    background-size: 220% 100%;
    background-position: 180% 0;
    pointer-events: none;
}

.ebcb-button:hover,
.ebcb-button:focus {
    color: #fff;
    text-decoration: none;
    box-shadow: 0 0 0 3px rgba(17,17,17,.08), 0 10px 28px rgba(0,0,0,.14);
}

.ebcb-button:hover::before,
.ebcb-button:focus-visible::before {
    opacity: 1;
    animation: ebcb-button-shine .9s ease both;
}

.ebcb-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.ebcb-button.is-disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.ebcb-button__ripple {
    position: absolute;
    z-index: 2;
    display: block;
    border-radius: 999px;
    background: currentColor;
    opacity: .18;
    pointer-events: none;
    transform: scale(0);
    animation: ebcb-button-ripple .68s cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes ebcb-button-shine { 0% { background-position: 180% 0; } 100% { background-position: -70% 0; } }
@keyframes ebcb-button-ripple { 0% { transform: scale(0); opacity: .22; } 75% { opacity: .09; } 100% { transform: scale(1); opacity: 0; } }

.ebcb-modal {
    --ebcb-modal-duration: 520ms;
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ebcb-modal-duration) ease, visibility 0s linear var(--ebcb-modal-duration);
}

.ebcb-modal.is-open,
.ebcb-modal.is-closing { visibility: visible; }
.ebcb-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    transition: opacity var(--ebcb-modal-duration) ease, visibility 0s linear 0s;
}

.ebcb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .52);
    backdrop-filter: blur(0);
    opacity: 0;
    transition: opacity var(--ebcb-modal-duration) ease, backdrop-filter var(--ebcb-modal-duration) ease;
}
.ebcb-modal.is-open .ebcb-modal__backdrop { opacity: 1; backdrop-filter: blur(5px); }

.ebcb-modal__dialog {
    position: relative;
    z-index: 1;
    width: 720px;
    max-width: 100%;
    max-height: calc(100vh - 40px);
    overflow: auto;
    box-sizing: border-box;
    padding: 28px;
    border-radius: 16px;
    background: #fff;
    color: #111;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
    text-align: right;
    opacity: 0;
    transform: scale(.92);
    filter: blur(5px);
    transition: opacity var(--ebcb-modal-duration) ease, transform var(--ebcb-modal-duration) cubic-bezier(.16,1,.3,1), filter var(--ebcb-modal-duration) ease;
}
.ebcb-modal.is-open .ebcb-modal__dialog { opacity: 1; transform: scale(1); filter: blur(0); }

.ebcb-modal__close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #111;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .25s ease;
}
.ebcb-modal__close:hover,
.ebcb-modal__close:focus { background: #e6e6e6; box-shadow: 0 0 0 4px rgba(0,0,0,.05); }

.ebcb-modal__title { margin: 0 0 14px; padding-left: 46px; font-size: 22px; line-height: 1.5; }
.ebcb-modal__product {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f7f7;
}

.ebcb-purchase-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
    width: 100%;
}
.ebcb-purchase-fields--cols-1 { grid-template-columns: minmax(0, 1fr); }
.ebcb-purchase-fields--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ebcb-purchase-fields--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ebcb-purchase-field { min-width: 0; width: 100%; box-sizing: border-box; }
.ebcb-purchase-field label { display: block; margin-bottom: 7px; font-weight: 600; }
.ebcb-purchase-field input,
.ebcb-purchase-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .25s ease;
}
.ebcb-purchase-field textarea { min-height: 110px; resize: vertical; }
.ebcb-purchase-field input:focus,
.ebcb-purchase-field textarea:focus { border-color: #777; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.ebcb-required { color: #c62828; }
body.ebcb-modal-open { overflow: hidden; }

@media (max-width: 767px) {
    .ebcb-button { width: 100%; }
    .ebcb-modal { padding: 12px; }
    .ebcb-modal__dialog { padding: 24px 18px; border-radius: 14px; }
    .ebcb-purchase-fields,
    .ebcb-purchase-fields--cols-1,
    .ebcb-purchase-fields--cols-2,
    .ebcb-purchase-fields--cols-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .ebcb-button::before,
    .ebcb-button__ripple { animation: none !important; }
    .ebcb-button,
    .ebcb-modal,
    .ebcb-modal__backdrop,
    .ebcb-modal__dialog { transition-duration: .01ms !important; }
}

.ebcb-purchase-form { width: 100%; }

.ebcb-checkout-separator {
    width: 100%;
    height: 1px;
    margin: 24px 0;
    background: linear-gradient(90deg, transparent 0%, #e8e8e8 12%, #e8e8e8 88%, transparent 100%);
}

.ebcb-section-kicker {
    display: block;
    margin: 0 0 10px;
    color: #6c727f;
    font-size: 13px;
    font-weight: 700;
}

.ebcb-price-box {
    padding: 16px 18px;
    border: 1px solid #edf0f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.ebcb-price-line {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 4px;
}

.ebcb-price-old {
    color: #9aa1aa;
    font-size: 14px;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.ebcb-price-sale-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #16803c;
    font-size: 11px;
    font-weight: 800;
}

.ebcb-price-current {
    color: #111827;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.6;
}

.ebcb-price-unavailable {
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
}

.ebcb-coupon-area { width: 100%; }

.ebcb-coupon-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    align-items: stretch;
}

.ebcb-coupon-input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
    padding: 10px 13px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.ebcb-coupon-input:focus {
    border-color: #8c96a4;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .06);
}

.ebcb-coupon-input.is-applied {
    border-color: #43a566;
    background: #fbfffc;
}

.ebcb-coupon-apply {
    position: relative;
    overflow: hidden;
    min-width: 88px;
    min-height: 46px;
    padding: 9px 18px;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow .2s ease, opacity .2s ease;
}

.ebcb-coupon-apply:hover { box-shadow: 0 8px 24px rgba(17, 24, 39, .15); }
.ebcb-coupon-apply:disabled { opacity: .58; cursor: wait; }

.ebcb-coupon-status {
    min-height: 22px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
}
.ebcb-coupon-status.is-success { color: #16803c; }
.ebcb-coupon-status.is-error { color: #c7352b; }
.ebcb-coupon-status.is-loading { color: #6c727f; }

.ebcb-order-summary {
    padding: 15px 18px;
    border: 1px solid #eceff2;
    border-radius: 14px;
    background: #fafbfc;
}

.ebcb-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    color: #59616d;
    font-size: 13px;
}

.ebcb-summary-row + .ebcb-summary-row { border-top: 1px dashed #e3e6ea; }
.ebcb-summary-row strong { color: #222a35; font-weight: 750; }
.ebcb-summary-discount strong { color: #16803c; }
.ebcb-summary-payable { padding-top: 12px; font-size: 14px; }
.ebcb-summary-payable strong { color: #111827; font-size: 18px; font-weight: 850; }

.ebcb-payment-error {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff1f0;
    color: #b42318;
    font-size: 12px;
    font-weight: 700;
}
.ebcb-payment-error.is-visible { display: block; }

.ebcb-payment-actions {
    margin-top: 18px;
    text-align: left;
}

.ebcb-pay-button {
    min-width: 150px;
    background: #111827;
    color: #fff;
}

.ebcb-pay-button.is-loading { cursor: wait; opacity: .72; }

.ebcb-return-notice {
    position: fixed;
    z-index: 1000000;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .14);
    background: #fff;
    font-size: 13px;
    font-weight: 800;
}
.ebcb-return-notice.is-success { color: #16803c; border: 1px solid #b7e7c5; }
.ebcb-return-notice.is-error { color: #b42318; border: 1px solid #f1b8b3; }

@media (max-width: 767px) {
    .ebcb-checkout-separator { margin: 20px 0; }
    .ebcb-coupon-row { grid-template-columns: minmax(0, 1fr) 86px; }
    .ebcb-coupon-apply { min-width: 0; padding-inline: 10px; }
    .ebcb-payment-actions { text-align: left; }
    .ebcb-pay-button { width: 100%; }
}
