/* Course archive and filters, course categories (taxonomy), single course / product pages and their tabs. */

/* ------------------------------------------------------------------
   Course archive
   ------------------------------------------------------------------ */

.post-product.current-item,
.post-eb_course.current-item {
    text-transform: none;
}

.no-course-found h2 {
    padding: 30px 10px;
    font-weight: 600;
    color: var(--sc-text);
    line-height: 1.3;
    max-width: 500px;
    margin: 0 auto;
}

.post-type-archive-eb_course,
.tax-eb_course_cat {
    #pagination {
        text-align: center;
    }
}

.post-type-archive-eb_course {
    .container-wrap {
        padding-bottom: 120px;
        background-color: var(--sc-white);
    }

    #pagination {
        margin-top: 60px;
    }
}

#browsecourse {
    .select-wrapper {
        display: inline-block;
        width: 100%;
        max-width: 250px;
        margin-right: 10px;
        margin-bottom: 15px !important;
        position: relative;

        &:nth-child(2) {
            max-width: 310px;
        }

        &::after {
            content: "\f107";
            font-family: var(--sc-font-icons);
            font-weight: 600;
            font-size: 2rem;
            color: var(--sc-grey800);
            position: absolute;
            right: 10px;
            bottom: 25px;
            cursor: pointer;
        }

        select {
            padding: 25px 40px 25px 20px;
            border-radius: 7px;
            font-size: 1.2em;
            font-weight: 600;
            cursor: pointer;
            appearance: none;
        }
    }

    a.browse {
        @media (max-width: 600px) {
            padding: 25px 55px 25px 25px;
        }
    }
}

#upcoming {
    .col h3 {
        font-family: Georgia, serif !important;
    }

    a.viewall {
        border: 1px solid var(--sc-white);
        color: var(--sc-white);

        &:hover {
            color: var(--sc-orange700);
            background-color: var(--sc-white);

            .arrow {
                background-image: url("../images/icons/orange/PwC_icon_arrow-right_rgb_orange.svg");
            }
        }

        .arrow {
            background-image: url("../images/icons/white/PwC_icon_arrow-right_rgb_white.svg");
        }
    }
}

/* ------------------------------------------------------------------
   Filters sidebar
   ------------------------------------------------------------------ */

.search-form-icon {
    position: relative;
    padding-right: 45px;
    background-color: var(--sc-grey100);

    span {
        position: absolute;
        right: 15px;
        font-size: 25px;
        top: 50%;
        transform: translateY(-50%);
    }
}

.filter-block,
#sidebar > div.filter-block {
    margin-bottom: 25px;
    padding: 10px;
    border-radius: 5px;
    transition: all ease 0.3s;
}

.filter-block li,
#sidebar .filter-block li {
    list-style: none;
    padding: 5px 0;
    border-bottom: 0;
}

.filter-block {
    h5 {
        color: var(--sc-text);
        margin-bottom: 15px;
        border-bottom: 1px solid var(--sc-grey200);
        padding: 15px 0px;
        font-family: var(--sc-font-serif) !important;
        position: relative;
        cursor: pointer;

        &::before {
            content: "\f107";
            font-family: var(--sc-font-icons);
            font-size: 25px;
            height: 20px;
            width: 20px;
            display: block;
            background-size: contain;
            background-position: center;
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            transition: all 0.5s ease;
        }
    }

    ul {
        overflow-y: hidden;
        margin-bottom: 0;
        transition: all 0.5s ease;
        max-height: 0;
    }

    li {
        a {
            font-size: 14px;
            font-weight: 400;
            color: var(--sc-text);
        }

        a.selected {
            font-weight: 600;
            display: block;
            position: relative;

            &::after {
                content: "\f00d";
                font-family: var(--sc-font-icons);
                position: absolute;
                right: 20px;
                vertical-align: middle;
            }
        }
    }

    &.active-filter {
        background-color: rgba(111, 108, 108, 0.03);

        h5,
        li a {
            color: var(--sc-accent);
        }
    }
}

