/* --- CONTEST INNER NAVIGATION --- */
.contest-nav {
    background: $grey;
    height: 40px;
    margin-bottom: 6vh;
    overflow: hidden;
    &__dragger {
        display: flex;
    }
    .tns-liveregion { display: none; }
    &__link {
        display: block;
        height: 100%;
        font-weight: $bold;
        font-family: $title;
        color: $red;
        padding: 0 25px;
        line-height: 40px;
        transition: 180ms linear;
        &:hover,
        &.active { background: $white; color: $red; }
    }
}

/* --- DROPDOWN --- */
.filter-box {
    margin: 4vh 0 2vh;
    .row { align-items: center; }
    .filter-dropdown {
        .dropdown-custom {
            .dropdown {
                &-menu {
                    width: 100%;
                    background: $grey;
                    a {
                        font-weight: $bold;
                        margin: 4px 0;
                    }
                }
                &-toggle {
                    display: flex;
                    width: 100%;
                    align-items: center;
                    border: 1px solid $grey;
                    background: $white;
                    position: relative;
                    padding-right: 40px;
                    .drop-label {
                        font-weight: $bold;
                        font-family: $title;
                        font-size: $f12;
                        color: $black;
                        margin-right: 20px;
                        text-transform: uppercase;
                    }
                    .current-item {
                        font-size: $f14;
                        font-weight: $fBlack;
                        color: $black;
                    }
                    @extend %arrowClose;
                    &:before,
                    &:after {
                        left: auto;
                        right: 5px;
                        background: $red;
                        border: 0;
                        border-radius: 6px;
                        @include size(10px,3px);
                    }
                    &:after { right: 10px; }
                }
            }
        }
    }

    .view-mode-box {
        display: flex;
        @extend %flexCenterEnd;
        @include size(auto, 30px);
        .view-mode {
            display: flex;
            @extend %flexCenterCenter;
            @include size(30px,30px);
            margin: 0 4px;
            &__icon {
                display: block;
                @include size(100%,100%);
                fill: $black;
                transition: 180ms linear;
            }
            &.active,
            &:hover {
                .view-mode__icon { fill: rgba($black, 0.4); }
            }
        }
    }
    @media (max-width: 1023px) {
        padding-bottom: 80px;
        .filter-dropdown {
            flex: 0 0 50%;
            max-width: 50%;
        }
        .pagination-box {
            display: none;
        }
        .view-mode-box { display: none; }
    }
    @media (max-width: 767px) {
        padding-bottom: 20px;
        .filter-dropdown {
            flex: 0 0 100%;
            max-width: 100%;
            margin: 20px 0;
        }
    }
}

