[data-main-workspace~="test"][hidden] {
    display: none;
}

.test-workspace {
    display: grid;
    gap: 22px;
}

.test-workspace-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.test-path-library-card,
.test-path-detail-card,
.test-battle-analysis-card,
.test-screenshot-card {
    min-width: 0;
    min-height: 0;
}

.test-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.test-section-heading h2,
.test-section-heading p {
    margin: 0;
}

.test-section-heading p {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

.test-path-status,
.test-empty-message {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
}

.test-path-status.error {
    color: #fca5a5;
}

.test-path-list {
    display: grid;
    gap: 10px;
    max-height: 620px;
    margin-top: 14px;
    overflow-y: auto;
}

.test-path-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.test-path-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.58);
    color: #e5e7eb;
    text-align: left;
}

.test-path-item:hover,
.test-path-item:focus-visible {
    border-color: rgba(96, 165, 250, 0.72);
    background: rgba(30, 41, 59, 0.86);
}

.test-path-item.active {
    border-color: #60a5fa;
    background: rgba(37, 99, 235, 0.18);
}

.test-path-item strong,
.test-path-item span,
.test-path-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.test-path-item strong {
    font-size: 14px;
}

.test-path-item span {
    color: #cbd5e1;
    font-size: 13px;
}

.test-path-item small {
    color: #94a3b8;
    font-size: 11px;
}

.test-path-delete-button {
    align-self: stretch;
    min-width: 42px;
    padding: 0 10px;
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(127, 29, 29, 0.14);
    color: #fecaca;
}

.test-path-delete-button:hover,
.test-path-delete-button:focus-visible {
    background: rgba(127, 29, 29, 0.24);
}

.test-path-detail > .record-detail {
    padding: 0;
}

.test-result-card-host {
    display: grid;
    min-width: 0;
}

.test-result-card-host:empty {
    display: none;
}

.test-result-card-host > .result-card {
    grid-column: auto;
    margin: 0;
}

.test-battle-analysis-card.battle-analysis-modal {
    width: 100%;
    max-height: none;
    margin: 0;
}

.test-battle-analysis-card .modal-header {
    border-bottom: 1px solid rgba(173, 137, 65, 0.38);
}

.test-battle-analysis-card .modal-body {
    max-height: none;
}

.test-battle-analysis-card .battle-analysis-panel[hidden] {
    display: none;
}

.test-battle-analysis-card .result-table tbody {
    max-height: 560px;
}

#testBattleAnalysisSummaryPanel .result-table th:nth-child(1),
#testBattleAnalysisSummaryPanel .result-table td:nth-child(1) {
    width: 36%;
}

#testBattleAnalysisSummaryPanel .result-table th:nth-child(2),
#testBattleAnalysisSummaryPanel .result-table td:nth-child(2) {
    width: 24%;
}

#testBattleAnalysisSummaryPanel .result-table th:nth-child(3),
#testBattleAnalysisSummaryPanel .result-table td:nth-child(3) {
    width: 20%;
}

#testBattleAnalysisSummaryPanel .result-table th:nth-child(4),
#testBattleAnalysisSummaryPanel .result-table td:nth-child(4) {
    width: 20%;
}

#testBattleAnalysisSkillPanel .result-table th:nth-child(1),
#testBattleAnalysisSkillPanel .result-table td:nth-child(1) {
    width: 25%;
}

#testBattleAnalysisSkillPanel .result-table th:nth-child(2),
#testBattleAnalysisSkillPanel .result-table td:nth-child(2) {
    width: 24%;
}

#testBattleAnalysisSkillPanel .result-table th:nth-child(3),
#testBattleAnalysisSkillPanel .result-table td:nth-child(3) {
    width: 33%;
}

#testBattleAnalysisSkillPanel .result-table th:nth-child(4),
#testBattleAnalysisSkillPanel .result-table td:nth-child(4) {
    width: 18%;
}

.test-screenshot-preview {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
}

.test-screenshot-preview[hidden] {
    display: none;
}

.test-screenshot-preview img {
    display: block;
    width: 100%;
    max-height: 900px;
    object-fit: contain;
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 8px;
    background: #020617;
}

.test-screenshot-preview figcaption {
    color: #cbd5e1;
    font-size: 13px;
}

.test-screenshot-dropzone {
    min-height: 132px;
    margin-bottom: 14px;
}

.test-screenshot-dropzone[aria-disabled="true"] {
    cursor: wait;
    opacity: 0.62;
}

.test-screenshot-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 320px));
    gap: 12px;
    margin: 0 0 14px;
}

.test-screenshot-settings > label {
    display: grid;
    gap: 7px;
    color: #cbd5e1;
    font-size: 13px;
}

.test-screenshot-time-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-screenshot-time-input input {
    width: 100%;
    min-width: 0;
}

.test-screenshot-review,
.test-screenshot-statistics {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.test-screenshot-review[hidden] {
    display: none;
}

.test-screenshot-subheading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.test-screenshot-subheading h3,
.test-screenshot-subheading p {
    margin: 0;
}

.test-screenshot-subheading p {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

.test-screenshot-ocr-table th:nth-child(1),
.test-screenshot-ocr-table td:nth-child(1) {
    width: 7%;
    text-align: center;
}

.test-screenshot-ocr-table th:nth-child(2),
.test-screenshot-ocr-table td:nth-child(2) {
    width: 21%;
}

.test-screenshot-ocr-table th:nth-child(3),
.test-screenshot-ocr-table td:nth-child(3),
.test-screenshot-ocr-table th:nth-child(4),
.test-screenshot-ocr-table td:nth-child(4) {
    width: 18%;
}

.test-screenshot-ocr-table select,
.test-screenshot-ocr-table input[type="text"] {
    width: 100%;
    min-width: 120px;
}

.test-screenshot-skill-control,
.test-screenshot-skill-label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.test-screenshot-skill-control select {
    flex: 1 1 auto;
}

.test-screenshot-skill-label > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.test-screenshot-ocr-source {
    max-width: 360px;
    color: #94a3b8;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.test-screenshot-correction-note {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 10px;
}

.test-screenshot-capture-list {
    display: grid;
    gap: 8px;
}

.test-screenshot-capture-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 8px;
}

.test-screenshot-capture-row span {
    min-width: 0;
    color: #cbd5e1;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.test-screenshot-capture-delete {
    flex: 0 0 auto;
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(127, 29, 29, 0.14);
    color: #fecaca;
}

@media (max-width: 980px) {
    .test-workspace-grid {
        grid-template-columns: 1fr;
    }

    .test-path-list {
        max-height: 360px;
    }

    .test-screenshot-settings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .test-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .test-section-heading .button-row {
        justify-content: flex-start;
    }

    .test-screenshot-subheading {
        align-items: stretch;
        flex-direction: column;
    }
}