/* ------------------------------------------------------------------
   Sort-by dropdown
   ------------------------------------------------------------------ */

.sort-option-wrapper {
    position: relative;
    display: inline-block;
    padding: 0 5px;
    padding-left: 10px;
    border: 1px solid var(--sc-grey300);
}

.sort-by {
    display: inline-block;
    min-width: 140px;
    padding: 5px 0px;
    padding-right: 30px;

    &::after {
        content: "\f107";
        font-family: var(--sc-font-icons);
        font-size: 22px;
        height: 20px;
        width: 20px;
        display: block;
        background-size: contain;
        background-position: center;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

    p {
        padding-bottom: 0;
        text-align: left;
        font-size: 0.8rem;
        color: var(--sc-accent);
    }

    ul {
        width: calc(100% + 2px);
        margin: 0;
        opacity: 0;
        position: absolute;
        left: -1px;
        top: 100%;
        padding-top: 1px;
        z-index: 15;
        border: 1px solid var(--sc-grey300);
    }

    &:hover ul {
        opacity: 1;
    }

    li {
        list-style: none;
        padding: 0 10px;
        background-color: var(--sc-white);
        text-align: left;

        a {
            font-size: 0.8rem;
            color: var(--sc-text);

            &:hover {
                color: var(--sc-accent);
            }
        }
    }
}

/* ------------------------------------------------------------------
   Course cards
   ------------------------------------------------------------------ */

.courses-listing {
    margin-left: -20px;
    margin-right: -20px;
}

.course-block {
    width: 33.33%;
    display: inline-block;
    padding-right: 20px;
    padding-left: 20px;
    margin-bottom: 30px;
    margin-left: -1.5px;
    margin-right: -1.5px;
    vertical-align: top;

    @media (max-width: 600px) {
        width: 100%;
    }

    .image {
        padding-top: 60%;
        background-position: center;
        background-size: cover;
        background-color: var(--sc-dark);
    }

    .content {
        padding: 15px;
        background-color: var(--sc-white);

        p,
        a {
            font-size: 14px;
        }

        .price-type,
        a {
            font-weight: 400;
        }

        p {
            padding-bottom: 15px;
        }

        .title {
            width: 100%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 600;
        }

        .price-type {
            text-transform: capitalize;
            color: var(--sc-grey700);
        }

        a i {
            margin-left: 10px;
        }

        .date {
            background-color: var(--sc-accent);
            padding: 10px 15px;
            max-width: 125px;
            margin-top: -35px;
            margin-bottom: 15px;

            p {
                padding-bottom: 0;
                text-transform: uppercase;
                color: rgba(255, 255, 255, 0.8);
                font-weight: 600;
                font-size: 12px;
                line-height: 12px;
                letter-spacing: 1px;
            }

            .value {
                font-size: 16px;
                color: var(--sc-white);
                text-transform: none;
                margin-top: 4px;
                letter-spacing: 0;
            }
        }
    }
}

.course-wrapper {
    box-shadow: 5px 8px 12px 0px rgba(0, 0, 0, 0.23);
    transition: all ease 0.3s;

    &:hover {
        transform: translateY(-10px);
    }
}

/* ------------------------------------------------------------------
   Pagination and body-level overrides
   ------------------------------------------------------------------ */

/* Nested under body on purpose: the extra weight is needed to win over Salient / WooCommerce rules. */
body {
    div#pagination {
        & > span.page-numbers.current {
            position: relative;
            background-color: transparent !important;
            color: var(--sc-grey800) !important;
            box-shadow: none;
            margin: 0 !important;

            &::after {
                content: "";
                width: 20px;
                padding-top: 2px;
                display: block;
                background-color: var(--sc-grey800);
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                margin: 0 auto;
            }
        }

        a.next.page-numbers,
        a.prev.page-numbers {
            font-size: 0 !important;
            height: 40px;
            width: 40px;
            border: 1px solid var(--sc-grey300);
            border-radius: 50%;

            &::before {
                font-family: var(--sc-font-icons);
                content: "\f105";
                font-size: 20px;
                position: relative;
                bottom: -2px;
                left: 0px;
            }

            &:hover {
                background-color: var(--sc-accent) !important;
            }

            &:hover::before {
                color: var(--sc-white);
            }
        }

        a.prev.page-numbers::before {
            content: "\f104";
            left: -2px;
        }
    }

    &[data-form-submit="regular"] .container-wrap button[type="submit"] {
        padding: 20px 25px 20px 25px !important;
        color: var(--sc-text);
    }

    &.woocommerce-page {
        div.product div.summary {
            float: left;
            width: 45%;

            @media (max-width: 999px) {
                width: 100%;
            }
        }

        button[type="submit"].single_add_to_cart_button {
            margin-top: 0;
        }

        .course-meta-list {
            @media (max-width: 999px) {
                .col {
                    width: 49%;
                }
            }

            @media (max-width: 768px) {
                &::before,
                &::after {
                    content: "";
                    height: 1px;
                    width: 100%;
                    background-color: var(--sc-grey200);
                    display: inline-block;
                    position: relative;
                }

                &::before {
                    bottom: 15px;
                }

                &::after {
                    top: 0;
                }
            }

            @media (max-width: 600px) {
                .col .meta-block {
                    padding-left: 50px;
                }
            }
        }
    }
}

