.status-box {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-dark);
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-bar--pickup::before {
    /* Для PICKUP можно настроить, если нужно */
}

/* Динамическая ширина шагов */
.progress-bar {
    /* По умолчанию 4 шага (DELIVERY) */
}

.progress-bar--pickup .progress-step {
    flex: 1 0 33.33%; /* 3 шага для PICKUP */
}

.progress-bar:not(.progress-bar--pickup) .progress-step {
    flex: 1 0 25%; /* 4 шага для DELIVERY */
}

/* Альтернатива с :has() для современных браузеров */
@supports (selector(:has(*))) {
    .progress-bar:has(.progress-step:nth-child(3):last-child) .progress-step {
        flex: 1 0 33.33%; /* 3 шага */
    }
    .progress-bar:has(.progress-step:nth-child(4)) .progress-step {
        flex: 1 0 25%; /* 4 шага */
    }
}

.progress-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.progress-step i {
    font-size: 1.5rem;
    color: #ccc;
    background: #fff;
    padding: 0.5rem;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.progress-step.completed i {
    color: var(--success);
    border-color: var(--success);
}

.progress-step.active i {
    color: var(--primary);
    border-color: var(--primary);
}

.progress-step.cancelled {
    color: var(--error);
}
.progress-step.cancelled i {
    color: var(--error);
}

.progress-step#step-cancelled {
    display: none;
}
.progress-step#step-cancelled.completed.active.cancelled {
    display: block;
}

.progress-step span {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.status-message {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.status-message i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    margin-top: 1.5rem;
    transition: background var(--transition-medium);
}

.btn-back:hover {
    background: var(--primary-dark);
}

.btn-back i {
    margin-right: 0.5rem;
}

body .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    z-index: 1001;
    box-shadow: var(--shadow);
    max-width: 400px;
    max-height: 150px;
    overflow-y: auto;
    background: #fff !important;
    border-left: 4px solid;
    animation: slideInRight 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-dark);
}

body .notification.success {
    border-left-color: #27ae60;
}

body .notification.error {
    border-left-color: #c0392b;
}

body .notification.warning {
    border-left-color: var(--warning);
}

body .notification-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-dark);
}

body .notification-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-dark);
}

body .notification-close:hover {
    color: var(--primary);
}

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(100%); }
}

body .notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Адаптивные стили для модального окна статуса */
@media (max-width: 768px) {
    .status-box {
        padding: 1.5rem;
        margin: 1rem auto;
    }

    .status-title {
        font-size: 1.5rem;
    }

    .progress-bar {
        margin: 1.5rem 0;
    }

    .progress-step i {
        font-size: 1.2rem;
        padding: 0.4rem;
    }

    .progress-step span {
        font-size: 0.8rem;
    }

    .status-message {
        font-size: 0.9rem;
    }

    body .notification {
        max-width: 90%;
        right: 10px;
        top: 10px;
    }
}

@media (max-width: 580px) {
    .progress-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .progress-bar::before {
        display: none;
    }

    .progress-bar--pickup .progress-step,
    .progress-bar:not(.progress-bar--pickup) .progress-step {
        flex: none; /* Отменяем flex для вертикального режима */
    }

    .progress-step {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-align: left;
    }

    .progress-step:not(:last-child)::before {
        content: '';
        position: absolute;
        left: 1.2rem;
        top: 2.5rem;
        height: calc(100% + 1rem);
        width: 4px;
        background: #e0e0e0;
        z-index: 0;
    }
    .progress-step.completed:not(:last-child)::before {
        background: var(--success);
    }

    .progress-step i {
        font-size: 1rem;
    }

    .progress-step span {
        font-size: 0.85rem;
    }

    .status-box {
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-confirm,
    .modal-cancel {
        width: 100%;
        padding: 10px;
    }

    body .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* =============================================
   Блок 3: Позиции заказа со скидками
   ============================================= */

.order-items-list {
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    gap: 8px;
}

.order-item-row--discounted {
    background: #fff8e1;
    padding: 6px 8px;
    border-radius: var(--border-radius-sm);
    margin: 2px 0;
}

.order-item-name {
    flex: 1;
    color: var(--secondary);
}

.order-item-price {
    white-space: nowrap;
    text-align: right;
    font-weight: 600;
}

.order-item-price--old {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    margin-right: 6px;
}

.order-item-price--new {
    color: var(--success);
    font-weight: 700;
}

.order-item-discount-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.status-message--discount {
    color: var(--success);
}

.status-message--discount span {
    font-weight: 700;
}
