:root {
    --rd-modal-overlay: rgba(0, 0, 0, 0.8);
    --rd-modal-primary: rgb(27, 27, 77);
    --rd-modal-secondary: rgb(51, 103, 164);
    --rd-modal-accent: rgb(237, 31, 1);
    --rd-modal-accent-hover: rgb(182, 24, 1);
    --rd-modal-gray: rgba(145, 145, 145, 0.5);
    --rd-modal-gradient: linear-gradient(180.00deg, var(--rd-modal-secondary), var(--rd-modal-primary) 100%);
}

/*rd-modal--light - застосовує світлу тему (додати до елементу .rd-modal)*/

/*Dark theme (as default)*/
.rd-modal {
    z-index: 999;
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--rd-modal-overlay);
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all .25s;
}

.rd-modal.open {
    opacity: 1;
    visibility: visible;
}

.rd-modal .rd-order {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 98vh;
    padding: 55px 18px 30px;
}

.rd-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.rd-modal__close::before,
.rd-modal__close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 4px;
    background-color: white;
    transform-origin: center;
}

.rd-modal__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.rd-modal__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/*Light theme*/
.rd-modal--light .rd-order {
    background: white;
}

.rd-modal--light .rd-modal__close::before,
.rd-modal--light .rd-modal__close::after {
    background: var(--rd-modal-primary);
}

.rd-modal--light .rd-order__message {
    color: var(--rd-modal-primary);
}

.rd-modal--light .rd-form__button {
    color: white;
    background: var(--rd-modal-accent);
}

.rd-modal--light .rd-form__button:hover {
    background: var(--rd-modal-accent-hover);
}

.rd-modal--light .rd-price__title {
    color: var(--rd-modal-primary);
}

.rd-modal--light .rd-price__value {
    color: var(--rd-modal-primary);
}

.rd-modal--light .rd-price__title--old, .rd-modal--light .rd-price__value--old {
    color: var(--rd-modal-gray);
}

.rd-modal--light .rd-price__line {
    background: var(--rd-modal-gray);
}

.rd-modal--light .rd-form__input {
    border: 1px solid var(--rd-modal-primary);
}