/* Стили для таблиц на фронтенде */

/* Адаптивная обертка */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
}

/* Базовые стили таблицы */
.acf-table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 1rem;
}

/* Ячейки */
.acf-table th,
.acf-table td {
    padding: 0.75rem;
    vertical-align: top;
    text-align: left;
}

/* Заголовки */
.acf-table thead th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

.acf-table tbody th {
    font-weight: 600;
    background-color: #f8f9fa;
    color: #495057;
}

/* Границы */
.acf-table.table-bordered {
    border: 1px solid #dee2e6;
}

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

/* Полосатые строки */
.acf-table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Hover эффект */
.acf-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s ease;
}

/* Форматирование текста */
.acf-table strong,
.acf-table b {
    font-weight: 700;
}

.acf-table em,
.acf-table i {
    font-style: italic;
}

.acf-table u {
    text-decoration: underline;
}

.acf-table s,
.acf-table strike {
    text-decoration: line-through;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .acf-table {
        font-size: 0.875rem;
    }

    .acf-table th,
    .acf-table td {
        padding: 0.5rem;
    }
}

/* Альтернативный стиль - карточки на мобильных */
@media (max-width: 576px) {
    .acf-table.table-cards {
        display: block;
    }

    .acf-table.table-cards thead {
        display: none;
    }

    .acf-table.table-cards tbody,
    .acf-table.table-cards tr,
    .acf-table.table-cards td {
        display: block;
        width: 100%;
    }

    .acf-table.table-cards tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        padding: 0.5rem;
    }

    .acf-table.table-cards td {
        border: none;
        position: relative;
        padding-left: 40%;
        text-align: right;
    }

    .acf-table.table-cards td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 35%;
        font-weight: 600;
        text-align: left;
    }
}

/* Темная тема (опционально) */
.dark-theme .acf-table {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.dark-theme .acf-table thead th,
.dark-theme .acf-table tbody th {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-color: #3a3a3a;
}

.dark-theme .acf-table.table-bordered th,
.dark-theme .acf-table.table-bordered td {
    border-color: #3a3a3a;
}

.dark-theme .acf-table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

.dark-theme .acf-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

