@use "../common/styles/variables.scss" as vars;

html,
body {
    width: 400px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.list-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;

    .list-group-item {
        position: relative;
        margin-bottom: -1px;
    }

    .list-group-item:hover {
        cursor: pointer;
        background-color: #0d6efd;
        color: white;
    }
}

$menu-item-height: 40px;
$menu-item-padding: 5px;
$menu-item-border-bottom: 1px;

.menu-item,
.menu-item-short {
    display: flex;
    align-items: center;
    padding: $menu-item-padding;
    height: $menu-item-height;
    border-bottom: $menu-item-border-bottom solid #ccc;
}

.menu-item-short {
    height: 20px;
}

#extra-settings-toggle {
    height: 25px;
    margin: auto;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.rotated {
    transform: rotate(180deg);
}

$extra-settings-items: 2; // TODO: if we add more settings, we need to update this value

.extra-settings {
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    max-height: calc($menu-item-height + $menu-item-padding*2 + $menu-item-border-bottom) * $extra-settings-items;
}

.collapsed {
    max-height: 0;
}

.theme-selection {
    #dark-theme-toggle {
        cursor: pointer;
        margin-left: 10px;
        height: 37px;
    }

    #dark-theme-status {
        margin-left: 5px;
    }
}

.input-with-button {
    label {
        padding-right: 5px;
        min-width: 110px;
    }

    input[type="text"], select {
        flex-grow: 1;
        padding: 5px;
        border: 1px solid #ccc;
        border-radius: 4px 0 0 4px;
    }

    select {
        cursor: pointer;
        width: auto;
        padding: 4px 0px 4px 0px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    button {
        padding: 6px 10px;
        background: #0078d7;
        color: #fff;
        border: none;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
        min-width: 75px;

        &:hover {
            background: #005fa3;
        }
    }
}

.dark-theme {
    background: vars.$dark-theme-primary-color;
    color: white;

    .menu-item,
    .menu-item-short {
        border-color: vars.$dark-theme-secondary-color;
    }

    .input-with-button {
        border-color: vars.$dark-theme-secondary-color;

        input, select {
            background: vars.$dark-theme-secondary-color;
            color: white;
            border-color: vars.$dark-theme-secondary-color !important;
        }
    }
}