/* ------------------------------------------------------------------
   Course categories (taxonomy pages)
   ------------------------------------------------------------------ */

.tax-eb_course_cat h2 {
    font-size: 40px;

    @media (max-width: 600px) {
        font-size: 30px;

        &.special-heading {
            margin-bottom: 35px;
        }
    }
}

.category-posts-section {
    background-color: var(--sc-grey50);
    padding-top: 60px;
    padding-bottom: 60px;

    h2 {
        margin-bottom: 80px;
    }

    .container {
        max-width: 1200px;
    }

    .col {
        @media (max-width: 1024px) {
            padding-left: 15px;
            padding-right: 15px;
        }
    }

    .course-block {
        @media (max-width: 690px) {
            width: 50%;
        }

        @media (max-width: 425px) {
            width: 100%;
            display: block;
            max-width: 320px;
            margin-right: auto;
            margin-left: auto;
        }
    }
}

.category-content {
    margin-bottom: 60px;

    & > div:not(:last-child) {
        margin-bottom: 50px;
    }
}

.category-image-section {
    .image {
        padding-top: 30%;
        background-size: cover;
        background-position: center;

        @media (max-width: 999px) {
            padding-top: 45%;
        }

        @media (max-width: 690px) {
            padding-top: 60% !important;
        }

        @media (max-width: 600px) {
            padding-top: 133%;
            min-height: 250px;
        }
    }

    .container {
        position: relative;
        margin-bottom: 120px;

        @media (max-width: 425px) {
            margin-bottom: 100px;
        }
    }

    .title {
        position: absolute;
        max-width: 700px;
        width: 100%;
        padding: 45px 70px 30px;
        background-color: var(--sc-color2);
        opacity: 1;
        bottom: 100%;
        margin-bottom: -60px;
        right: 95px;

        @media (max-width: 999px) {
            position: initial;
            margin-top: -150px;
            padding: 25px 40px 20px;
        }

        @media (max-width: 600px) {
            right: -20px;
            margin-top: -80px;
            padding: 25px 25px 20px;
        }

        @media (max-width: 425px) {
            margin-top: -55px;
        }

        img {
            max-width: 45px;
            margin-bottom: 20px;
        }
    }

    h1 {
        font-weight: 400;
        margin-bottom: 20px;
        line-height: 1.1;
    }

    h2 {
        font-family: var(--sc-font-sans);
        margin-bottom: 15px;
        line-height: 1;
    }

    h2,
    p {
        font-weight: 400;
    }

    p {
        line-height: 1.1;

        @media (max-width: 600px) {
            font-size: 14px;
        }
    }
}

