﻿
/* General styling */
.card {
    border-radius: 0.35rem;
    border: 1px solid rgba(0,0,0,.125);
}

.card-header {
    border-radius: calc(0.35rem - 1px) calc(0.35rem - 1px) 0 0;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-matched {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-partiallymatched {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-notmatched {
    border-left: 0.25rem solid #e74a3b !important;
}

.border-none {
    border: none;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

/* Status styling */
.scan-status-bar {
    position: relative;
}

.bg-success {
    background-color: #1d9300 !important;
}

.bg-warning {
    background-color: #f6c23e !important;
}

.bg-danger {
    background-color: #d90200 !important;
}

/* Code display */
.code-display {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
}

/* Table styling */
.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.075);
}

/* Force left alignment for table headers */
.barcode-column .table th {
    text-align: left;
}

/* Barcode cards responsive layout */
.barcode-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.barcode-column {
    display: flex;
    width: 100%;
    margin-bottom: 1.5rem;
}

.barcode-column .card {
    width: 100%;
}

.barcode-cell {
    word-break: break-all;
    word-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
}

/* Definition list styling for small screens */
dl.row {
    display: block;
}

dl.row dt,
dl.row dd {
    display: inline;
    width: auto;
    margin-left: 0;
}

dl.row dt {
    font-weight: bold;
}

dl.row dt:after {
    content: ": ";
}

dl.row dd:after {
    content: "";
    display: block;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .scan-status-bar {
        padding: 0.75rem !important;
    }

    .scan-status-bar i {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 768px) {
    .barcode-table {
        table-layout: fixed;
        width: 100%;
    }

    .barcode-table th,
    .barcode-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .barcode-table tr {
        margin-bottom: 1rem;
        display: block;
    }
}

/* Ensure equal heights for both barcode cards */
@media (min-width: 992px) {
    .barcode-row {
        flex-direction: row;
        flex-wrap: nowrap;
        margin-left: 0;
        margin-right: 0;
    }

    .barcode-column {
        width: 50%;
        padding-right: 10px;
        margin-bottom: 0;
    }

    .barcode-column:last-child {
        padding-right: 0;
        padding-left: 10px;
    }
}
