/* Корзина массового редактирования - плавающая панель и модальные окна */

.basket-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 95vw;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform: translateX(0);
}

.basket-panel.basket-panel-hidden {
    transform: translateX(100%);
}

.basket-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #f8f9fa;
}

.basket-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.basket-header .btn-close {
    padding: 0.25rem;
    font-size: 1.25rem;
}

.basket-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.basket-counter {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #495057;
}

.basket-items-list .basket-item-row {
    padding: 0.35rem 0;
    border-bottom: 1px solid #eee;
}

.basket-items-list .basket-item-row:last-child {
    border-bottom: none;
}

.basket-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    background: #fff;
}

.basket-footer .btn-block {
    width: 100%;
}

/* Режим корзины активен - индикатор на странице */
body.basket-mode-active #root {
    outline: 2px solid rgba(40, 167, 69, 0.4);
    outline-offset: -2px;
}

body.basket-mode-active .basket-panel {
    transform: translateX(0);
}

/* Кнопка "Добавить в корзину" в панели действий */
#basket-add-selected {
    display: none;
}

/* Модальное окно просмотра корзины */
#basket-view-modal .modal-dialog {
    max-width: 800px;
}

#basket-view-modal .table th,
#basket-view-modal .table td {
    vertical-align: middle;
}

#basket-view-modal .basket-remove-pos {
    padding: 0.2rem 0.5rem;
    font-size: 0.875rem;
}

/* Модальное окно массового редактирования */
#basket-edit-modal .modal-dialog {
    max-width: 560px;
}

#basket-edit-modal .basket-edit-field-group {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background: #fafafa;
}

#basket-edit-modal .basket-edit-field-group label {
    margin-bottom: 0.35rem;
    font-weight: 500;
}

#basket-edit-modal .basket-edit-current {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

#basket-edit-modal .form-control,
#basket-edit-modal .custom-select {
    margin-top: 0.25rem;
}

#basket-edit-modal .basket-edit-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Кнопка переключения режима корзины в шапке */
#basket-mode-toggle {
    white-space: nowrap;
}

#basket-mode-toggle.basket-mode-on {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

#basket-mode-toggle.basket-mode-on:hover {
    background: #218838;
    border-color: #1e7e34;
    color: #fff;
}
