/* Test mode panel on the control page (not part of the 256x128 scoreboard) */

#testPanel {
    clear: both;
    margin: 15px 0;
    padding: 8px 10px;
    max-width: 900px;
    border: 2px dashed #bbb;
    border-radius: 6px;
    font-size: 14px;
}

#testPanel.tm-active {
    border-color: #d97706;
    background: #fff8eb;
}

#testPanel button {
    margin: 2px 4px 2px 0;
}

#testStatus {
    display: block;
    margin: 4px 0;
    font-weight: bold;
}

.tm-active #testStatus {
    color: #b45309;
}

.tm-innings {
    margin-top: 8px;
}

.tm-innings-name {
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    margin-bottom: 4px;
}

.tm-over {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    padding: 2px 0;
}

.tm-over-label {
    width: 58px;
    font-weight: bold;
    color: #555;
}

.tm-bowler {
    width: 130px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#testPanel .tm-ball {
    min-width: 34px;
    margin: 0;
    padding: 1px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f4f4f4;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

#testPanel .tm-ball:hover {
    border-color: #333;
}

#testPanel .tm-four {
    background: #d1fae5;
    border-color: #34d399;
}

#testPanel .tm-six {
    background: #dbeafe;
    border-color: #60a5fa;
}

#testPanel .tm-wicket {
    background: #730000;
    border-color: #730000;
    color: #fff;
}

#testPanel .tm-extra {
    background: #fef3c7;
    border-color: #fbbf24;
}

#testPanel .tm-selected {
    outline: 3px solid #d97706;
    outline-offset: 1px;
    box-shadow: 0 0 8px 3px rgba(217, 119, 6, .7);
    position: relative;
    z-index: 1;
}

/* balls already played during a simulation */
#testPanel .tm-played {
    opacity: .4;
}

/* the ball list scrolls by itself, so following the simulation never scrolls the page (and the scoreboard) */
#ballList {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

#simSpeed {
    margin-right: 6px;
}
