.amit-terms-popup-open {
    overflow: hidden;
}

.amit-terms-popup[hidden] {
    display: none;
}

.amit-terms-popup {
    align-items: center;
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 24px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 999999;
}

.amit-terms-popup__backdrop {
    background: rgba(15, 23, 42, 0.66);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.amit-terms-popup__panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);
    color: #1f2937;
    max-height: min(780px, calc(100vh - 48px));
    max-width: 720px;
    overflow: hidden;
    position: relative;
    width: min(100%, 720px);
}

.amit-terms-popup__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    font-size: 28px;
    height: 44px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 12px;
    top: 10px;
    width: 44px;
}

.amit-terms-popup__close:hover,
.amit-terms-popup__close:focus {
    color: #111827;
}

.amit-terms-popup__title {
    border-bottom: 1px solid #e5e7eb;
    font-size: 22px;
    line-height: 1.3;
    margin: 0;
    padding: 22px 64px 18px 24px;
}

.amit-terms-popup__body {
    font-size: 15px;
    line-height: 1.6;
    max-height: 48vh;
    overflow: auto;
    padding: 22px 24px;
}

.amit-terms-popup__body > :first-child {
    margin-top: 0;
}

.amit-terms-popup__body > :last-child {
    margin-bottom: 0;
}

.amit-terms-popup--rtl .amit-terms-popup__title,
.amit-terms-popup--rtl .amit-terms-popup__body,
.amit-terms-popup--rtl .amit-terms-popup__agree {
    direction: rtl;
    text-align: right;
}

.amit-terms-popup--rtl .amit-terms-popup__body ul,
.amit-terms-popup--rtl .amit-terms-popup__body ol {
    margin-left: 0;
    margin-right: 1.5em;
    padding-left: 0;
    padding-right: 1.5em;
}

.amit-terms-popup--rtl .amit-terms-popup__close {
    left: 12px;
    right: auto;
}

.amit-terms-popup--rtl .amit-terms-popup__title {
    padding-left: 64px;
    padding-right: 24px;
}

.amit-terms-popup__link {
    margin-top: 16px;
}

.amit-terms-popup__agree {
    align-items: flex-start;
    border-top: 1px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    font-size: 15px;
    gap: 10px;
    line-height: 1.5;
    margin: 0;
    padding: 18px 24px;
}

.amit-terms-popup__checkbox {
    flex: 0 0 auto;
    margin-top: 4px;
}

.amit-terms-popup__actions {
    align-items: center;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 18px 24px;
}

.amit-terms-popup__continue:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

#place_order.amit-terms-place-order-disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@media (max-width: 640px) {
    .amit-terms-popup {
        align-items: flex-end;
        padding: 12px;
    }

    .amit-terms-popup__panel {
        max-height: calc(100vh - 24px);
    }

    .amit-terms-popup__title {
        font-size: 19px;
        padding-left: 18px;
    }

    .amit-terms-popup__body,
    .amit-terms-popup__agree,
    .amit-terms-popup__actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .amit-terms-popup__actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .amit-terms-popup__actions .button {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
}
