@use '../../styles';

.accounts-management {
    position: relative;
    z-index: 1;
    background-color: #fff;

    &__page {
        display: flex;
        flex: 1;
        flex-direction: column;
        min-height: 100%;
    }

    &__content {
        &-header {
            display: flex;
            align-items: center;
            font-weight: 600;
            font-size: 18px;
            line-height: 24px;
            letter-spacing: 0.1px;
            color: #000;
            margin-bottom: 8px;

            &._subheader {
                font-weight: 400;
                font-size: 14px;
                line-height: 20px;
                letter-spacing: .75px;
                color: #7d8b92;
            }

            &._offset {
                margin-top: 20px;
            }

            small {
                font-size: 12px;
                float: right;
            }

            .accounts-management__add-btn {
                margin-left: auto;
            }
        }

        &-form-rows {
            display: flex;
            flex-direction: column;
            row-gap: 20px;

            .input {
                margin-bottom: 0;
            }
        }

        &-comment {
            font-family: 'PT Root UI', sans-serif;
            font-style: normal;
            font-weight: normal;
            font-size: 14px;
            line-height: 20px;
            letter-spacing: 0.75px;
            color: #7D8B92;

            a {
                cursor: pointer;
            }
        }
    }

    &__name-button {
        @include styles.button-reset;
        display: block;
        color: styles.$primary;
        font-style: inherit;
        font-weight: inherit;
        font-size: inherit;
        line-height: inherit;
        letter-spacing: inherit;
    }

    &__create-account {
        cursor: pointer;
        float: right;
        font-size: 16px;
        line-height: 20px;
    }

    &__public-key-placeholder {
        cursor: copy;
        background: #f8f9f9;
        border: 1px solid #dde1e2;
        box-sizing: border-box;
        padding: 16px 20px;
        font-size: 16px;
        line-height: 20px;
        letter-spacing: 0.25px;
        word-break: break-all;
        margin-bottom: 12px;
    }

    &__account-visibility {
        font-size: 16px;
        line-height: 20px;
        margin: 16px 16px 16px 0;
        display: flex;
        flex-direction: row;
        align-items: center;

        &-disabled {
            opacity: 0.5;
            pointer-events: none;
        }
    }

    &__address-placeholder {
        background: #f8f9f9;
        border: 1px solid #dde1e2;
        box-sizing: border-box;
        padding: 10px;
        font-size: 16px;
        line-height: 20px;
        letter-spacing: 0.25px;
        word-break: break-all;
        margin-bottom: 12px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    &__address-qr-code {
        background: #fff;
        padding: 10px;
        height: 100px;
        width: 100px;
    }

    &__address-text {
        cursor: copy;
        margin-left: 10px;
    }

    &__divider {
        margin: 0 -20px;
        border-top: 1px solid styles.$light-grey;
        height: 0;
    }

    &__seed-columns {
        counter-reset: seed;
        display: flex;
        flex-direction: row;
        column-gap: 12px;
        row-gap: 12px;

        > * {
            width: 100%;
        }
    }

    &__seed-column {
        display: flex;
        flex-direction: column;

        > * {
            width: 100%;
        }
    }

    &__seed-input {
        counter-increment: seed;
        position: relative;
        margin-bottom: 20px;
        cursor: text;

        &:last-child {
            margin-bottom: 0;
        }

        &::before {
            content: counter(seed) ".";
            position: absolute;
            top: 14px;
            left: 20px;
            font-style: normal;
            font-weight: bold;
            font-size: 16px;
            line-height: 20px;
            letter-spacing: 0.25px;
            color: #000;
            z-index: 2;
        }

        .autocomplete {
            .input {
                padding-left: 48px;
            }

            .autocomplete__dropdown {
                z-index: 120;
            }

            .autocomplete__list {
                max-height: 80px;
            }

            .autocomplete__list-item {
                padding-left: 48px;
            }
        }
    }

    .accounts-management__account-visibility-hint {
        font-weight: 400;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: 0.1px;
        color: styles.$grey;
    }

    .accounts-management__list--empty {
        font-size: 14px;
        padding: 24px 16px 16px;
        text-align: center;
        color: #7d8b92;
    }

    .accounts-management__type-list {
        .accounts-management__type-list-subtitle {
            margin-bottom: 8px;
        }

        .accounts-management__type-list-item {
            gap: 20px;
            padding: 0 20px;
            border: 1px solid #dde1e2;
            min-height: 66px;
            margin-bottom: 8px;

            &._checked {
                background-color: #f8f9f9;
                border: 1px solid styles.$primary;
            }

            .accounts-management__type-list-item-name {
                font-weight: 500;
                font-size: 16px;
                line-height: 20px;
                letter-spacing: .25px;
                color: #000;
            }

            .accounts-management__type-list-item-description {
                color: #919191;
                margin-top: 0.1em;
                font-size: 0.7rem;
                line-height: 0.9rem;
            }
        }
    }

    .accounts-management__header {
        display: flex;
        align-items: center;
        gap: 8px;

        .accounts-management__header-img {
            flex: 0 0 auto;
        }

        .accounts-management__header-title {
            @include styles.ellipsis;
            flex: 0 1 auto;
            padding-right: 8px; // ¯\_(ツ)_/¯
        }
    }

    .accounts-management__add-btn {
        @include styles.button-reset;
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 500;
        font-size: 16px;
        line-height: 22px;
        color: styles.$primary;

        > svg {
            width: 20px;
            height: 20px;
        }
    }

    .accounts-management__search {
        margin-top: 16px;
    }

    .accounts-management__seeds,
    .accounts-management__keys {
        .acccounts-management-list__item {
            &:hover,
            &:has(._active) {
                .acccounts-management-list__item-addon,
                .acccounts-management-list__item-icon {
                    opacity: 1;
                }
            }

            .acccounts-management-list__item-addon {
                opacity: 0;
            }

            .acccounts-management-list__item-icon {
                opacity: .2;
            }

            .dropdown-menu {
                z-index: 101;

                &._active {
                    z-index: 102;
                }
            }
        }
    }

    .accounts-management__content {
        padding-top: 4px;
    }

    .accounts-management__empty {
        font-weight: 400;
        font-size: 16px;
        line-height: 22px;
        text-align: center;
        letter-spacing: 0.25px;
        color: #4d4f55;
        margin-top: 28px;
    }
}
