@import "vars";

#contest-calendar {
    border-collapse: collapse;
    width: 100%;

    th {
        border: 1px solid $color_primary25;
        background: $color_primary5;
    }

    td {
        height: 110px;
        width: 170px;
        vertical-align: top;
        border: 1px solid $color_primary25;
        transition-duration: 0.2s;

        .num {
            text-align: right;
            font-weight: bold;
            display: block;
            border-bottom: 1px dashed $color_primary25;
            padding-right: 0.2em;
            margin-bottom: 0.4em;
        }

        ul {
            font-size: 0.75em;
            padding: 0;
            margin: 0;

            li {
                margin: 0 0 0.2em 17px;

                i.fa {
                    color: $color_link200;
                }

                a {
                    color: $color_primary75;

                    &:hover {
                        text-decoration: underline;
                    }
                }
            }
        }

        &:hover {
            background: rgba($color_link100, 0.2);
        }
    }

    .noday {
        background: $color_primary10;
    }

    .today {
        background: rgba($color_link200, 0.2);
    }
}

#banner {
    border-bottom: 1px solid $color_primary25;
    padding-bottom: 1em;
    color: $color_primary75;
    font-size: $base_font_size;

    a.date {
        display: block;
        text-decoration: none;
        text-align: center;
        line-height: 1.3;
        font-size: 2.3em;
        padding-bottom: 0.15em;
        color: $color_link50;

        &:hover {
            color: $color_link100;
        }

        &:active {
            color: $color_link200;
        }
    }

    #time {
        text-align: center;
        display: block;
    }

    div#details ul {
        margin-bottom: 0;
        list-style: none;
        p {
            margin: 0;
        }
    }
}

.top-pagination-bar {
    justify-content: space-between;
}

.contest-list {
    td {
        vertical-align: middle !important;

        &:nth-child(2) {
            min-width: 4em;
        }

        &:nth-child(3) {
            min-width: 6em;
        }
    }

    tbody tr {
        height: 4em;
    }

    .time-left {
        text-align: left;
        color: $color_primary50;
        padding-top: 0.5em;
    }

    .contest-tags {
        padding-left: 0.75em;
        vertical-align: top;
    }

    .participate-button {
        display: inline-block;
        width: 90px;
    }

    .contest-block {
        text-align: left;
        padding: 0.5em 0.5em 0.5em 1em;
    }

    a.contest-sort-link {
        color: $color_primary0;
    }
}

.contest-tag {
    box-shadow: inset 0 -0.1em 0 rgba(0, 0, 0, 0.12);
    padding: 0.15em 0.3em;
    border-radius: 0.15em;
    font-weight: 600;
    margin-right: 0.45em;
    position: relative;
}

.contest-list-title {
    font-size: 18px;
    font-weight: 600;
}

form.contest-join-pseudotab {
    display: inline;
    padding: 6px 8px !important;
    line-height: 1.7em;
    margin-left: 0.5em;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    input {
        display: inline;
        border: none;
        padding: 0;
        background: none;
        font-weight: 600;
    }
}

.contest-participation-operation {
    float: right;
    display: flex;

    .fa {
        color: $color_primary75;
    }

    a + a {
        padding-left: 1px;
    }

    padding: 0 5px;
}

#ranking-table {
    font-size: 14px;

    .user-name {
        min-width: 20em;
        position: relative;
    }

    .userinfo a, .user-name a, .user-name form {
        display: inline-block !important;
    }

    .rating-column {
        min-width: 3em;
    }

    td {
        height: 2.5em;
    }

    td:not(.user-name, .personal-info) a:hover {
        text-decoration: underline;
    }

    a {
        display: block;
    }

    /* Make problem table headers green on hover */
    th a:hover {
        color: #0F0;
    }

    th a, th a:link, th a:visited {
        color: $color_primary0;
    }

    .rank {
        min-width: 2.4em
    }

    .points {
        min-width: 2.4em;
    }

    .disqualified {
        background-color: $color_contest_ranking_disqualified !important;
    }

    .point-denominator {
        border-top: 1px solid $color_primary50;
        font-size: 0.7em;
    }

    .start-time {
        display: none;
    }

    .personal-info {
        display: none;
    }

    .virtual-participation {
        color: grey;
        float: right
    }

    .user-points, .user-points a {
        color: $color_primary100;
    }
}

#org-dropdown-check-list {
    display: inline-block;
}

#org-check-list-wrapper {
    display: none;
    background: $color_primary0;
    border: 1px solid gray;
    padding: 10px;

    right: auto;
    position: absolute;
    z-index: 1;

    button {
        margin-bottom: 5px;
        margin-left: 5px;
    }

    #org-check-list {
        border-bottom: 1px solid gray;
        color: $color_primary100;
        text-align: left;
        font-weight: normal;

        li {
            list-style: none;
        }
    }

    .select2-selection__rendered {
        width: 260px !important;
    }
}