/* --- CONTEST LIST --- */
.contests-list {
    &__boxes {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        &.list {
            flex-direction: column;
            .contest {
                display: flex;
                @extend %flexStartStart;
                background: rgba($grey, 0.2);
                margin: 20px 0;
                position: relative;
                .plus {
                    position: absolute;
                    top: 0;
                    right: 0;
                }
                &__draft {
                    position: absolute;
                    top: 0;
                    left: 0;
                    display: flex;
                    @extend %flexCenterStart;
                    background: rgba($grey, 0.8);
                    @include size(100%,100%);
                    z-index: 10;
                    .draft__container {
                        display: block;
                        width: 30%;
                        height: 100%;
                        text-align: center;
                        .draft-box {
                            position: relative;
                            display: flex;
                            flex-direction: column;
                            @extend %flexCenterCenter;
                            @include size(100%,100%);
                        }
                        .contest__draft-label {
                            display: block;
                            background: $red;
                            width: 100%;
                            font-weight: $bold;
                            font-family: $title;
                            font-size: $f24;
                            color: $white;
                            padding: 0 10px;
                            text-align: center;
                            margin-bottom: 60px;
                        }
                        .btn { font-size: $f12; }
                    }
                }
                &__img {
                    display: block;
                    width: 30%;
                    img { width: 100%;}
                }
                &__info {
                    display: flex;
                    flex-direction: column;
                    width: 70%;
                    padding: 30px;
                    position: relative;
                    &-title, &-subtitle,
                    &-description, &-typeslist,
                    &-datalist { display: block; }
                    &-title {
                        font-weight: $fBlack;
                        font-size: $f24;
                        margin-bottom: 20px;
                        small { font-family: $text; font-size: $f14; }
                    }
                    &-subtitle {
                        margin-bottom: 24px;
                        font-size: $f14;
                    }
                    &-typeslist {
                        display: flex;
                        @extend %flexStartStart;
                        margin: 20px 0 20px;
                        .type {
                            display: flex;
                            align-items: center;
                            margin-right: 30px;
                            &--label {
                                font-size: $f12;
                                padding-left: 16px;
                            }
                        }
                    }
                    &-datalist {
                        display: flex;
                        @extend %flexCenterStart;
                        .data {
                            font-weight: $fBlack;
                            font-size: $f18;
                            margin-right: 80px;
                            &.red { color: $red; }
                            label { font-size: $f26; }
                        }
                    }
                }
                &.new-contest {
                    display: flex;
                    flex-wrap: wrap;
                    .new-contest {
                        &__add {
                            display: block;
                            background: $red;
                            width: 30%;
                            padding-bottom: 30%;
                            position: relative;
                            .icon {
                                position: absolute;
                                top: 50%;
                                left: 50%;
                                @include size(90px,90px);
                                fill: $white;
                                transform: translate(-50%,-50%);
                            }
                        }
                        &__text {
                            display: flex;
                            flex-direction: column;
                            @extend %flexCenterCenter;
                            width: 70%;
                            height: 100%;
                            min-height: 340px;
                            font-size: $f14;
                            text-align: center;
                            padding: 0 15%;
                            strong { font-size: $f24; }
                            @media (max-width: 767px) {
                                &__add {
                                    width: 20%;
                                    height: 100%;
                                    padding-bottom: 0;
                                    &:before,
                                    &:after { @include size(20px, 5px); }
                                }
                                &__text { width: 80%;}
                            }
                        }
                    }
                }
                @media (max-width: 1023px) {
                    flex-direction: column;
                    width: 48%;
                    margin: 20px 1%;
                    position: relative;
                    .plus-btn {
                        @include size(60px,60px);
                        &:before,
                        &:after { @include size(30px,6px); }
                    }
                    &.new-contest {
                        flex-direction: column;
                        .new-contest {
                            &__add,
                            &__text { width: 100%; }
                            &__add {
                                height: 0;
                                padding-bottom: 100%;
                                &:before,
                                &:after {
                                    @include size(60px, 10px);
                                }
                            }
                            &__text {
                                height: auto;
                                padding: 40px 20px;
                            }
                        }
                    }
                    &__img,
                    &__info { width: 100%; }
                    &__info {
                        position: static;
                        display: flex;
                        padding: 0 20px;
                        &-description { display: none; }
                        &-typeslist {
                            display: flex;
                            justify-content: flex-start;
                            order: 1;
                            transform: translate(-20px, calc(-100% - 38px));
                            .type {
                                margin-right: 10px;
                                &--label { display: none; }
                            }
                        }
                        &-title { display: flex; order: 2; }
                        &-subtitle { display: flex; order: 3; }
                        &-datalist { display: flex; order: 4; }
                        &-title, &-subtitle,
                        &-datalist { text-align: center; transform: translateY(-40px); }
                        &-datalist {
                            flex-wrap: wrap;
                            justify-content: center;
                            .data {
                                width: 50%;
                                text-align: center;
                                &:nth-of-type(1) { width: 100%; }
                            }
                        }
                    }
                }
                @media (max-width: 767px) {
                    width: 98%;
                    &.new-contest {
                        .new-contest {
                            &__add {
                                &:before,
                                &:after { @include size(30px, 5px)}
                            }
                        }
                    }
                }
            }
        }
        &.grid {
            flex-direction: row;
            .contest {
                display: flex;
                @extend %flexStartStart;
                background: rgba($grey, 0.2);
                flex-direction: column;
                width: calc(100% / 4 - 2%);
                margin: 20px 1%;
                position: relative;
                .plus {
                    position: absolute;
                    top: 0;
                    right: 0;
                }
                &__draft {
                    position: absolute;
                    top: 0;
                    left: 0;
                    display: flex;
                    flex-direction: column;
                    @extend %flexCenterStart;
                    background: rgba($grey, 0.8);
                    @include size(100%,100%);
                    z-index: 10;
                    .draft__container {
                        display: block;
                        @include size(100%,0);
                        padding-bottom: 100%;
                        position: relative;
                        .draft-box {
                            position: absolute;
                            top: 0;
                            left: 0;
                            display: flex;
                            flex-direction: column;
                            @extend %flexCenterCenter;
                            @include size(100%,100%);
                        }
                        .contest__draft-label {
                            display: block;
                            background: $red;
                            width: 100%;
                            font-weight: $fBlack;
                            font-size: $f24;
                            color: $white;
                            padding: 6px 10px 4px;
                            text-align: center;
                            margin-bottom: 60px;
                        }
                        .btn {
                            width: auto;
                            white-space: nowrap;
                            font-size: $f12;
                            padding: 10px 30px;
                        }
                    }
                }
                &__img {
                    display: block;
                    width: 100%;
                    img { width: 100%;}
                }
                &__info {
                    display: flex;
                    flex-direction: column;
                    width: 100%;
                    padding: 25px 10px;
                    position: relative;
                    &-title {
                        display: block;
                        width: 100%;
                        font-weight: $fBlack;
                        font-family: $text;
                        font-size: $f24;
                        line-height: 1em;
                        margin-bottom: 17px;
                        .title {
                            display: block;
                            width: 100%;
                            min-height: 72px;
                            margin-bottom: 32px;
                        }
                        .client {
                            display: flex;
                            align-items: baseline;
                            justify-content: center;
                            width: 100%;
                            font-family: $text;
                            font-size: $f18;
                            text-align: center;
                            line-height: 1em;
                            small { padding-right: 5px; }
                        }
                    }
                    &-subtitle {
                        font-size: $f14;
                        margin-bottom: 28px;
                    }
                    &-description { display: none; }
                    &-title { display: flex; order: 2; }
                    &-subtitle { display: flex; order: 3; }
                    &-datalist { display: flex; order: 4; }
                    &-title, &-subtitle,
                    &-datalist { text-align: center; }
                    &-subtitle { margin-bottom: 20px; }
                    &-typeslist {
                        position: absolute;
                        top: 0;
                        left: 0;
                        display: flex;
                        flex-direction: column;
                        width: 100%;
                        @extend %flexEndAround;
                        order: 1;
                        transform: translateY(-100%);
                        margin: 0;
                        .type {
                            display: flex;
                            align-items: center;
                            width: 100%;
                            position: relative;
                            pointer-events: all;
                            cursor: pointer;
                            &--icon {
                                display: flex;
                                @extend %flexCenterCenter;
                                background: $red;
                                @include size($contestIconBox,$contestIconBox);
                                position: relative;
                                z-index: 2;
                                .icon {
                                    @include size($contestIconSVG,$contestIconSVG);
                                    fill: $white;
                                }
                            }
                            &--label {
                                position: absolute;
                                top: 0;
                                left: 0;
                                display: flex;
                                @extend %flexCenterCenter;
                                background: rgba($grey, 0.9);
                                font-family: $f14;
                                @include size(100%,100%);
                                padding-left: 30px;
                                opacity: 0;
                                z-index: 1;
                                transition: 300ms linear;
                            }
                            &:hover {
                                .type--label { opacity: 1; }
                            }
                        }
                    }
                    &-datalist {
                        display: block;
                        .data {
                            display: flex;
                            align-items: baseline;
                            width: 50%;
                            font-size: $f14;
                            text-align: center;
                            margin-top: 20px;
                            label { font-weight: $fBlack; font-size: $f18;}
                            &.red { color: $red; }
                            &:nth-of-type(1) {
                                width: 100%;
                                font-weight: $fBlack;
                                text-align: center;
                                justify-content: center;
                                margin-top: 0;
                                label { font-size: $f24; padding-left: 5px; }
                                .data.red { font-size: $f18; }
                            }
                            &:nth-of-type(2) {
                                float: left;
                            }
                            &:last-of-type {
                                float: right;
                                text-align: right;
                            }
                        }
                    }
                }
                &.new-contest {
                    display: flex;
                    flex-wrap: wrap;
                    flex-direction: column;
                    .new-contest {
                        &__add {
                            display: block;
                            background: $red;
                            width: 100%;
                            height: 0;
                            padding-bottom: 100%;
                            position: relative;
                            .icon {
                                position: absolute;
                                top: 50%;
                                left: 50%;
                                @include size(90px,90px);
                                fill: $white;
                                transform: translate(-50%,-50%);
                            }
                        }
                        &__text {
                            display: flex;
                            flex-direction: column;
                            @extend %flexCenterCenter;
                            width: 100%;
                            height: auto;
                            text-align: center;
                            padding: 25px 20px;
                            strong {
                                display: block;
                                font-size: 1.33em;
                                font-weight: $fBlack;
                                font-family: $text;
                                margin-bottom: 25px;
                            }
                            .txt { font-size: 0.778em;}
                        }
                    }
                }
                @media (max-width: 1200px) {
                    width: 31%;
                }
                @media (max-width: 1023px) {
                    width: 48%;
                }
                @media (max-width: 767px) {
                    width: 94%;
                    margin: 20px 3%;
                }
            }
        }
    }
}


