@import "colors-dark.less";
@import "colors-light.less";

@login-height: 53px;
@max-logins-height: @login-height * 7;
@login-part-padding: 6px;
@login-part-height: @login-height - 2 * @login-part-padding;

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    src: local("Open Sans"), url("/fonts/OpenSans-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300;
    src: local("Open Sans Light"), url("/fonts/OpenSans-Light.ttf") format("truetype");
}

html,
body {
    font-family: "Open Sans";
    font-size: 14px;
    margin: 0;
    padding: 0;
    min-width: 260px;
    overflow-x: hidden;
    white-space: nowrap;
}

@media (min-resolution: 192dpi) {
    html,
    body {
        font-weight: 300;
    }
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    display: flex;
    flex-direction: column;
}

.logins {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: inherit;
    max-height: @max-logins-height;
}

.badge {
    display: flex;
    align-items: center;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
    padding: 1px 4px;
}

.part {
    box-sizing: border-box;
    display: flex;
    flex-shrink: 0;
    width: 100%;
}

.part:last-child {
    border-bottom: none;
}

.part > .badge:first-child {
    margin-left: 0;
}

.part.error {
    white-space: normal;
    padding: 7px;
}

.part.notice {
    white-space: normal;
    padding: 7px;
}

.part.search {
    padding: 6px 28px 6px 6px;
    background-image: url("/popup/icon-search.svg");
    background-position: top 6px right 6px;
    background-repeat: no-repeat;
    background-size: 18px;
}

.part.search > .hint {
    line-height: 19px;
}

.part.search > .hint > .remove-hint {
    background-image: url("/popup/icon-bs-delete.svg");
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    height: 12px;
    margin: 3px 0 3px 4px;
    width: 16px;
}

.part.search > input[type="text"] {
    border: none;
    outline: none;
    width: 100%;
    font-family: "Open Sans";
}

.part.search > input[type="text"]::placeholder {
    opacity: 1;
}

.part.login > .name:hover,
.part.login > .name:focus,
.part.login > .action:hover,
.part.login > .action:focus,
.part.login:focus > .name {
    outline: none;
}

.part.login {
    display: flex;
    cursor: pointer;
    align-items: center;
    height: @login-height;

    &:hover,
    &:focus {
        outline: none;
    }

    .name {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: @login-part-height;
        padding: @login-part-padding;

        .line1 {
            display: flex;
            flex-direction: row;
            font-size: 12px;

            .recent {
                background-image: url("/popup/icon-history.svg");
                background-repeat: no-repeat;
                background-size: contain;
                margin-left: 8px;
                width: 9.5px;
                margin-top: 4px;
            }
        }

        .line2 {
            font-size: 18px;
            margin-top: 2px;
        }
    }

    .action {
        background-position: center;
        background-repeat: no-repeat;
        background-size: 19px;
        width: 30px;
        height: @login-part-height;
        padding: @login-part-padding;

        &.copy-password {
            background-image: url("/popup/icon-key.svg");
        }

        &.copy-user {
            background-image: url("/popup/icon-user.svg");
        }
    }
}

.part.login em {
    font-style: normal;
}

.updates {
    padding: @login-part-padding;
}
