@import '~@equitysim/react-uikit/dist/styles/styleguide';

.c-trade-filter-dialog {
    $padding-h: v-space(2);
    $min-width: h-space(4);

    padding: 0 $padding-h;

    &__title {
        @extend %heading-xs;
        margin: 0;
        padding: v-space(2) $padding-h;
        @media (max-width: $screen-medium) {
            padding: v-space(4) $padding-h v-space(2) $padding-h;
        }
    }

    &__content {
        @extend %body-text-xs;
        margin: v-space(3) 0;
        line-height: v-space(2);
        p {
            margin: 0 0 v-space(2) 0;
            &:first-of-type {
                color: $grey-75;
            }
        }
    }

    &__help {
        height: auto;
        width: 1.4rem;
        margin-right: v-space(1);
        vertical-align: -0.2rem;
    }

    &__filter,
    &__button {
        font-size: 1.2rem !important;
        font-weight: $font-weight-bold;
    }

    &__button {
        height: v-space(5);
        min-height: v-space(5);
        min-width: $min-width;
        justify-content: flex-end;
        background-color: $success-color;
        color: $grey-100;
        padding: 0 $padding-h;
        text-transform: uppercase;
        border-bottom-left-radius: 0.2rem;
        border-bottom-right-radius: 0.2rem;

        @media (max-width: $screen-medium) {
            background-color: $grey-100;
            color: $success-color;
            padding: $padding-h;
        }
    }

    &__dialog {
        max-width: h-space(5);
        width: 100vw;

        form {
            padding: 0 $padding-h;

            & .c-trade-filter-dialog__button {
                margin: 0 -$padding-h;
                width: calc(100% + #{$padding-h * 2});
            }
        }

        @media (max-width: $screen-medium) {
            margin-top: calc(-100vh + #{v-space(6)});
            left: 0;
        }

        @media screen and (max-width: $screen-small) {
            // TODO: When the viewport is at the top (y=0) the dialog
            // snaps to the top hidden underneath the header
            height: 80vh;
            padding-top: v-space(14);
        }
    }
}
