@mixin flex-row {
    display: flex;
    flex-direction: row;
}
@mixin flex-column {
    display: flex;
    flex-direction: column;
}
@mixin header-style {
    font-family: Manrope;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0px;
    text-align: left;
}
@mixin flex-end {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
@mixin grey-header {
    width: 556px;
    height: 48px;
    padding: 16px 0px 8px 0px;
    font-family: Manrope;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0px;
    text-align: left;
    color: rgba(60, 60, 67, 0.6);
}

.insurence-common {
        .current {
            &.title {
                height: 40px;
            }
            &.number {
                height: 40px;
            }
            &.attachment {
                & > div {
                    width:64px;
                    height: 64px;
                }
            }
        }
        & > .current-company-list {
            & > .current-company-info {
                font-family: Manrope;
                @include flex-column();
                justify-content: space-between;

                & > .current-company-base-info {
                    @include flex-row();
                    justify-content: space-between;
                    & > div {

                        & > .member-id {
                            & > div:nth-child(1) {
                                color: rgba(60, 60, 67, 0.3);
                            }
                            & > div:nth-child(2) {
                                font-size: 16px;
                                font-weight: 500;
                                line-height: 20px;
                                letter-spacing: 0px;
                                color: rgba(0, 0, 0, 1);
                            }
                        }
                        & > .attachment {
                            width: 64px;
                            height: 64px;
                            overflow: hidden;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                
                            & > .img-preview {
                                height: 64px;
                                width: 64px;
                                border-radius: 0;
                                object-fit: contain;
                            }
                        }
                    }

                    .controls-block {
                        @include flex-column();

                        & .inside-button {
                            @include flex-row();
                            width: 100%;
                            justify-content: space-between;
                            color: rgba(60, 60, 67, 0.7);
                        }
                    }
                }

                & > .title {
                    font-size: 20px;
                    font-weight: 600;
                    line-height: 24px;
                    letter-spacing: 0px;
                    text-align: left;					
                }

                row-gap: 12px;
                padding: 12px 16px 12px 16px;
                width: 688px;
                height: auto;
                border-radius: 16px;
                background-color: rgba(250, 250, 250, 1);
            }
        }

        .insurance-form-layout {
            position: absolute;
            top: 10vw;
            left: 30vw;
            transform: translate(0%, 5%);
            width: 620px;
            height: auto;
            padding: 0px 32px 32px 32px;
            border-radius: 12px;
            background-color: white;
            
            .insurance-base-block {
                &.loading {
                    height: 823px;
                }

                & > .fields-block {
                    @include flex-column();
                    row-gap: 12px;

                    & > .gallery {
                        @include flex-row();
                        row-gap: 12px;
                        & > .photo-item {
                            width: 64px;
                            height: 64px;
                            overflow: hidden;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                
                            & > img {
                                height: 100%;
                                width: auto;
                                object-fit: contain;
                            }
                        }
                    }
                }

                & > .fields-block > .file-upload {
                    & > button {
                        width: 100%;
                        justify-content: flex-start;
                        align-items: baseline;
                        color: rgba(44, 121, 206, 1);
                    }
                    & > input {
                        display: none;
                    }
                }

                & > .fields-block > div > .insurance-companies-loader {
                    &:has(div > input:focus) > label[for="insurance"] {
                        transform: translate(11px, -59px) scale(1);
                        color: #027AC5;
                        font-size: 12px;
                    }
                    &:has(div > input:not([value=""])) > label[for="insurance"] {
                        transform: translate(11px, -59px) scale(1);
                        color: #027AC5;
                        font-size: 12px;
                    }
                    & > label {
                        color:rgba(60, 60, 67, 0.6);
                        font-size: 16px;
                        transform: translate(11px, -35px) scale(1);
                        font-family: Manrope;
                        font-weight: 400;
                        background-color: white;
                        padding: 0px 8px 0px 8px;
                    }
            
                    & > div {
                        @include flex-column();
                        width: 100%;
            
                        & > input {
                            font-family: Manrope;
                            font-size: 16px;
                            font-weight: 400;
                            line-height: 24px;
                            letter-spacing: 0px;
                            text-align: left;
                            color: rgba(0, 0, 0, 1);
                            background-color: transparent;
                            z-index: 111;
                            &:focus ~ label[for="insurance"]{
                                position: relative;
                                top: -49px;
                                left: 20px;
                                transform: translateY(-18px);
                                background-color: white;
                                width: fit-content;
                                text-overflow: ellipsis;
                            }
                        }
                    }
                } 

                & > .errorBlock {
                    color: red;
                    text-align: center;
        
                    &.margin-top {
                        margin-top: 15px;
                    }
                }
        
                & > div.title {
                    @include header-style();
                    @include flex-end();
                    width: 556px;
                    height: 64px;
                    margin-bottom: 32px;
                }
        
                .grey-header {
                    @include grey-header;
                }
        
                .save-changes-block {
                    @include flex-row();
                    column-gap: 16px;
                }
        
                .controls-block{
                    @include flex-row();
                    justify-content: space-around;
                    width: 556px;
                    height: 58px;
                    padding: 12px 16px 12px 16px;
                    border-radius: 16px;
                    column-gap: 12px;
                }
        
                .duration-block {
                    width: 556px;
                    height: 58px;
                    padding: 12px 16px 12px 16px;
        
                    & > div > div {
                        & > .MuiSelect-select:focus {
                            background-color: #FFFFFF
                        }
                    }
                }
            }

        
            & > div:nth-child(2) {
                @include flex-row();
                
                column-gap: 16px;
            }
        }
}
