/* Forma za naručivanje (legacy sajtovi): zatvoreni koraci sa sažetkom i iznos na dugmetu „Poruči“. */

#details .form-subtitle.order-step-done,
#details .purchase-section.order-step-done {
    position: relative;
}

/* Sažetak ide u novi red naslova (osim kad je u .step-title, kao na Flamboyantu). */
#details .form-subtitle.order-step-done:not(:has(.step-title)) {
    flex-wrap: wrap;
}

#details .order-step-summary,
#details .order-step-edit {
    display: none;
}

#details .order-step-done .order-step-summary {
    display: block;
    flex: 0 0 100%;
    overflow: hidden;
    padding-right: 80px;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #6b6b6b;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#details .order-step-done .order-step-edit {
    display: block;
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
    text-decoration: underline;
}

/* Boja dugmeta „Poruči“ tog sajta (postavlja orderFormSteps.js). */
#details .order-step-done .order-step-num {
    background: var(--order-step-color, #1f9d6b) !important;
    border-color: var(--order-step-color, #1f9d6b) !important;
    color: #fff !important;
}

/* Neki sajtovi imaju dugme fiksne širine; sa iznosom ne sme da bude uže od teksta. */
#completeOrderButton.order-btn-with-total {
    min-width: max-content;
    white-space: nowrap;
}

.order-btn-with-total .order-btn-total {
    margin-left: 10px;
    white-space: nowrap;
}

/* Flamboyant: „Korak 4 od 4“ i dugme su u istom redu; dugme ide u svoj red. */
.product-form-section-footer:has(.order-btn-with-total) {
    flex-wrap: wrap;
}

.product-form-section-footer:has(.order-btn-with-total) .right {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (max-width: 767px) {
    #completeOrderButton.order-btn-with-total {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        float: none;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
        min-height: 48px;
        padding-left: 16px;
        padding-right: 16px;
        margin-left: 0;
        margin-right: 0;
    }

    #completeOrderButton.order-btn-with-total .order-btn-total {
        margin-left: 0;
        font-size: .85em;
    }

    /* Cvjecaraana: dugme je u pola reda pored „Prethodna“; sa iznosom ide u svoj red. */
    #details .col-6:has(> .order-btn-with-total) {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 10px;
    }
}

#details .order-step-done .step-title {
    min-width: 0;
}
