.boardRow, .numberRow {
    height: calc(100% / 10);
}

.cell,
.numberBarCell {
    width: calc(100% / 10);
    padding: 0;
    border: solid var(--board-border-color);
    cursor: pointer;
}

.cell label,
.numberBarCell label {
    cursor: pointer;
}

.cell {
    border-width: var(--border-width-100);
}

.numberBarCell {
    border-width: var(--border-width-300);
    background-color: var(--grey-200);
}

/* create 3x3 box boarders */
.boardRow:nth-of-type(3n - 2) .cell {
    border-top-width: var(--border-width-300);
}
.boardRow:nth-of-type(3n) .cell {
    border-bottom-width: var(--border-width-300);
}
.cell:nth-of-type(3n - 2) {
    border-left-width: var(--border-width-300);
}
.cell:nth-of-type(3n) {
    border-right-width: var(--border-width-300);
}

/* cell default styling */
.cell,
.numberBarCell,
.cell.empty::after {
    text-align: center;
    vertical-align: middle;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* remove grey box around cells on tap in safari */
}

/* cell state styling */
.selected {
    background-color: var(--select-color-400)!important;
}

.startValue label {
    font-weight: bold;
}

.btFilled {
    background-color: var(--btFilled);
}

.nbDepleted {
    background-color: var(--grey-500)!important;
}

.nbOverloaded {
    background-color: var(--overloaded-color)!important;
}


/* cell focus effect. number bar does not get focus */
.cell:focus,
.numberBarCell:focus {
    transform: scale(var(--focus-scale-transform));
    border-width: var(--border-width-600)!important;
    border-color: var(--board-border-color);
    color: black;
}

.cell.empty:focus {
    background-color: var(--grey-100)!important;
    color: var(--grey-700);
}

.cell:not(.startValue):not(.empty):not(.selected):focus {
    background-color: white!important;
}

.cell.startValue:focus {
    background-color: var(--board-border-color)!important;
    color: white;
}

.cell.startValue.selected:focus {
    border-color: var(--select-color-400)!important;
}

/* show ghost value in empty cells*/
.cell.empty::after {
    content: attr(data-selected-value);
    visibility: hidden;
    opacity: 0;
}

.cell.empty:focus::after {
    visibility: visible;
    opacity: var(--select-hover-opacity);
}


@media (hover) {
    /* cell hover effect */
    .cell:hover,
    .numberBarCell:hover {
        transform: scale(var(--hover-scale-transform));
        border-width: var(--border-width-100)!important;
        border-color: var(--board-border-color);
        color: black;
    }

    .cell.empty:hover {
        background-color: var(--grey-100)!important;
        color: var(--grey-700);
    }

    .cell:not(.startValue):not(.empty):not(.selected):hover {
        background-color: white!important;
    }

    .cell.startValue:hover {
        background-color: var(--board-border-color)!important;
        color: white;
    }

    .cell.empty:hover::after {
        visibility: visible;
        opacity: var(--select-hover-opacity);
    }

    .numberBarCell:hover {
        background-color: var(--select-color-300)!important;
    }
}


@media (prefers-reduced-motion: no-preference) {
    .cell,
    .numberBarCell {
        transition: transform 200ms, background-color 200ms;
    }

    .cell.empty::after {
        transition: opacity 200ms ease-in;
    }
}