/* ------------------------------------------------------------------
   Single course / product page
   ------------------------------------------------------------------ */

.single-product {
    .container-wrap {
        background-color: var(--sc-white);
        padding-top: 65px;

        @media (max-width: 600px) {
            padding-top: 80px;
        }
    }

    .woocommerce-variation.single_variation {
        position: absolute;
        right: -10em;
        top: 50%;
    }
}

.single-product div.product h1.product_title,
h1.course-title {
    font-size: 41px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 30px;
}

.single-product-main-image {
    float: right;
    width: 50%;
    margin-right: 0;

    @media (max-width: 1439px) {
        text-align: center;
    }

    @media (max-width: 999px) {
        width: 100%;
    }

    div.clear {
        padding-bottom: 0;
    }
}

.single-product-main-image .course-image,
.single-eb_course .course-image {
    padding-top: 50%;
    margin-bottom: 10px;
    background-color: var(--sc-dark);
    background-size: cover;
    background-position: center;
}

.course-image-wrapper {
    width: 50%;

    @media (max-width: 600px) {
        width: 100%;
    }
}

.course-details {
    width: 45%;

    @media (max-width: 600px) {
        width: 100%;
        margin-top: 50px;
    }
}

.course-description {
    max-width: 1000px;

    &.mt-50 {
        @media (max-width: 600px) {
            margin-top: 0;
        }
    }
}

/* Course meta (date, time, CPE, …) with an icon in front */
.meta-block {
    padding-left: 60px;
    position: relative;
    min-height: 40px;

    &::before {
        content: "";
        height: 35px;
        width: 35px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        position: absolute;
        left: -5px;
        top: 0;
    }

    &.date::before {
        background-image: url("../images/icons/orange/PwC_icon_calendar_rgb_orange.svg");
    }

    &.time::before {
        background-image: url("../images/icons/orange/PwC_icon_clock_rgb_orange.svg");
    }

    &.cpe::before {
        background-image: url("../images/icons/orange/PwC_icon_document-draft_rgb_orange.svg");
    }

    &.competency::before {
        background-image: url("../images/icons/orange/PwC_icon_briefcase_rgb_orange.svg");
    }

    &.location::before {
        background-image: url("../images/icons/orange/PwC_icon_location_rgb_orange.svg");
    }

    &.fee::before {
        background-image: url("../images/fee.png");
    }

    .title {
        padding-bottom: 5px;
        font-weight: 600;
    }
}

/* Buy / wishlist / take-course buttons */
.yith-wcwl-add-button a,
body.woocommerce-page button[type="submit"].single_add_to_cart_button,
body[data-form-submit="regular"].woocommerce-page .container-wrap button[type="submit"].single_add_to_cart_button,
a.take-course {
    width: 100%;
    display: block;
    font-size: 18px;
    text-transform: capitalize;
    color: var(--sc-white);
    background-color: var(--sc-accent) !important;
    line-height: 1;
    padding: 17px !important;
    text-align: center;
    border-radius: 0;
    font-weight: 500;
    font-family: var(--sc-font-sans);

    @media (max-width: 999px) {
        font-size: 12px;
    }
}

.woocommerce div.product {
    p.price,
    span.price,
    p.stock {
        color: var(--sc-success);
        font-size: 18px;
    }

    p.stock {
        text-transform: uppercase;
        font-weight: bold;
        margin: 10px 0;

        &.out-of-stock {
            color: var(--sc-error) !important;
        }
    }
}

