fieldset{
    box-sizing: border-box;
    border-radius: 3px;
    border-color: var(--main-color);
    border-width: 2px;
    padding: 3px 5px;
    margin-bottom: 5px;

    display: flex;


    &:hover{ background-color: #eceef2; }

    legend{
        color: var(--main-color);
        /*text-shadow: 1px 1px 0px #666666;*/
        font-weight: bold;
        font-size: 110%;
        padding: 0 5px;
    }

    input,select{
        width: 100%;
        height: 25px;
        min-width: 0px;
        border-color: var(--main-color);
        border-width: thin;
        border-radius: 3px;
        box-sizing: border-box;
    }
    input{
        padding: 1px;
        &:focus{ outline-color: var(--main-color); }
    }
    select{
        background-color: var(--main-color);
        border: none;
        color: var(--white-color);
        padding: 0 0 0 5px;
        font-weight: bold;
        cursor: pointer;
        &:hover{ background-color: var(--main-color); }
        &:focus{ outline: none; }
        option{
            background-color: var(--white-color);
            color: var(--main-color);
        }
    }
    label{
        display: flex;
        flex-direction: column-reverse;
        flex-wrap: nowrap;
        align-items: center;
        span{
            font-size: 90%;
            color: var(--main-color);
            cursor: pointer;
            user-select: none;
            text-align: center;
        }
    }
    input[type=number]{
        text-align: right;
        font-weight: bold;
        font-size: 150%;
        color: var(--main-color);
        padding: 2px 0px 0px 2px;
    }
    input[type=text]{
        color: var(--main-color);
        padding: 2px 0px 1px 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    input.text-right{ text-align: right; }
    input.text-left{ text-align: left; }
    input.text-center{ text-align: center; }

}
fieldset.line{
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 5px;
    align-content: space-between;
    justify-content: space-evenly;

    label{

    }
    /*gap 5px*/
    label.w1{ width: calc(100% - 10px); }
    label.w2{ width: calc(50% - 5px); }
    label.w3{ width: calc((100% - 10px)/3); }
    label.w4{
        width: calc((100% - 10px)/6);
        &:nth-child(2){ flex: 1 1 auto; }
        &:nth-child(3){ width: calc((100% - 10px)/4); }
    }
    label.w5{ width: calc((100% - 10px)/5); }
}
fieldset.pole{
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 5px;

    label{

    }
}
fieldset.error{
    legend:after{
        content: 'Σ='attr(data-sum)'≠100%';
        background-color: var(--error-color);
        color: var(--white-color);
        font-size: 75%;
        padding: 1px 3px;
        margin: 0 0 0 3px;
        border-radius: 5px;
    }
    label span{
        color: var(--error-color);
    }
}
fieldset.success{
    legend:after{
        content: '✓';
        background-color: var(--success-color);
        color: var(--white-color);
        font-size: 85%;
        padding: 1px 3px;
        margin: 0 0 0 3px;
        border-radius: 5px;
    }
}
fieldset.zero{
    legend:after{
        content: '≤0';
        background-color: var(--error-color);
        color: var(--white-color);
        font-size: 85%;
        padding: 1px 3px;
        margin: 0 0 0 3px;
        border-radius: 5px;
    }
}

