/* Styles for classification tables in factor subpages */

.intro-text a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

.intro-text a:hover {
    text-decoration: underline;
}

.classification-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-radius: 0;
}

.classification-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fff;
    table-layout: fixed;
    position: relative;
}

.classification-table tbody {
    position: relative;
}

.classification-table tbody tr td {
    height: 240px;
}

.classification-table th,
.classification-table td {
    padding: 1.2rem 0.8rem;
    text-align: left;
    border-bottom: none;
    vertical-align: top;
}

.classification-table th {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

/* Column specific styles */
.col-level {
    width: 17.6%;
    font-weight: 700;
    color: #333;
}

.vertical-bottom {
    vertical-align: bottom;
}

.vertical-bottom .level-badge {
    position: relative;
    top: 19.8rem;
}

.padding-vertical-2rem {
    padding: 2rem 0;
}

.col-spacer {
    width: 6%;
    padding: 0;
    vertical-align: top;
    position: relative;
}

.scale-track {
    position: absolute;
    top: calc(2.1rem + 8px);
    bottom: calc(2.1rem - 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Scale marker: horizontal line with number label above */
.scale-marker {
    width: 36px; /* total line width - extended twice */
    height: 2px;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
    position: relative;
}

.col-factor {
    width: 14%;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    white-space: nowrap;
}

.col-desc {
    width: 35%;
    line-height: 1.6;
    color: #444;
}

.col-examples {
    width: 35%;
    line-height: 1.6;
    color: #555;
    font-style: italic;
}

/* Level badges */
.level-badge {
    display: inline-block;
    width: 143px;
    padding: 0.4rem 0 0.4rem 0;
    border-radius: 0;
    font-size: 1.4rem;
    font-weight: 400;
    text-align: left;
    box-sizing: border-box;
    white-space: nowrap;
    background-color: transparent;
    color: #000;
}

.level-low {
    background-color: #e0e0e0;
    color: #444;
}

.level-medium {
    background-color: #d4edda;
    color: #155724;
}

.level-high {
    background-color: #cce5ff;
    color: #004085;
}

.level-exceptional {
    background-color: #f8d7da;
    color: #721c24;
}

/* Intro text styling */
.intro-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 2rem;
    max-width: 800px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .intro-text {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .classification-table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .classification-table th,
    .classification-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    
    .col-level { width: 16%; }
    .col-spacer { width: 10%; }
    .col-desc { width: 37%; }
    .col-examples { width: 37%; }

    .level-badge {
        min-width: 0;
        padding: 0.2rem;
        font-size: 0.9rem;
        width: 100%;
        white-space: normal;
    }
    
    /* Prevent number wrapping in scale track */
    .scale-track {
        width: 100%;
    }
}
