button.active {
    background-color: lightblue;
}

/* Radio button style for class selection buttons */
.radio-button {
    position: relative;
    padding: 8px 16px;
    margin: 2px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.radio-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.radio-button.active {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
    font-weight: bold;
}

.radio-button.active::before {
    content: "●";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.selectable-action:not(.visible) {
    display: none;
}

.header-group {
    display: inline-block;
}

.header-group:not(:first-child) {
    border-left: thin black solid;
    margin-left: 0.5em;
    padding-left: 0.5em;
}

.annotation-actions {
    display: inline-grid;
    grid-template-columns: auto 1fr;
}

.annotation-actions.no-roi div.requires-roi {
    display: none;
}

.control-group {
    margin: 0 0.5em;
    padding: 0 0.5em;
    border-left: thin gray solid;
    border-right: thin gray solid;
}

.item-list {
    padding: 0 0.5em;
}

.bbox-dropdown {
    margin-right: 0.5em;
}

.done-span {
    display: inline-flex;
    align-items: center;
    margin: 0 0.3em;
}

.delete-button {
    background-color: palevioletred;
    margin-left: 2em;
}



/* adapted from https://mionskowski.pl/posts/positioning-a-context-menu-using-pure-css/ */
.context-dialog {
    --mouse-x: 0;
    --mouse-y: 0;
    display: none;
    position: fixed;
    margin: 0;
    left: 0;
    top: 0;
    transform: translateX(min(var(--mouse-x), calc(100vw - 100%))) translateY(min(var(--mouse-y), calc(100vh - 100%)));

    background-color: white;
    border: thin black solid;
    border-radius: 5px;
    user-select: none;
}

.contextmenu {
    padding: 5px 2em;
}

.contextmenu h4 {
    margin-top: 1em;
    margin-bottom: 0.1em;
}

.context-dialog .draggable-header {
    padding: 0.1em 0.5em;
    background-color: lightgray;
    cursor: move;
    display: grid;
    grid-template-columns: 1fr auto;
}