.buy-now-modal.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 4000;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: #2e4346;
}

.buy-now-modal.modal.show {
    display: block;
}

body.modal-open .modal-backdrop,
body.buy-now-modal-open .modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3990;
    background: rgba(7, 30, 33, 0.62);
}

.buy-now-modal .modal-dialog {
    pointer-events: none;
    width: min(760px, calc(100% - 32px));
    max-width: 760px;
    height: min(860px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    margin: 16px auto;
}

.buy-now-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background: #fff;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(7, 30, 33, 0.28);
}

.buy-now-modal .modal-content,
.buy-now-modal #buyNowForm,
.buy-now-modal .modal-header,
.buy-now-modal .modal-body,
.buy-now-modal .modal-footer,
.buy-now-modal button,
.buy-now-modal a,
.buy-now-modal input,
.buy-now-modal select,
.buy-now-modal textarea,
.buy-now-modal label {
    pointer-events: auto;
}

.buy-now-modal .modal-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 18px 22px;
    background: #fff;
    border-bottom: 1px solid #e6eeee;
}

.buy-now-modal .modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0b2a2e;
}

.buy-now-modal .close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f3f7f6;
    color: #0b2a2e;
    font-size: 22px;
    line-height: 1;
}

.buy-now-modal .close:hover {
    background: #e6f3f0;
    color: #0e7c6b;
}

.buy-now-modal #buyNowForm {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.buy-now-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 22px 22px;
    background: #fff;
}

.buy-now-modal .modal-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 14px 22px;
    background: #fff;
    border-top: 1px solid #e6eeee;
    box-shadow: 0 -10px 24px rgba(11, 42, 46, 0.04);
}

.buy-now-modal .d-none {
    display: none !important;
}

.buy-now-modal .buy-now-field-error:empty {
    display: none !important;
}

.buy-now-modal .buy-now-steps-wrap {
    margin-bottom: 16px;
}

.buy-now-modal .buy-now-steps__label {
    margin-bottom: 8px;
    color: #0e7c6b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.buy-now-modal .buy-now-steps {
    padding: 12px 10px;
    border: 1px solid #d7eee9;
    border-radius: 14px;
    background: #f4faf8;
}

.buy-now-modal .buy-now-order-summary {
    margin-bottom: 18px;
    padding: 16px 18px 14px;
    border: 1px solid #e2eae8;
    border-radius: 14px;
    background: #f7fbfa;
}

.buy-now-modal .buy-now-section-title {
    margin: 0 0 12px;
    color: #0e7c6b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.buy-now-modal .buy-now-summary-row {
    display: grid;
    grid-template-columns: minmax(128px, max-content) minmax(0, 1fr);
    align-items: start;
    column-gap: 24px;
    padding: 7px 0;
    border-bottom: 1px solid #e6eeee;
    color: #5a6e71;
    font-size: 14px;
    line-height: 1.4;
}

.buy-now-modal .buy-now-summary-row.is-total {
    margin-top: 4px;
    padding-top: 12px;
    border-bottom: 0;
    color: #0b2a2e;
    font-size: 15px;
    font-weight: 700;
}

.buy-now-modal .buy-now-summary-row > span:last-child {
    justify-self: end;
    max-width: 100%;
    color: #0b2a2e;
    font-weight: 600;
    text-align: right;
}

.buy-now-modal .buy-now-summary-row.is-total > span:last-child {
    color: #0e7c6b;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.buy-now-modal .buy-now-summary-row.is-discount > span:last-child {
    color: #0e7c6b;
}

.buy-now-modal .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
}

.buy-now-modal .row > [class*="col-"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
}

@media (min-width: 768px) {
    .buy-now-modal .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.buy-now-modal .form-group {
    margin-bottom: 14px;
}

.buy-now-modal .form-group label,
.buy-now-modal label {
    display: block;
    margin-bottom: 6px;
    color: #0b2a2e;
    font-size: 13px;
    font-weight: 600;
}

.buy-now-modal .form-control,
.buy-now-modal select.form-control,
.buy-now-modal textarea.form-control {
    width: 100%;
    height: 46px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d5e0de;
    border-radius: 10px;
    background: #fff;
    color: #0b2a2e;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}

.buy-now-modal textarea.form-control {
    height: auto;
    min-height: 84px;
}

.buy-now-modal .form-control:focus,
.buy-now-modal select.form-control:focus,
.buy-now-modal textarea.form-control:focus {
    border-color: #0e7c6b;
    outline: 3px solid rgba(14, 124, 107, 0.16);
    outline-offset: 0;
}

.buy-now-modal .modal-footer .button_four,
.buy-now-modal .modal-footer .button_one {
    min-width: 148px;
    height: 46px;
    margin: 0;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.buy-now-modal .modal-footer .button_four {
    border: 1px solid #c9d6d4;
    background: #fff;
    color: #0b2a2e;
}

.buy-now-modal .modal-footer .button_four:hover {
    border-color: #0e7c6b;
    color: #0e7c6b;
    background: #f4faf8;
}

.buy-now-modal .modal-footer .button_one,
.buy-now-modal .modal-footer button[type="submit"].button_one {
    border: 0;
    background: #0e7c6b;
    color: #fff;
}

.buy-now-modal .modal-footer .button_one:hover:not(:disabled) {
    background: #0a5c50;
    color: #fff;
}

.buy-now-modal .modal-footer .button_one:disabled {
    background: #c5d5d2;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
}

@media (max-width: 640px) {
    .buy-now-modal .modal-dialog {
        width: calc(100% - 16px);
        height: calc(100dvh - 16px);
        margin: 8px auto;
    }

    .buy-now-modal .modal-header,
    .buy-now-modal .modal-body,
    .buy-now-modal .modal-footer {
        padding-right: 14px;
        padding-left: 14px;
    }

    .buy-now-modal .modal-footer {
        flex-wrap: wrap;
    }

    .buy-now-modal .modal-footer .button_four,
    .buy-now-modal .modal-footer .button_one {
        flex: 1 1 140px;
    }
}
