@import "../../styles/variables";

.profile {
    padding-bottom: 0;

    .caption-page {
        padding: 10rem 0 5rem;
    }

    h5 {
        color: $color-mint;
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    &-card {
        display: flex;
        flex-wrap: wrap;
        padding: 5rem 0 10rem;

        .avatar {
            width: 280px;
            margin-right: 5rem;
    
            img {
                width: 100%;
            }
        }

        .user-info {
            padding-left: 10rem;
            border-left: 1px solid $color-mint;
            display: flex;
            flex-direction: column;
            justify-content: center;
            flex-grow: 1;

            .item {
                font-size: 1.8rem;
                color: $color-black;
                padding: 1rem 0;
                font-weight: $normal;

                span {
                    display: inline-block;
                }

                .cap {
                    width: 7rem;
                    color: $color-blue;
                }

                .info {
                    padding-left: 2rem;
                    font-weight: $bold
                }
            }
        }
    }

    &-tabs-wrap {
        padding-bottom: 5rem;
        text-align: center;

        .tabs-main {
            max-width: 100%;
    
            .tab-item {
                display: none;
                padding: 2rem;
                border: 1px solid $color-mint;
                border-bottom: 0;
                text-align: left;
            }
    
            .tab-label {
                display: inline-block;
                margin: 0 0 -1px;
                padding: 1.5rem 5rem;
                font-weight: $semi-bold;
                text-align: center;
                color: $color-grey-3;
                border: 1px solid transparent;
                font-size: 1.6rem;
                width: 30%;
    
                &:hover {
                    color: $color-mint;
                    cursor: pointer;
                }
            }
    
            input:checked + .tab-label {
                color: $color-blue;
                border: 1px solid $color-mint;
                border-top: 3px solid $color-mint;
                border-bottom: 1px solid $color-white;
            }
    
            #tab1:checked ~ #content1,
            #tab2:checked ~ #content2 {
                display: block;
            }
        }

        .history {
            overflow-x: auto;
            

            table {
                min-width: 380px;
                width: 100%;
                border-collapse: collapse;
                border: 0;

                thead {
                    tr {
                        border-bottom: 1px solid $color-mint;
                    }
                }

                tbody {
                    tr {
                        &:not(:last-child) {
                            border-bottom: 1px solid $color-mint;
                        }
                    }
                }

                th {
                    font-size: 1.2rem;
                    color: $color-blue;
                    font-weight: $bold;
                }

                td {
                    font-size: 1.4rem;
                }

                th, td {
                    padding: 10px;
                    border-collapse: collapse;
                    border: 0;
                    //border-bottom: 1px solid $color-mint;
                }
            }
        }
    }

    @media screen and (max-width: $medium) {
        h5 {
            text-align: center;
        }
    }

    @media screen and (max-width: $small) {
        &-card {
            justify-content: center;

            .avatar {
                width: 180px;
                margin-right: 0;
                margin-bottom: 2rem;
            }

            .user-info {
                width: 100%;
                border-left: 0;
                padding-left: 0;
                padding-top: 3rem;
                border-top: 1px solid $color-mint;

                .item {
                    display: flex;
                    
                    span {
                        display: block;
                    }

                    .cap {
                        text-align: right;
                        padding-right: 0.5rem;
                        width: 35%;
                    }

                    .info  {
                        padding-left: 0.5rem;
                        width: 65%;
                    }
                }
            }
        }
        &-tabs-wrap {
            .tabs-main {
                .tab-label {
                    padding: 1.5rem;
                    width: 50%;
                }
            }
        }        
    }
}