/* Стилі таблиць теми AltaMedical */

/* Базові стилі таблиць */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

/* Варіанти таблиць */
.table-sm th,
.table-sm td {
    padding: 0.3rem;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody + tbody {
    border: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Кольори фону */
.table-primary,
.table-primary > th,
.table-primary > td {
    background-color: #b8daff;
}

.table-hover .table-primary:hover {
    background-color: #9fcdff;
}

.table-hover .table-primary:hover > td,
.table-hover .table-primary:hover > th {
    background-color: #9fcdff;
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
    background-color: #d6d8db;
}

.table-hover .table-secondary:hover {
    background-color: #c8cbcf;
}

.table-hover .table-secondary:hover > td,
.table-hover .table-secondary:hover > th {
    background-color: #c8cbcf;
}

.table-success,
.table-success > th,
.table-success > td {
    background-color: #c3e6cb;
}

.table-hover .table-success:hover {
    background-color: #b1dfbb;
}

.table-hover .table-success:hover > td,
.table-hover .table-success:hover > th {
    background-color: #b1dfbb;
}

.table-info,
.table-info > th,
.table-info > td {
    background-color: #bee5eb;
}

.table-hover .table-info:hover {
    background-color: #abdde5;
}

.table-hover .table-info:hover > td,
.table-hover .table-info:hover > th {
    background-color: #abdde5;
}

.table-warning,
.table-warning > th,
.table-warning > td {
    background-color: #ffeeba;
}

.table-hover .table-warning:hover {
    background-color: #ffe8a1;
}

.table-hover .table-warning:hover > td,
.table-hover .table-warning:hover > th {
    background-color: #ffe8a1;
}

.table-danger,
.table-danger > th,
.table-danger > td {
    background-color: #f5c6cb;
}

.table-hover .table-danger:hover {
    background-color: #f1b0b7;
}

.table-hover .table-danger:hover > td,
.table-hover .table-danger:hover > th {
    background-color: #f1b0b7;
}

.table-light,
.table-light > th,
.table-light > td {
    background-color: #fdfdfe;
}

.table-hover .table-light:hover {
    background-color: #ececf6;
}

.table-hover .table-light:hover > td,
.table-hover .table-light:hover > th {
    background-color: #ececf6;
}

.table-dark,
.table-dark > th,
.table-dark > td {
    background-color: #c6c8ca;
}

.table-hover .table-dark:hover {
    background-color: #b9bbbe;
}

.table-hover .table-dark:hover > td,
.table-hover .table-dark:hover > th {
    background-color: #b9bbbe;
}

/* Адаптивні таблиці */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table-bordered {
    border: 0;
}

/* Стилі для заголовків таблиць */
.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Стилі для комірок таблиць */
.table td {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Вирівнювання тексту в таблицях */
.table .text-left {
    text-align: left;
}

.table .text-center {
    text-align: center;
}

.table .text-right {
    text-align: right;
}

/* Відступи в таблицях */
.table .p-0 {
    padding: 0 !important;
}

.table .p-1 {
    padding: 0.25rem !important;
}

.table .p-2 {
    padding: 0.5rem !important;
}

.table .p-3 {
    padding: 1rem !important;
}

.table .p-4 {
    padding: 1.5rem !important;
}

.table .p-5 {
    padding: 3rem !important;
}

/* Відступи між комірками */
.table .cell-spacing-0 {
    border-spacing: 0;
}

.table .cell-spacing-1 {
    border-spacing: 0.25rem;
}

.table .cell-spacing-2 {
    border-spacing: 0.5rem;
}

.table .cell-spacing-3 {
    border-spacing: 1rem;
}

.table .cell-spacing-4 {
    border-spacing: 1.5rem;
}

.table .cell-spacing-5 {
    border-spacing: 3rem;
}

/* Відступи між рядками */
.table .row-spacing-0 {
    border-collapse: collapse;
}

.table .row-spacing-1 {
    border-collapse: separate;
    border-spacing: 0 0.25rem;
}

.table .row-spacing-2 {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table .row-spacing-3 {
    border-collapse: separate;
    border-spacing: 0 1rem;
}

.table .row-spacing-4 {
    border-collapse: separate;
    border-spacing: 0 1.5rem;
}

.table .row-spacing-5 {
    border-collapse: separate;
    border-spacing: 0 3rem;
}

/* Відступи між колонками */
.table .col-spacing-0 {
    border-collapse: collapse;
}

.table .col-spacing-1 {
    border-collapse: separate;
    border-spacing: 0.25rem 0;
}

.table .col-spacing-2 {
    border-collapse: separate;
    border-spacing: 0.5rem 0;
}

.table .col-spacing-3 {
    border-collapse: separate;
    border-spacing: 1rem 0;
}

.table .col-spacing-4 {
    border-collapse: separate;
    border-spacing: 1.5rem 0;
}

.table .col-spacing-5 {
    border-collapse: separate;
    border-spacing: 3rem 0;
}

/* Відступи між таблицями */
.table + .table {
    margin-top: 1rem;
}

/* Відступи між заголовком і тілом таблиці */
.table thead + tbody {
    border-top: 2px solid #dee2e6;
}

/* Відступи між тілом і підвалом таблиці */
.table tbody + tfoot {
    border-top: 2px solid #dee2e6;
}

/* Відступи між підвалом і заголовком таблиці */
.table tfoot + thead {
    border-top: 2px solid #dee2e6;
}

/* Відступи між заголовком і підвалом таблиці */
.table thead + tfoot {
    border-top: 2px solid #dee2e6;
}

/* Тіні */
.table .shadow-none {
    box-shadow: none !important;
}

.table .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.table .shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.table .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Радіус */
.table .rounded {
    border-radius: 0.25rem !important;
}

.table .rounded-sm {
    border-radius: 0.2rem !important;
}

.table .rounded-lg {
    border-radius: 0.5rem !important;
}

.table .rounded-circle {
    border-radius: 50% !important;
}

.table .rounded-0 {
    border-radius: 0 !important;
}

/* Підтримка RTL */
[dir="rtl"] .table .text-left {
    text-align: right;
}

[dir="rtl"] .table .text-right {
    text-align: left;
}

[dir="rtl"] .table thead th {
    text-align: right;
}

[dir="rtl"] .table td {
    text-align: right;
}

/* Додаткові стилі */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.075);
}

.table-hover tbody tr:hover td {
    color: #0056b3;
}

.table-hover tbody tr:hover th {
    color: #0056b3;
}

.table-hover tbody tr:hover a {
    color: #0056b3;
}

.table-hover tbody tr:hover button {
    color: #0056b3;
}

.table-hover tbody tr:hover .btn {
    color: #0056b3;
}

.table-hover tbody tr:hover .badge {
    background-color: #0056b3;
}

.table-hover tbody tr:hover .text-muted {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-primary {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-secondary {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-success {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-danger {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-warning {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-info {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-light {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-dark {
    color: #0056b3 !important;
}

.table-hover tbody tr:hover .text-white {
    color: #0056b3 !important;
}

/* Анімації */
.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    transform: translateY(-2px);
}

/* Завантаження */
.table-loading {
    position: relative;
    min-height: 200px;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
} 