#qo-overlay,
#qo-overlay * {
    box-sizing: border-box;
}

#qo-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 25, 30, .65);
    font-family: Arial, Helvetica, sans-serif;
}

#qo-overlay.qo-open {
    display: flex;
}

.qo-modal {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: 94vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 15px 60px rgba(0,0,0,.25);
    color: #333;
}

.qo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

.qo-title {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    color: #333;
}

.qo-product-name {
    margin-top: 6px;
    color: #777;
    font-size: 14px;
    line-height: 1.4;
}

.qo-close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #555;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.qo-section {
    margin-top: 23px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.qo-section-title {
    margin: 0 0 13px;
    font-size: 17px;
    font-weight: 700;
    color: #333;
}

.qo-section-subtitle {
    margin: -6px 0 12px;
    font-size: 12px;
    color: #888;
}

.qo-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.qo-field {
    width: 100%;
    min-width: 0;
}

.qo-field-full {
    grid-column: 1 / -1;
}

.qo-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.qo-input,
.qo-textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 12px 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 14px;
}

.qo-input:focus,
.qo-textarea:focus {
    border-color: #2995dc;
    box-shadow: 0 0 0 2px rgba(41,149,220,.12);
}

.qo-textarea {
    min-height: 75px;
    resize: vertical;
}

.qo-choice-list {
    display: grid;
    gap: 9px;
}

.qo-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 55px;
    padding: 12px 14px;
    border: 1px solid #e1e1e1;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.qo-choice:hover {
    border-color: #a9cfe8;
}

.qo-choice.qo-selected {
    border: 2px solid #2995dc;
    padding: 11px 13px;
    background: #f7fbff;
}

.qo-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qo-radio {
    display: flex;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    border: 2px solid #c7c7c7;
    border-radius: 50%;
}

.qo-selected .qo-radio {
    border-color: #2995dc;
}

.qo-selected .qo-radio:after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2995dc;
}

.qo-choice-main {
    flex: 1;
    min-width: 0;
}

.qo-choice-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #333;
}

.qo-choice-note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #777;
}

.qo-choice-price {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.qo-carrier-logo {
    display: flex;
    flex: 0 0 38px;
    width: 38px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f1f3f5;
    color: #333;
    font-size: 12px;
    font-weight: 800;
}

.qo-carrier-np {
    background: #e8f3ff;
    color: #1769aa;
}

.qo-carrier-rozetka {
    background: #e9f7e8;
    color: #399b32;
}

.qo-carrier-ukr {
    background: #fff3df;
    color: #b66d00;
}

.qo-carrier-pickup {
    background: #f0edf9;
    color: #6951a0;
}

.qo-delivery-address {
    display: none;
    margin-top: 10px;
    padding: 15px;
    border-radius: 9px;
    background: #f5f7f9;
    border: 1px solid #e7eaed;
}

.qo-delivery-address.qo-visible {
    display: block;
    animation: qo-appear .2s ease;
}

.qo-address-title {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 700;
}

.qo-address-hint {
    margin-bottom: 10px;
    color: #777;
    font-size: 12px;
    line-height: 1.4;
}

@keyframes qo-appear {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.qo-option-group {
    margin-bottom: 15px;
}

.qo-option-group:last-child {
    margin-bottom: 0;
}

.qo-option-group-title {
    margin: 0 0 9px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
}

.qo-empty-options {
    padding: 12px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
}

.qo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 17px 0;
    border-top: 1px solid #eee;
}

.qo-total-label {
    font-size: 17px;
    font-weight: 700;
}

.qo-total-price {
    font-size: 25px;
    font-weight: 700;
    color: #23884c;
    white-space: nowrap;
}

.qo-submit {
    display: block;
    width: 100%;
    min-height: 52px;
    margin-top: 5px;
    border: 0;
    border-radius: 9px;
    background: #218b50;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}

.qo-submit:hover {
    background: #176f3e;
}

.qo-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.qo-message {
    display: none;
    margin-top: 13px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.qo-message.qo-success {
    display: block;
    background: #eaf7ee;
    color: #24713c;
}

.qo-message.qo-error {
    display: block;
    background: #fff0f0;
    color: #b52b2b;
}

.qo-required {
    color: #d33;
}

@media (max-width: 600px) {
    #qo-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .qo-modal {
        width: 100%;
        max-width: none;
        max-height: 96vh;
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
        border-radius: 16px 16px 0 0;
    }

    .qo-title {
        font-size: 21px;
    }

    .qo-section {
        margin-top: 19px;
        padding-top: 17px;
    }

    .qo-section-title {
        font-size: 16px;
    }

    .qo-fields {
        grid-template-columns: 1fr;
    }

    .qo-field-full {
        grid-column: auto;
    }

    .qo-choice {
        padding: 11px;
    }

    .qo-choice.qo-selected {
        padding: 10px;
    }

    .qo-total-price {
        font-size: 22px;
    }
}
/* Окно благодарности после успешного заказа */

#qo-thankyou,
#qo-thankyou * {
    box-sizing: border-box;
}

.qo-thankyou {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 25, 30, .65);
    font-family: Arial, Helvetica, sans-serif;
}

.qo-thankyou.qo-thankyou-visible {
    display: flex;
    animation: qo-appear .2s ease;
}

.qo-thankyou-box {
    width: 100%;
    max-width: 430px;
    padding: 35px 25px;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    box-shadow: 0 15px 60px rgba(0,0,0,.25);
}

.qo-thankyou-icon {
    display: flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #e8f7ed;
    color: #218b50;
    font-size: 36px;
    font-weight: 700;
}

.qo-thankyou-title {
    margin-bottom: 12px;
    color: #218b50;
    font-size: 23px;
    font-weight: 700;
}

.qo-thankyou-text {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.qo-thankyou-button {
    width: 100%;
    min-height: 48px;
    margin-top: 24px;
    border: 0;
    border-radius: 8px;
    background: #218b50;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.qo-thankyou-button:hover {
    background: #176f3e;
}