/* Score card styles */

/* Score table layout (Google Doc style) */
.score-table-container {
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.score-table {
    margin-bottom: 0.5rem;
    width: 100%;
    border-collapse: collapse;
}

.score-table-header {
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    vertical-align: middle;
    min-width: 150px;
    border: 1px solid var(--bs-border-color);
}

.score-table-header-label {
    text-align: left;
    padding: 0.75rem 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    vertical-align: middle;
    border: 1px solid var(--bs-border-color);
    background-color: #f8f9fa;
}

.score-table-cell-grey {
    background-color: rgb(243, 243, 243)!important;
}
.score-table-cell-grey-header {
    background-color: rgb(209, 209, 209)!important;
}

.score-table-cell {
    padding: 1rem;
    vertical-align: top;
    border: 1px solid var(--bs-border-color);
    width: 25%;
}

.score-table-cell .score-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.score-table-images {
    padding: 0.75rem;
    text-align: center;
    vertical-align: top;
    border: 1px solid var(--bs-border-color);
    background-color: #fafafa;
}

.score-table-images img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
}

.score-image-item {
    margin-bottom: 0.5rem;
}

.image-caption {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #6c757d;
}

.score-references {
    padding-left: 1rem;
    margin-top: 0.75rem;
}

.reference-item {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #6c757d;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Make table responsive on mobile */
@media (max-width: 767.98px) {
    .score-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .score-table {
        min-width: 400px;
    }

    .score-table-header {
        font-size: 0.9rem;
        padding: 0.5rem 0.35rem;
        min-width: 130px;
    }

    .score-table-cell {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

.score-description {
    color: var(--bs-body-color);
    line-height: 1.5;
}

.score-conditions {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
}

/* Parameter score bar (threshold visualization) */
.parameter-score-bar {
    background: var(--bs-light);
    padding: 1rem;
    border-radius: 0.5rem;
}

.threshold-bar {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
}

.threshold-segment {
    padding: 0.75rem 0.5rem;
    text-align: center;
    min-width: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.threshold-segment:last-child {
    border-right: none;
}

.threshold-label {
    margin-bottom: 0.25rem;
}

.threshold-label strong {
    display: block;
    font-size: 1.25rem;
}

.threshold-label small {
    font-size: 0.75rem;
    opacity: 0.9;
}

.threshold-value {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Subindicator score cards */
.subind-score-card {
    min-height: 100%;
}

.subind-score-mini {
    border-left: 3px solid;
}

/* Aggregation/calculation styles */
.aggregation-explanation {
    margin-bottom: 1.5rem;
}

.calculation-rule {
    transition: transform 0.1s ease;
}

.calculation-rule:hover {
    transform: translateX(2px);
}

.calculation-rule-block .rule-header {
    margin-bottom: 0.5rem;
}

.calculation-rule-block .rule-body {
    padding-left: 1rem;
}

.conditions-group {
    margin-bottom: 0.5rem;
}

.conditions-label {
    font-style: italic;
}

.condition-item {
    padding: 0.25rem 0;
}

.condition-simple {
    line-height: 1.8;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .threshold-bar {
        flex-direction: column;
    }

    .threshold-segment {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .threshold-segment:last-child {
        border-bottom: none;
    }
}

/* Print-specific styles */
@media print {
    .threshold-bar {
        flex-wrap: wrap;
    }
}
