.chore-selector-page {
    max-width: 700px;
}

.chore-toolbar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3.25rem;
    padding-inline: 6.75rem;
}

.chore-history-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.chore-reset-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.chore-reset-btn[hidden] {
    display: none;
}

.list-group-item[data-chore-item] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.12s ease, color 0.12s ease, outline-color 0.12s ease;
    cursor: pointer;
    padding: 0.75rem 1rem;
}

.chore-text {
    flex: 0 1 auto;
    display: inline;
    cursor: text;
    outline: none;
}

.chore-hit-area {
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;
}

.chore-delete-btn {
    flex-shrink: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    min-width: 2rem;
    padding-inline: 0.45rem;
    line-height: 1;
    font-size: 1.1rem;
}

.list-group-item[data-chore-item]:hover .chore-delete-btn,
.list-group-item[data-chore-item]:focus-within .chore-delete-btn {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
    .chore-delete-btn {
        opacity: 1;
        pointer-events: auto;
    }
}

.list-group-item[data-chore-item].is-highlighted {
    background-color: #fff3cd;
    outline: 2px solid #ffc107;
    outline-offset: -2px;
}

.list-group-item[data-chore-item].is-highlighted .chore-text {
    color: #664d03;
}

.list-group-item[data-chore-item].is-selected-chore {
    background-color: #cfe2ff;
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

.list-group-item[data-chore-item].is-selected-chore .chore-text {
    color: #084298;
}

.chore-text[contenteditable='true'] {
    display: inline-block;
    min-width: 1ch;
    background-color: #fff;
    box-shadow: inset 0 0 0 1px var(--bs-border-color);
    padding: 0 0.15rem;
    border-radius: 0.15rem;
}

.list-group-item[data-chore-item]:has(.chore-text[contenteditable='true']) .chore-delete-btn {
    opacity: 0;
    pointer-events: none;
}

.list-group-item[data-chore-item].done-item {
    background-color: var(--bs-light);
}

.list-group-item[data-chore-item].done-item .chore-text {
    text-decoration: line-through;
    color: var(--bs-secondary-color);
}

.chore-list-input {
    border: 0;
    border-radius: 0;
    padding: 0.75rem 1rem;
    box-shadow: none;
}

.chore-list-input:focus {
    box-shadow: none;
}

.chore-input-row {
    border-style: dashed;
}

.chore-history-panel {
    max-height: 14rem;
    overflow-y: auto;
}

.chore-history-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: default;
    padding: 0.65rem 1rem;
}

.chore-history-meta {
    cursor: pointer;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.chore-history-name {
    cursor: text;
    flex: 0 1 auto;
    outline: none;
}

.chore-history-name.is-placeholder {
    color: var(--bs-secondary-color);
    font-style: italic;
}

.chore-history-name[contenteditable='true'] {
    display: inline-block;
    min-width: 4ch;
    background-color: #fff;
    box-shadow: inset 0 0 0 1px var(--bs-border-color);
    padding: 0 0.15rem;
    border-radius: 0.15rem;
    font-style: normal;
    color: inherit;
}

.chore-history-name.is-saving {
    opacity: 0.65;
}

.chore-history-hit-area {
    flex: 1 1 auto;
    min-width: 0.75rem;
    align-self: stretch;
    cursor: text;
}

.chore-history-item:hover,
.chore-history-item:focus-within {
    background-color: var(--bs-light);
}

.chore-history-item.is-loading {
    opacity: 0.6;
    pointer-events: none;
}
