/**
 * Label Print Button Styles
 * Styling for print buttons next to serial numbers
 */

/* Let TD behave as normal table cell - will match height of other cells */
.serial-number-cell {
    text-align: center;
}

/* Inner wrapper div for flex layout */
.serial-number-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.serial-number-text {
    flex: 0 0 auto;
}

.print-label-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.print-label-btn:hover {
    opacity: 1;
    background-color: #e9ecef;
    border-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.print-label-btn:active {
    transform: scale(0.95);
    background-color: #dee2e6;
}

.print-label-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.print-label-btn svg {
    display: block;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .print-label-btn {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e9ecef;
    }
    
    .print-label-btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .print-label-btn:active {
        background-color: rgba(255, 255, 255, 0.2);
    }
}

/* Ensure serial number column has enough width and proper cell sizing */
#productsTable th:nth-child(3),
#productsTable td:nth-child(3) {
    min-width: 180px;
}

/* Batch print button styling - matches Add/Remove button size */
.batch-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;  /* Match Add/Remove button padding - 32px height */
    background: #2d8998;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    height: 32px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.batch-print-btn:hover:not(:disabled) {
    background: #246b78;
    transform: translateY(-1px);
}

.batch-print-btn:active:not(:disabled) {
    transform: translateY(0);
}

.batch-print-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.batch-print-btn svg {
    flex-shrink: 0;
}

.batch-print-btn .batch-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 20px;
    text-align: center;
}

/* Dark mode support for batch button */
@media (prefers-color-scheme: dark) {
    .batch-print-btn {
        background: #2d8998;
    }
    
    .batch-print-btn:hover:not(:disabled) {
        background: #3a9fb0;
    }
    
    .batch-print-btn .batch-count {
        background: rgba(0, 0, 0, 0.3);
    }
}

