/* chess-widget.css */
.chess-widget {
    width: 100%;
    font-family: Arial, sans-serif;
    background-color: hsl(197, 36%, 90%);;
    margin: 0 auto;
    padding: 10px;

}

.board-wrapper {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    grid-template-rows: 24px 1fr 24px;
    gap: 0;
    background-color: #b58863;
    margin-bottom: 10px;
}

.board-container {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    aspect-ratio: 1;
}

.cg-board {
    width: 100%;
    height: 100%;
}

.board-coords {
    color: white;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
    display: flex;
}

.coord-top {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row;
}

.coord-bottom {
    grid-column: 2;
    grid-row: 3;
    flex-direction: row;
}

.coord-left {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
}

.coord-right {
    grid-column: 3;
    grid-row: 2;
    flex-direction: column;
}

.rank-coord, .file-coord {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.controls button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: rgba(43, 68, 80, 1);
    color: white;
    border: none;
    border-radius: 3px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.controls button:hover {
    background-color:  rgba(43, 68, 80, 0.8);
}

.controls button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.status {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.c-caption {
    color: rgb(33, 37, 41);
}

.error {
    padding: 20px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 600px) {
    .chess-widget {
        /* margin: 10px; */
    }
    
    .board-coords {
        font-size: 12px;
    }
    
    .controls button {
        padding: 8px 16px;
        font-size: 14px;
    }
}