/* File: docs/assets/css/config-tables.css */
/* Configuration options table styling for Smoothieware documentation */

/* Main table styling */
.config-options-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.config-options-table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.config-options-table th {
    padding: 12px 15px;
    font-size: 0.95em;
}

.config-options-table th:nth-child(1),
.config-options-table th:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-options-table tbody tr {
    border-bottom: 1px solid #2a2a2a;
    background: #1a1a1a;
}

.config-options-table tbody tr:nth-of-type(even) {
    background: #222222;
}

.config-options-table tbody tr:hover {
    background: #2a2a2a;
}

.config-options-table td {
    padding: 10px 15px;
    vertical-align: top;
}

.config-options-table td:nth-child(1),
.config-options-table td:nth-child(2) {
    width: 25%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-options-table td:nth-child(3) {
    width: 50%;
}

/* Empty cell styling (for v1-only or v2-only settings) */
.config-options-table .empty-cell {
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Description cell - truncation with expand feature */
.config-options-table .description-cell {
    color: #bbb;
    font-size: 0.85em;
    line-height: 1.4;
    position: relative;
    max-height: 4.2em;  /* ~3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Expand indicator (+ icon) - shown via JavaScript when content overflows */
.config-options-table .description-cell.has-overflow::after {
    content: '+';
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(to left, #1a1a1a 60%, transparent);
    padding: 0 8px 0 20px;
    cursor: pointer;
    color: #667eea;
    font-weight: bold;
}

/* Handle even row background for overflow indicator */
.config-options-table tbody tr:nth-of-type(even) .description-cell.has-overflow::after {
    background: linear-gradient(to left, #222222 60%, transparent);
}

/* Expanded state */
.config-options-table .description-cell.expanded {
    max-height: none;
    overflow: visible;
}

.config-options-table .description-cell.expanded::after {
    content: '-';
}

/* Setting tags inside table cells */
.config-options-table td setting {
    margin: 0;
}

/* Module header row styling (for grouped tables) */
.config-options-table .module-header {
    background: linear-gradient(135deg, #3a3a5c 0%, #4a4a6c 100%);
    color: #fff;
    font-weight: bold;
    font-size: 1.1em;
    padding: 12px 15px;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .config-options-table {
        font-size: 0.8em;
    }

    .config-options-table th,
    .config-options-table td {
        padding: 8px 10px;
    }

    .config-options-table td:nth-child(1),
    .config-options-table td:nth-child(2) {
        width: 30%;
    }

    .config-options-table td:nth-child(3) {
        width: 40%;
    }
}
