/**
 * FlowX4 Tables
 * =============
 */

.table-container {
    overflow-x: auto;
    background: var(--color-surface-primary);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.table th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border-default);
    white-space: nowrap;
}

.table td {
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-subtle);
    white-space: nowrap;
}

.table tbody tr:hover {
    background: var(--color-surface-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Disabled rows */
.table tbody tr.row-disabled {
    opacity: 0.5;
}

/* Table Cell Types */
.cell-primary {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.cell-secondary {
    color: var(--color-text-secondary);
}

.cell-mono {
    }

.cell-number {
        text-align: right;
}

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

/* Table Badges */
.cell-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
}

.cell-badge.success {
    color: var(--color-success);
    background: var(--color-success-muted);
}

.cell-badge.warning {
    color: var(--color-warning);
    background: var(--color-warning-muted);
}

.cell-badge.error {
    color: var(--color-error);
    background: var(--color-error-muted);
}

.cell-badge.info {
    color: var(--color-info);
    background: var(--color-info-muted);
}

/* Table Actions */
.cell-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    justify-content: flex-end;
}

.cell-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--color-text-tertiary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.cell-action-btn:hover {
    color: var(--color-text-primary);
    background: var(--color-surface-active);
}

.cell-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Status Icon Toggle */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.status-icon svg {
    width: 18px;
    height: 18px;
}

.status-icon--yes {
    color: var(--color-success);
    background: var(--color-success-muted);
}

.status-icon--no {
    color: var(--color-text-muted);
    background: var(--color-bg-tertiary);
}

.status-icon--toggle {
    cursor: pointer;
}

.status-icon--toggle:hover {
    transform: scale(1.1);
}

.status-icon--toggle.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Table Link */
.table-link {
    color: var(--color-accent-primary);
    transition: color var(--transition-fast);
}

.table-link:hover {
    color: var(--color-accent-primary-hover);
    text-decoration: underline;
}

/* Cell Link (ссылки в ячейках) */
.cell-link {
    color: var(--color-accent-primary);
    transition: color var(--transition-fast);
}

.cell-link:hover {
    color: var(--color-accent-primary-hover);
    text-decoration: underline;
}

/* =============================================================================
   BEM Table Styles (Monitoring Page)
   ============================================================================= */

/* Table Link (BEM) */
.table__link {
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.table__link:hover {
    color: var(--color-accent-primary-hover);
    text-decoration: underline;
}

/* Table Cell Types (BEM) */
.table__cell--exchange {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
}

.table__cell--symbol {
    font-weight: var(--font-weight-medium);
}

.table__cell--price {
    font-family: var(--font-family-mono);
    text-align: right;
}

.table__cell--price-up {
    color: var(--color-success);
}

.table__cell--price-down {
    color: var(--color-error);
}

.table__cell--delta {
    font-family: var(--font-family-mono);
    text-align: right;
    color: var(--color-text-secondary);
}

.table__cell--change {
    font-family: var(--font-family-mono);
    text-align: right;
}

.table__cell--positive {
    color: var(--color-success);
    background: var(--color-success-muted);
}

.table__cell--negative {
    color: var(--color-error);
    background: var(--color-error-muted);
}

.table__cell--volume {
    font-family: var(--font-family-mono);
    text-align: right;
    color: var(--color-text-secondary);
}

.table__cell--time {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
}

/* Trend Cell */
.table__cell--trend {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
}

.table__cell--trend-bullish {
    color: var(--color-success);
}

.table__cell--trend-bearish {
    color: var(--color-error);
}

.table__cell--trend-neutral {
    color: var(--color-text-muted);
}

/* Zone Cell */
.table__cell--zone {
    font-family: var(--font-family-mono);
    text-align: center;
}

.table__cell--zone-high {
    color: var(--color-warning);
    font-weight: var(--font-weight-semibold);
}

.table__cell--zone-medium {
    color: var(--color-info);
}

.table__cell--zone-none {
    color: var(--color-text-muted);
}
