/*
Copyright (C) 2021 Znuny GmbH, https://znuny.org/

This software comes with ABSOLUTELY NO WARRANTY. For details, see
the enclosed file COPYING for license information (AGPL). If you
did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
*/

@import './../utilities/Utility.Clear';
@import './../utilities/Utility.MediaQueries';

.modCard {
    >.inner {
        @include clear();
        border: var(--border-width) var(--border-solid) var(--border-color);
        border-radius: var(--border-radius-sm);
        display: flex;
        flex-flow: column;
        margin-bottom: var(--margin-sm);
        height: auto;
        //position: relative;
        //z-index: 1;
        .cardTitle {
            font-size: var(--font-size-md);
            letter-spacing: .1px;
            line-height: 24px;
            padding: 8px 15px;
            border-bottom: var(--border-width) var(--border-solid) var(--border-color);
            background-color: var(--background-tertiary-color);
            position: relative;
            float: left;
            width: 100%;
            //display: inline-block;
            border-top-left-radius: var(--border-radius-sm);
            border-top-right-radius: var(--border-radius-sm);
            cursor: pointer;
            h1, h2, h3, h4, h5 {
                font-weight: var(--semi-bold);
            }


            display: grid;
            grid-template-columns: auto 1fr;
            align-items: start;
            gap: 40px;
            @include respond-below(lg) {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .cardTitleTrigger {
                width: 40px;
                height: 40px;
                //background-color: red;
                background-image: url(../../img/icons/arrow-top.svg);
                background-size: 12px 12px;
                background-repeat: no-repeat;
                background-position: center  center;
                position: absolute;
                right: 10px;
                top: 50%;
                margin-top: -20px;
                &:hover {
                    opacity: 0.7;
                    cursor: pointer;
                }
            }
        }
        .cardContent {
            padding: var(--padding-lg);
            background-color: var(--background-secondary-color);
            position: relative;
            float: left;
            width: 100%;
            display: inline-block;
            max-height: unset;
            transition: all 0.250s ease-out;
            border-bottom-left-radius: var(--border-radius-sm);
            border-bottom-right-radius: var(--border-radius-sm);
        }

        &.Collapsed {
            overflow: hidden;
            .cardTitle {
                border-bottom: none;
                .cardTitleTrigger {
                    transform: rotate(180deg);

                }
            }

            .cardContent {
                max-height: 0px;
                overflow: hidden;
                padding-bottom: 0;
                padding-top: 0;
                border-bottom: none;
                will-change: max-height;

            }


        }
    }
}
