//
// Copyright (c) 2021 GrowStocks
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

@use '../../Core/Typography';
@use '../../Core/Theme';
@use '../../Core/Tools';

@mixin base() {
    .sc-profile {
        height: 110px;
        width: 100%;
        overflow: hidden;

        display: grid;
        grid-template-columns: 110px auto;

        @include Tools.prefix(transition, all 0.1s ease);

        @content;

        .sc-profile__img {
            width: 110px;
            height: 110px;

            overflow: hidden;

            img {
                width: 110px;
                height: 110px;
                object-fit: cover;
            }
        }

        .sc-profile__container {
            width: 100%;
            padding: 10px;
            overflow: hidden !important;
            word-break: break-word;
            color: inherit !important;

            h2 {
                font-size: Typography.px-to-rem(18px);
                color: inherit !important;
            }

            .wrap--text {
                margin-bottom: 7px;
                color: inherit !important;

                .sc-profile__text {
                    height: 30px;
                    position: relative;
                    color: inherit !important;
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    word-break: break-all;

                    &::before,
                    &::after {
                        content: '"';
                    }
                }
            }

            .sc-profile__actions {
                width: 100%;
                margin-top: 15px;

                display: flex;
                justify-content: flex-end;

                .sc-profile__action {
                    min-width: 0;
                    margin: auto 0 0 13px !important;
                    padding: 0;

                    &.sc-button--outlined,
                    &.sc-button--filled {
                        &.sc-button--icon {
                            padding: 0.5rem;
                            border-radius: 50%;
                        }
                    }
                }
            }
        }
    }
}