.course-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    /* fixed width - the expanded "..." group widens the panel column and would shift the tiles */
    width: 100px;
    justify-self: start;
}

.course-tabs-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.course-tab,
.course-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #c7c7c7;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
}

.course-tab:hover,
.course-tab-add:hover {
    background-color: rgb(229, 245, 229);
}

.course-tab.active {
    border: 2px solid rgb(42, 155, 46);
    box-shadow: 0 0 4px rgb(148, 207, 150);
}

.course-tab-add {
    width: 100%;
    height: 28px;
    border: 1px dashed rgb(42, 155, 46);
    color: rgb(42, 155, 46);
    font-size: 18px;
}

/* course settings modal */
#course-settings-modal {
    background-color: white;
    width: min(360px, 90%);
}

.course-style-content {
    box-sizing: border-box;
    gap: 14px;
    padding: 10px;
    font-family: Arial, sans-serif;
}

.course-style-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    align-items: center;
}

.course-style-options {
    display: flex;
    gap: 8px;
}

.course-style-options > label {
    display: flex;
    padding: 3px;
    border: 1px solid #c7c7c7;
    border-radius: 6px;
    cursor: pointer;
}

.course-style-options > label:has(> input:checked) {
    border: 2px solid rgb(42, 155, 46);
    box-shadow: 0 0 4px rgb(148, 207, 150);
}

.course-style-options input[type="radio"] {
    display: none;
}

#course-style-color {
    width: 60px;
    height: 30px;
    padding: 0;
    border: 1px solid #c7c7c7;
    cursor: pointer;
}

.course-style-remove {
    justify-self: start;
    width: max-content;
    padding: 6px 12px;
    border: 1px solid #c62828;
    border-radius: 6px;
    background-color: white;
    color: #c62828;
    cursor: pointer;
}

.course-style-remove:hover {
    background-color: #fdecea;
}

@media (width < 1660px) {
    .course-tabs {
        flex-direction: row;
        align-items: center;
        /* expanded "..." group makes the toolbar row taller - don't stretch, tiles would move down behind the canvas */
        align-self: flex-start;
        height: 58px;
        width: auto;
        margin: 0 8px;
    }

    /* collapsed to the active course, the rest opens as a flyout (flyoutHandler.js) */
    .course-tabs:not(.open) .course-tab:not(.active),
    .course-tabs:not(.open) .course-tab-add {
        display: none;
    }

    .course-tabs.open .course-tab,
    .course-tabs.open .course-tab-add {
        width: 44px;
        height: 44px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
}
