/* Main Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Table Styles */
.table {
    margin-top: 20px;
}

.table th {
    background-color: #343a40;
    color: white;
}

/* Button Styles */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Alert Messages */
.alert {
    margin-top: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* Supplier Table Specific Styles */
.details-row {
    display: none;
}

.table-hover tr:hover+.details-row,
.details-row:hover {
    display: table-row;
}

.bg-purple {
    background-color: #6f42c1;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
}

.table td,
.table th {
    white-space: nowrap;
}

/* Product specific styles - matches supplier styling */
.card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1rem 1.25rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.btn-group .btn {
    border-radius: 0.25rem;
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Price formatting */
.text-end {
    text-align: right !important;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }

    .table thead {
        display: none;
    }

    .table tr {
        margin-bottom: 1rem;
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }

    .table td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #dee2e6;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: calc(50% - 1rem);
        padding-right: 1rem;
        text-align: left;
        font-weight: bold;
    }

    .btn-group {
        justify-content: flex-end;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    table {
        width: 100%;
    }

    .btn-group {
        display: none;
    }
}

/* Product specific styles - matches supplier styling */
.card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1rem 1.25rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.btn-group .btn {
    border-radius: 0.25rem;
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Price formatting */
.text-end {
    text-align: right !important;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }

    .table thead {
        display: none;
    }

    .table tr {
        margin-bottom: 1rem;
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }

    .table td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #dee2e6;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: calc(50% - 1rem);
        padding-right: 1rem;
        text-align: left;
        font-weight: bold;
    }

    .btn-group {
        justify-content: flex-end;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    table {
        width: 100%;
    }

    .btn-group {
        display: none;
    }
}
/* Table container with horizontal scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    overflow-y: hidden;
    width: 100%;
    position: relative;
}

/* Make the table take full width */
.table-responsive table {
    width: 100%;
    min-width: 1200px;
    /* Adjust based on your content */
    margin-bottom: 0;
}

/* Sticky first column (optional) */
.table-responsive table thead th:first-child,
.table-responsive table tbody td:first-child {
    position: sticky;
    left: 0;
    background-color: #f8f9fa;
    /* Match your table background */
    z-index: 1;
}

/* Sticky header */
.table-responsive table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Add shadow to indicate scrollable area */
.table-responsive:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}