.course-requirements {
    &.desktop {
        @media (max-width: 600px) {
            display: none;
        }
    }

    &.mobile {
        display: none;

        @media (max-width: 600px) {
            display: block;
        }
    }

    ul {
        margin-left: 0;
    }

    li {
        list-style: none;
        position: relative;
        padding-left: 20px;
        margin-bottom: 5px;
        color: var(--sc-text);

        &::before {
            content: "";
            height: 6px;
            width: 6px;
            display: block;
            position: absolute;
            background-color: var(--sc-accent);
            left: 0;
            top: 50%;
            transform: translateY(-50%);
        }
    }

    .tab button {
        @media (min-width: 767px) {
            width: 20%;
            font-size: 18px;
        }
    }
}

/* Tabs (description, requirements, lecturer, …) */
.tab {
    overflow: hidden;
    border: 0;
    background-color: transparent;
    padding: 0 10px;
    position: relative;

    @media (max-width: 600px) {
        padding: 0;
    }

    &::before {
        content: "";
        width: 100%;
        padding-bottom: 6px;
        display: block;
        background-color: var(--sc-grey200);
        position: absolute;
        bottom: 0;
        left: 0;
    }

    button {
        width: 25%;
        background-color: inherit;
        float: left;
        border: none;
        outline: none;
        cursor: pointer;
        padding: 14px 16px;
        transition: 0.3s;
        position: relative;
        font-family: var(--sc-font-serif);
        font-size: 20px;

        @media (max-width: 600px) {
            text-align: left;
            width: 100%;
            padding: 15px 0;
        }

        &::after {
            content: "";
            width: 100%;
            padding-top: 6px;
            position: absolute;
            bottom: 0;
            left: 0;
            background-color: transparent;

            @media (max-width: 600px) {
                content: "\f107";
                font-family: var(--sc-font-icons);
                font-weight: normal;
                font-style: normal;
                font-size: 18px;
                bottom: unset;
                left: 90%;
                transition: all ease 0.3s;
            }
        }

        &:hover {
            background-color: var(--sc-grey200);

            @media (max-width: 768px) {
                background-color: unset;
            }
        }

        &.active {
            color: var(--sc-accent);

            &::after {
                background-color: var(--sc-accent);

                @media (max-width: 768px) {
                    background-color: unset;
                }

                @media (max-width: 600px) {
                    transform: rotateX(180deg);
                }
            }
        }
    }

    @media (max-width: 600px) {
        &::before,
        button::after,
        button.active::after,
        button:hover {
            background-color: unset;
        }
    }
}

.tabcontent {
    display: none;
    padding: 20px 12px;
    border: 0;
    border-top: none;
}

.lecturer {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 5px 15px 15px 0px rgba(0, 0, 0, 0.1);

    .image {
        width: 20%;
        background-position: center;
        background-size: cover;

        @media (max-width: 999px) {
            width: 40%;
        }
    }

    .description {
        width: 80%;
        padding: 30px;
        min-height: 200px;

        @media (max-width: 999px) {
            width: 60%;
        }
    }

    .title {
        font-weight: 600;
        padding-bottom: 10px;
    }
}

.related-courses {
    padding: 50px 0;
    background-color: var(--sc-grey50);

    @media (max-width: 600px) {
        margin: 0;
    }

    .container {
        max-width: 1350px;
    }
}

/* ------------------------------------------------------------------
   Edwiser Bridge "My courses"
   ------------------------------------------------------------------ */

.eb-my-courses-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 100px;
}

.eb-my-courses-wrapper,
.eb-rec-courses-wrapper {
    .eb_course_cards_wrap .eb-course-card {
        flex: 1 1 auto;
        max-width: 33.33%;

        @media (max-width: 768px) {
            max-width: 100%;
        }
    }
}

.eb-my-course.eb_course_cards_wrap {
    gap: 5px;
}

.eb-course-title.eb-course-card-title {
    color: var(--sc-text);
}

.eb-course-action-btn-start {
    background-color: var(--sc-accent);
}

.bridge-woo-courses {
    display: none !important;
}
