/* Pickup queue — shared tid lists for org stores (Phase 4.4) */

body.pickup-queue-page {
    background: #fff;
}

.pickup-queue-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: var(--page-padding-top, 100px);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 3rem;
}

.pq-access-gate {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border: 2px solid #f9d71c;
    border-radius: 10px;
    background: #fff;
    color: #444;
}

.pq-org-label {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: #555;
    font-weight: 600;
}

.pq-items-cell {
    min-width: 180px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.pq-actions-cell {
    min-width: 150px;
    white-space: nowrap;
}

.pq-action-btn {
    margin-right: 0.35rem;
    margin-bottom: 0.25rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
}

.pq-muted {
    color: #777;
}

.pq-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #fff8e1;
    color: #8a6d00;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}

.pq-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pq-status--shared { background: #e3f2fd; color: #1565c0; }
.pq-status--preparing { background: #fff3e0; color: #ef6c00; }
.pq-status--ready { background: #e8f5e9; color: #2e7d32; }
.pq-status--picked-up { background: #f3e5f5; color: #6a1b9a; }
.pq-status--completed { background: #eceff1; color: #455a64; }
.pq-status--customer { background: #e8eaf6; color: #3949ab; }

.pq-empty-state {
    margin-top: 1rem;
    padding: 1.25rem;
    text-align: center;
    color: #666;
    border: 1px dashed #ddd;
    border-radius: 8px;
}

.pq-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.pq-results-toolbar .btn {
    padding: 0.45rem 0.85rem;
}

/* Table — scoped layout (avoid global .transaction-table 25px col-1) */
.pickup-queue-page .pq-table-wrap {
    overflow-x: auto;
    max-height: min(70vh, 720px);
    overflow-y: auto;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
}

.pickup-queue-page .pq-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 0;
}

.pickup-queue-page .pq-table th,
.pickup-queue-page .pq-table td {
    border: 1px solid #e8e8e8;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    height: auto;
    min-height: 44px;
}

.pickup-queue-page .pq-table th {
    background: #17a2b8;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.pickup-queue-page .pq-table th:nth-child(1),
.pickup-queue-page .pq-table td:nth-child(1) {
    width: 6.5rem;
    min-width: 6.5rem;
    white-space: nowrap;
}

.pickup-queue-page .pq-table th:nth-child(2),
.pickup-queue-page .pq-table td:nth-child(2) {
    min-width: 11rem;
    max-width: 14rem;
}

.pickup-queue-page .pq-table th:nth-child(3),
.pickup-queue-page .pq-table td:nth-child(3),
.pickup-queue-page .pq-table th:nth-child(4),
.pickup-queue-page .pq-table td:nth-child(4) {
    min-width: 7.5rem;
    white-space: nowrap;
}

.pickup-queue-page .pq-table th:nth-child(5),
.pickup-queue-page .pq-table td:nth-child(5) {
    min-width: 3.5rem;
    white-space: nowrap;
    text-align: center;
}

.pickup-queue-page .pq-table th:nth-child(6),
.pickup-queue-page .pq-table td:nth-child(6),
.pickup-queue-page .pq-table th:nth-child(7),
.pickup-queue-page .pq-table td:nth-child(7) {
    min-width: 4.5rem;
    white-space: nowrap;
}

.pickup-queue-page .pq-table th:nth-child(8),
.pickup-queue-page .pq-table td:nth-child(8) {
    min-width: 10rem;
    white-space: nowrap;
}

.pickup-queue-page .pq-table th:nth-child(9),
.pickup-queue-page .pq-table td:nth-child(9) {
    min-width: 12rem;
}

.pickup-queue-page .pq-table th:nth-child(10),
.pickup-queue-page .pq-table td:nth-child(10) {
    min-width: 8.5rem;
    white-space: nowrap;
}

.pq-mode-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #f3e5f5;
    color: #6a1b9a;
}

#pqPrepModeModal {
    z-index: 6000;
}

.pq-prep-modal-content {
    max-width: 32rem;
    border: 2px solid #f9d71c;
    border-radius: 12px;
}

.pq-prep-modal-content h3 {
    margin: 0 0 0.5rem;
}

.pq-prep-modal-lead {
    margin: 0 0 1rem;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.45;
}

.pq-prep-mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pq-prep-mode-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: left;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pq-prep-mode-card:hover:not(:disabled) {
    border-color: #f9d71c;
    background: #fffef5;
}

.pq-prep-mode-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pq-prep-mode-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.pq-prep-mode-hint {
    font-size: 0.82rem;
    color: #666;
    font-weight: 400;
}

.pq-prep-modal-error {
    margin: 0.75rem 0 0;
    color: #c62828;
    font-size: 0.88rem;
    min-height: 1.1rem;
}

.pq-action-link {
    display: inline-block;
    margin-right: 0.35rem;
    margin-bottom: 0.25rem;
    text-decoration: none;
}

/* Action buttons — visible on white table background */
.pickup-queue-page .pq-action-btn.btn-secondary,
.pickup-queue-page .pq-results-toolbar .btn-secondary,
.pickup-queue-page .ds-filter-actions .btn-secondary {
    background: #fff;
    color: #333;
    border: 2px solid #f9d71c;
    font-weight: 600;
}

.pickup-queue-page .pq-action-btn.btn-secondary:hover:not(:disabled),
.pickup-queue-page .pq-results-toolbar .btn-secondary:hover:not(:disabled),
.pickup-queue-page .ds-filter-actions .btn-secondary:hover:not(:disabled) {
    background: #f9d71c;
    color: #222;
    border-color: #e6c200;
}

.pq-pick-progress {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    white-space: nowrap;
}

.pq-pick-progress--complete {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}
