/* Workshop stock allocate add-on (detachable) */

.workshop-cell .ws-allocate-btn,
.ws-board-actions .ws-allocate-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    background: #fff;
}

.workshop-cell .ws-allocate-btn.ws-allocate-pending,
.ws-board-actions .ws-allocate-btn.ws-allocate-pending {
    border-color: #dc3545;
    background: #fff5f5;
    color: #dc3545;
}

.workshop-cell .ws-allocate-btn.ws-allocate-pending:hover,
.ws-board-actions .ws-allocate-btn.ws-allocate-pending:hover {
    background: #dc3545;
    color: #fff;
}

.workshop-cell .ws-allocate-btn.ws-allocate-done,
.ws-board-actions .ws-allocate-btn.ws-allocate-done {
    border-color: #198754;
    background: #f0fff4;
    color: #198754;
}

.workshop-cell .ws-allocate-btn.ws-allocate-done:hover,
.ws-board-actions .ws-allocate-btn.ws-allocate-done:hover {
    background: #198754;
    color: #fff;
}

.ws-allocate-pane-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ws-allocate-pane-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6c757d;
}

.ws-allocate-table tr.ws-allocate-short td {
    background: #fff3cd;
}

.ws-allocate-table tr.ws-allocate-short .ws-stock-available {
    color: #856404;
    font-weight: 700;
}

.ws-allocate-table tr.ws-allocate-done td {
    background: #f0fff4;
}

.ws-allocate-status {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ws-allocate-status-pending {
    color: #856404;
}

.ws-allocate-status-done {
    color: #198754;
}

.ws-allocate-status-nosku {
    color: #adb5bd;
}

.ws-allocate-btn-row {
    padding: 2px 10px;
    font-size: 12px;
    border: 1px solid #0d6efd;
    border-radius: 4px;
    background: #e7f1ff;
    color: #0d6efd;
    cursor: pointer;
}

.ws-allocate-btn-row:hover:not(:disabled) {
    background: #0d6efd;
    color: #fff;
}

.ws-allocate-btn-row:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ws-allocate-btn-row:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ws-allocate-unallocate-btn {
    padding: 2px 10px;
    font-size: 12px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    background: #fff5f5;
    color: #dc3545;
    cursor: pointer;
    margin-left: 8px;
}

.ws-allocate-unallocate-btn:hover:not(:disabled) {
    background: #dc3545;
    color: #fff;
}

.ws-allocate-table tr.ws-allocate-done.ws-allocate-row-clickable {
    cursor: pointer;
}

.ws-allocate-table tr.ws-allocate-done.ws-allocate-row-clickable:hover td {
    background: #e8f5ec;
}

.ws-unallocate-confirm-btn {
    background: #dc3545;
    border-color: #dc3545;
}

.ws-unallocate-confirm-btn:hover:not(:disabled) {
    background: #bb2d3b;
    border-color: #bb2d3b;
}

.ws-allocate-actions {
    white-space: nowrap;
}

.ws-allocate-actions .ws-stock-btn {
    margin-right: 6px;
}

.ws-allocate-all-btn {
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    background: #dc3545;
    color: #fff;
    cursor: pointer;
}

.ws-allocate-all-btn:hover:not(:disabled) {
    background: #bb2d3b;
    border-color: #bb2d3b;
}

.ws-allocate-all-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ws-allocate-error {
    color: #dc3545;
    font-size: 13px;
    margin: 8px 0 0;
}

.ws-allocate-summary {
    font-size: 12px;
    color: #6c757d;
    margin-left: auto;
}

.ws-allocate-table th.ws-stock-allocated-col,
.ws-allocate-table td.ws-stock-allocated-col {
    font-weight: 700;
    text-align: center;
}

/* Allocate Stock modal (Workshop board burger) */
.allocate-stock-modal .modal-content {
    max-width: 720px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.allocate-stock-modal .modal-header {
    flex-shrink: 0;
}

.allocate-stock-modal .modal-body {
    padding: 14px 18px 18px;
    overflow: auto;
    flex: 1 1 auto;
}

.allocate-stock-modal .ws-allocate-pane-modal {
    margin: 0;
}

.allocate-stock-modal .ws-allocate-pane-modal h3 {
    display: none;
}

.row-actions-item.row-actions-item-allocate {
    color: #b45309;
    font-weight: 600;
}

.row-actions-item.row-actions-item-allocate:hover {
    background: #fffbeb;
    color: #92400e;
}

.row-actions-item.row-actions-item-allocate .row-actions-item-label {
    color: inherit;
}
