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

%symbol {
    font-size: 1.2rem;
    vertical-align: 0.2rem;
    margin: 0 v-space(1) 0 0;
}

.c-stock-header {
    min-height: v-space(30);

    @media screen and (min-width: $screen-medium) {
        display: flex;
        justify-content: space-between;
        min-height: v-space(20);
    }

    & section:last-child {
        @media screen and (min-width: $screen-medium) {
            text-align: right;
            width: 20%;
        }
    }

    &__title {
        @extend %heading-lg;
        line-height: v-space(6);
        font-weight: $font-weight-bold;
    }

    &__currency {
        color: $grey-70;
        font-size: 1.4rem;
    }

    &__price {
        @extend %number-value-md;
        line-height: v-space(2);
    }

    &__value {
        margin: v-space(2) 0 v-space(3) - 0.2 0; // Offsetting AskBit borders
    }

    &__change-value,
    &__change-percentage {
        @extend %number-value-sm;
        line-height: v-space(2);

        &--positive {
            color: $seafoam;
        }
        &--negative {
            color: $watermelon;
        }
    }
    &__change-value {
        &--positive {
            &::before {
                content: '\25B2';
                @extend %symbol;
            }
        }
        &--negative {
            &::before {
                content: '\25BC';
                @extend %symbol;
            }
        }
    }
    &__date {
        @extend %caption;
        line-height: v-space(2);
    }

    &__market {
        line-height: v-space(2);
        font-size: 1.6rem;
        color: $grey-70;
        margin-bottom: v-space(2);
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

        @media screen and (min-width: $screen-large) {
            margin-top: v-space(2.5);
        }
    }

    &__button {
        @media screen and (max-width: $screen-medium) {
            margin-top: v-space(2);
            margin-bottom: v-space(2);
        }
        &--disabled {
            cursor: help !important;
        }
    }

    &__icon {
        width: v-space(2);
        margin-right: v-space(1);
    }

    &__tooltip {
        text-align: left;
        margin: 0 0 v-space(2) 0;
        padding: v-space(2) 0 0 0;
    }
    p:not(:first-child).c-stock-header__tooltip {
        border-top: 0.1rem solid $grey-95;
    }
}
