@import '../../containers/Application/colors.scss';

$blockBackgroundColor: $white;
$blockBorderColor: $silver;
$blockHandleColor: $black;
$blockHandleBackgroundColor: $silver;
$blockCollapsedColor: $gray;
$blockHandleWidth: 20px;
$blockIconsColor: $gray;

.block {
    display: flex;
    background-color: $blockBackgroundColor;
    border: 1px solid $blockBorderColor;
    border-radius: 3px;

    &:not(.expanded) {
        cursor: pointer;

        .children {
            color: $blockCollapsedColor;
            margin: 10px;
        }

        .header {
            float: right;
            display: flex;
            align-items: center;
            padding: 0;
            margin: 1em;
            height: 18px;
        }

        .icons {
            border-right: 1px solid $blockBorderColor;
            margin-right: 10px;
        }
    }

    &.expanded {
        .icons {
            line-height: 30px;
        }
    }
}

.handle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: $blockHandleColor;
    background-color: $blockHandleBackgroundColor;
    width: $blockHandleWidth;
}

.content {
    width: calc(100% - $blockHandleWidth);
    font-size: 12px;
    line-height: 18px;
}

.children {
    font-size: 12px;
    line-height: 18px;
    margin: 30px;
}

.header {
    padding: 30px 30px 0 30px;
    display: flex;
}

.types {
    min-width: 120px;
    margin-right: 10px;
}

.type {
    color: $blockCollapsedColor;
    margin-right: 10px;
    text-align: right;
    font-size: 12px;
}

.icons {
    color: $blockIconsColor;
    font-size: 14px;

    > * {
        margin-right: 10px;
    }
}

.icon-buttons {
    flex-grow: 1;
    text-align: right;

    & > * {
        margin-left: 20px;
    }
}
