@import '../../less/reset';
@import '../../less/palette';

.card {
    position: fixed;
    z-index: 1500;
    top: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    transition: visibility 0s linear 0.6s, top 0.6s cubic-bezier(0.65, 0.00, 0.4, 1);
    min-height: 100%;
    visibility: hidden;

    &:before {
        content: '';
        position: fixed;
        top: 0;
        opacity: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        background-color: fade(@color-primary, 70%);
        transition: opacity 0.6s cubic-bezier(0.65, 0, 0.4, 1);
    }

    &.open {
        top: 0;
        transition: visibility 0s, top 0.26s cubic-bezier(0.65, 0.00, 0.4, 1);
        visibility: visible;

        &:before {
            opacity: 1;
        }
    }

    &.opened {
        /* styles when card is completely open */
    }

    >.header {
        height: 70px;
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        line-height: 30px;
        border-bottom: 1px solid @color-separator;
        position: fixed;
        left: 0;
        right: 0;
        padding: 20px 24px;
        z-index: 200;
        background-color: white;

        >.container {
            margin: 0 auto;

            >div:first-child,
            >button:first-child,
            >.button:first-child {
                float: left;
            }

            >div:last-child,
            >button:last-child,
            >.button:last-child {
                float: right;
            }

            >button:first-child,
            >.button:first-child {
                background-color: white;
                color: @color-secondary;
                border-color: @color-border;

                &:hover {
                    background-color: @color-illegal-white;
                }
            }

            >button,
            >.button {
                height: 32px;
                line-height: 32px;
                font-size: 12px;
                font-weight: bold;
                width: 88px;

                >.content {
                    padding: 0;
                }
            }
        }
    }

    >.content {
        position: relative;
        background-color: white;
        height: ~"calc(100% - 70px)"; /* because less is stupid */
        margin-top: 70px;
        overflow-y: auto;

        >.container {
            margin: 36px auto;
            max-width: 670px;
        }
    }
}