/* --- CONTEST DETAIL --- */
#contest-detail {
    .page__head { margin-bottom: 0; }
}
.contest-detail {
    &__info {
        display: flex;
        flex-direction: column;
        padding: 0;
        .block {
            display: flex;
            flex-direction: column;
            width: 100%;
            margin-bottom: 40px;
            &.contest-block {
                position: relative;
                background: rgba($grey, 0.2);
                .contest__draft {
                    position: absolute;
                    top: 0;
                    left: 0;
                    display: flex;
                    flex-direction: column;
                    @extend %flexCenterStart;
                    background: rgba($grey, 0.8);
                    @include size(100%,100%);
                    z-index: 10;
                    .draft__container {
                        display: block;
                        @include size(100%,0);
                        padding-bottom: 100%;
                        position: relative;
                        .draft-box {
                            position: absolute;
                            top: 0;
                            left: 0;
                            display: flex;
                            flex-direction: column;
                            @extend %flexCenterCenter;
                            @include size(100%,100%);
                        }
                        .contest__draft-label {
                            display: block;
                            background: $red;
                            width: 100%;
                            font-weight: $fBlack;
                            font-size: $f24;
                            color: $white;
                            padding: 6px 10px 4px;
                            text-align: center;
                            margin-bottom: 60px;
                        }
                        .btn {
                            width: auto;
                            white-space: nowrap;
                            font-size: $f12;
                            padding: 10px 30px;
                        }
                    }
                }
            }
        }
        .contest {
            position: relative;
            .plus-btn {
                position: absolute;
                top: 0;
                right: 0;
                display: block;
                background: $red;
                @include size(30px,30px);
                @extend %arrowClose;
                &:before,
                &:after {
                    background: $white;
                    @include size(60%, 3px);
                    border-radius: 5px;
                }
                &:before { transform: translate(-50%,-50%) rotate(0deg); }
                &:after { transform: translate(-50%,-50%) rotate(90deg); }
            }
            &__img {
                display: block;
                width: 100%;
                margin-bottom: 23px;
                img { width: 100%; }
            }
            &__info {
                display: flex;
                flex-direction: column;
                width: 100%;
                padding: 0 20px;
                text-align: center;
                &-title {
                    margin-bottom: 17;
                    text-align: center;
                    .title {
                        display: block;
                        width: 100%;
                        font-weight: $fBlack;
                        font-size: $f24;
                        text-align: center;
                    }
                    .client {
                        font-weight: $fBlack;
                        font-size: $f18;
                        small {
                            font-weight: $regular;
                            font-size: $f14;
                        }
                    }
                }
                &-subtitle { font-size: $f14; margin-bottom: 28px; }
                &-typeslist {
                    display: flex;
                    flex-direction: column;
                    margin: 20px 0;
                    .type {
                        display: flex;
                        @extend %flexCenterStart;
                        margin: 7px 0;
                        &--icon {
                            display: flex;
                            @extend %flexCenterCenter;
                            background: $red;
                            @include size($contestIconBox,$contestIconBox);
                            margin-right: 15px;
                            .icon {
                                @include size($contestIconSVG,$contestIconSVG);
                                fill: $white;
                            }
                        }
                    }
                }
                &-datalist {
                    display: block;
                    .data {
                        width: 50%;
                        font-weight: $fBlack;
                        text-align: center;
                        margin-top: 20px;
                        label { font-size: $f18; }
                        &.red { font-size: $f14; color: $red; }
                        &:nth-of-type(1) {
                            width: 100%;
                            label { font-size: $f24;}
                            .data.red { font-size: $f14; }
                        }
                        &:nth-of-type(2) { float: left; }
                        &:nth-of-type(3) { float: right; }

                    }
                }
            }
            &-status,
            &-entries {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                padding: 20px;
            }
            &-status {
                padding-bottom: 40px;
                &__ends, &__progress,
                &__timeleft { width: 100%; }
                &__ends {
                    display: flex;
                    align-items: baseline;
                    justify-content: center;
                    font-weight: $fBlack;
                    font-size: $f18;
                    text-align: center;
                    small { font-weight: $fBlack; }
                    .date { font-size: $f24; }
                }
                &__progress {
                    display: block;
                    margin: 20px 0;
                    .progressbar {
                        display: block;
                        background: $white;
                        @include size(100%, 30px);
                        position: relative;
                        &__status {
                            display: block;
                            display: block;
                            background: $red;
                            @include size(40%, 100%);
                        }
                        &__label {
                            position: absolute;
                            top: 100%;
                            left: 40%;
                            display: block;
                            color: $red;
                            font-size: $f14;
                            padding-top: 20px;
                            transform: translateX(-50%);
                            &:before,
                            &:after {
                                content: '';
                                position: absolute;
                                top: 0;
                                left: 50%;
                                transform: translateX(-50%,);
                            }
                            &:before {
                                background: $red;
                                @include size(2px,15px);
                            }
                            &:after {
                                top: 15px;
                                @include size(8px,8px);
                                border: 2px solid $red;
                                border-radius: 100%;
                            }
                        }
                    }
                }
                &__timeleft {
                    display: flex;
                    @extend %flexStartAround;
                    margin: 40px 0 0;
                    .time-block {
                        display: flex;
                        flex-wrap: wrap;
                        text-align: center;
                        .num {
                            width: 100%;
                            font-weight: $fBlack;
                            color: $red;
                        }
                        &.day {
                            width: 50%;
                            font-size: $f24;
                            small {
                                width: 100%;
                                font-size: $f14;
                                text-align: center;
                            }
                        }
                        &.time {
                            width: 50%;
                            display: flex;
                            flex-wrap: wrap;
                            font-size: $f24;
                            justify-content: space-between;
                            .num { width: 100%; }
                            small {
                                display: block;
                                font-size: $f14;
                                text-align: center;
                                padding: 0 5px;
                            }
                        }
                    }
                }
            }
            &-entries {
                .total-entries {
                    display: flex;
                    align-items: baseline;
                    font-weight: $fBlack;
                    font-size: $f24;
                    small { font-weight: $fBlack; font-size: $f18; }
                }
                .btn {
                    padding: 10px 40px;
                    margin-top: 20px;
                }
            }
        }
        .tags-block {
            display: block;

        }
    }
    &__description {
        padding-left: 20px;
        .text-block {
            display: block;
            font-family: $f14;
            margin-bottom: 50px;
            .main-title { font-family: $text; font-weight: $fBlack; font-size: $f24; }
            .btns-list {
                display: flex;
                @extend %flexCenterAround;
                margin: 40px 0 70px;
                .btn { font-size: $f12; }
            }
        }
    }
    @media (max-width: 1023px) {
        .contest {
            &-status {
                &__timeleft {
                    width: 100%;
                    flex-direction: column;
                    .time-block {
                        &.day, &.time { width: 100%; margin: 10px 0; }
                    }
                }
            }
        }
    }
    @media (max-width: 767px) {
        &__info {
            padding: 0 10px;
        }
        &__description {
            padding: 0 10px;
            .btns-list {
                flex-direction: column;
                .btn {
                    width: 100%;
                    margin: 10px 0;
                }
            }
        }
    }
}
