/******************************* Styling for main forum page *************************/

:root {
    --ovt-md-grey: #7a7a7a;
    --ovt-xl-grey: #f2f2f2;
    --ovt-m-grey: #ebecef;
}

.ovt-forums,
.ovt-forum__topics-body {
    display: flex;
    flex-direction: column;
    row-gap: 1.25rem;
}

.ovt-forums__item {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 2fr;
    align-items: center;

    background-color: var(--ovt-xl-grey);
    padding-inline: 3rem;
    border-radius: 10px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
    min-height: 5rem;
    transition: background-color 0.2s ease-in-out;
}

div.ovt-forums__item a.ovt-forums__link,
div.ovt-forum__topic-title a.ovt-forum__topic-link {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
    font-weight: 400;
    line-height: 1.25rem;
    color: var(--ovt-primary--700);
    margin-bottom: -0.25rem;
}

.ovt-forums__item:has(a.ovt-forums__link:hover),
.ovt-forum__topic:has(a.ovt-forum__topic-link:hover) {
    background-color: var(--ovt-primary--200);
}

div.ovt-forums__freshness,
.ovt-forum__topic-freshness {
    display: flex;
    flex-direction: column;
    align-items: center;
}

span.ovt-forums__topic-count,
span.ovt-forums__reply-count {
    font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
    line-height: 1.1em;
    color: var(--ovt-md-grey);
    margin-bottom: -0.25rem;
}

span.ovt-forums__fresh-author {
    color: var(--ovt-dark-grey);
}

span.ovt-forums__fresh-date {
    color: var(--ovt-md-grey);
    font-size: 1rem;
    text-align: center;
}

@media screen and (max-width: 48em) {
    .ovt-forums__item {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        padding: 1.5rem;
        row-gap: 0.5rem;
    }

    a.ovt-forums__link {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .ovt-forums__topic-count {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .ovt-forums__freshness {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }
}

/******************************* Styling for single forum template *************************/

.ovt-forum__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#bbpress-forums div.ovt-forum__nav div.ovt-forum__search {
    width: auto;
}

.ovt-forum__nav input.button[type='submit'] {
    background-color: var(--ovt-primary);
    border: 2px solid var(--ovt-primary);
}

.ovt-forum__nav input.button[type='submit']:hover {
    background-color: transparent;
    color: var(--ovt-primary);
}

@media screen and (max-width: 48em) {
    .ovt-forum__nav {
        flex-direction: column;
    }
}

span.ovt-forum__parent {
    font-size: clamp(1.8rem, 1rem + 1.7vw, 2.5rem);
    color: var(--ovt-orange);
}

.ovt-forum__wrapper {
    font-family: 'Hind';
    padding-block: 4rem;
    padding-inline: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ovt-forum__breadcrumb,
.ovt-forum__breadcrumb a {
    font-family: 'Hind';
    color: var(--ovt-primary--700);
    font-size: 1rem;
    text-decoration: none !important;
    line-height: 1.5em;
}

#bbpress-forums #subscription-toggle {
    float: none !important;
}

.ovt-forum__meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    font-size: 1rem;
    line-height: 1.25em;
}

.ovt-forum__meta #subscription-toggle {
    float: none;
    clear: both;
}

.ovt-forum__follow-links a {
    display: flex;
    gap: 0.5rem;
    color: var(--ovt-primary) !important;
}

@media screen and (max-width: 48em) {
    .ovt-forum__meta {
        flex-direction: column;
        gap: 0.5rem;
        padding-block-end: 1rem;
    }

    .ovt-forum__breadcrumb {
        text-align: center;
    }

    .ovt-forum__follow-links {
        justify-content: center;
    }
}

.ovt-forum__topic {
    display: grid;
    grid-template-columns: 3fr repeat(2, 1fr) 2fr;
    align-items: center;

    background-color: var(--ovt-xl-grey);
    padding-inline: 3rem;
    border-radius: 10px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
    min-height: 5rem;
    transition: background-color 0.2s ease-in-out;
}

/* Some styling for the topic title is set above in the forum template section */
.ovt-forum__topic-title {
    display: flex;
    flex-direction: column;
    row-gap: 0.75rem;
    justify-content: center;
}

div.ovt-forum__topic-title a.ovt-forum__topic-link {
    font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
}

#bbpress-forums p.bbp-topic-meta.ovt-forum__topic-meta,
.ovt-forum__topic-voice-count,
.ovt-forum__topic-replies {
    font-size: 1rem;
    margin: 0;
}

.ovt-forum__topic-freshness {
    gap: 0.25rem;
}

.ovt-forum__topic-freshness-author {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 0.25rem;
}

.ovt-forum__topic-freshness .ovt-forum__topic-freshness-author img {
    width: 1.5rem;
    height: 1.5prem;
    max-height: 1.5rem;
    max-width: 1.5rem;
    border: none;
    border-radius: 50px;
}

.ovt-forum__topic-freshness-author-name,
.ovt-forum__topic-freshness-date {
    font-size: clamp(1.1rem, 1rem + 0.1vw, 1.125rem);
    margin-block-end: -0.15em;
}

.ovt-forum__topic-freshness-date {
    color: var(--ovt-md-grey);
}

#bbpress-forums .ovt-forum__pagination {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#bbpress-forums .ovt-forum__pagination .ovt-forum__pagination-count,
#bbpress-forums .ovt-forum__pagination .ovt-forum__pagination-links {
    float: none;
    clear: both;
}

#bbpress-forums .ovt-forum__pagination,
#bbpress-forums .ovt-forum__pagination-links.bbp-pagination-links span.current,
#bbpress-forums .ovt-forum__pagination-links a.page-numbers {
    font-size: 1rem;
    border: none;
    background-color: transparent;
    transition: all 0.4s;
    padding: 0.25rem;
}

#bbpress-forums .ovt-forum__pagination-links a.page-numbers {
    color: var(--ovt-primary);
}

#bbpress-forums .ovt-forum__pagination-links a.page-numbers:hover {
    border: none;
    background-color: var(--ovt-primary--700);
    color: var(--ovt-primary);
}

.ovt-forum__form {
    background-color: var(--ovt-primary--200);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0px 4px 4px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#bbpress-forums .ovt-forum__form fieldset.bbp-form {
    font-size: 1rem;
    color: var(--ovt-primary--700);
    padding: 0;
    border: none;
    margin: 0;
}

.ovt-forum__form fieldset legend {
    font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
    color: var(--ovt-primary--700);
}

.ovt-forum__form .bbp-template-notice {
    background-color: var(--ovt-m-grey);
    border: none;
    color: var(--ovt-primary);
    padding: 0.1rem 1rem;
}

div.ovt-forum__form ul li {
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 0.3em !important;
}

#bbpress-forums
    .ovt-forum__form
    fieldset
    textarea.bbp-the-content.wp-editor-area {
    font-size: 1rem;
    padding-block: 1rem;
}

#bbpress-forums .ovt-forum__form fieldset input#bbp_topic_title,
#bbpress-forums .ovt-forum__form fieldset select.bbp_dropdown {
    height: 2.5rem;
}

#bbpress-forums .ovt-forum__form p:has(input#bbp-topic-subscription) {
    display: flex;
    gap: 0.5rem;
}

@media screen and (max-width: 48em) {
    .ovt-forum__topic {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
        row-gap: 0.75rem;
    }

    .ovt-forum__topic-title {
        grid-column: 1 / -1;
    }

    .ovt-forum__topic-freshness {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    #bbpress-forums .ovt-forum__pagination {
        flex-direction: column;
        row-gap: 1rem;
    }

    #bbpress-forums
        .ovt-forum__pagination-links.bbp-pagination-links
        span.current,
    #bbpress-forums .ovt-forum__pagination-links a.page-numbers {
        font-size: 1.25rem;
        padding-inline: 0.75rem;
    }

    .ovt-forum__form {
        padding: 1.5rem;
    }

    #bbpress-forums .ovt-forum__form fieldset.bbp-form {
        min-inline-size: auto;
    }

    div:has(.mce-widget.mce-btn) {
        display: flex;
        flex-wrap: wrap;
    }
}

/******************************* Styling for topic page *************************/

body:has(.ovt-topic__wrapper) {
    background-color: #fafbfd;
}

.ovt-topic__wrapper {
    margin-block-start: 2rem;
}

@media screen and (max-width: 48em) {
    .ovt-topic__wrapper {
        margin-block-start: 0rem;
        padding-inline: 1rem;
    }
}

.ovt-topic__follow-links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.ovt-forum__meta.ovt-forum__meta--topic {
    margin-block-end: 1rem;
}

.ovt-forum__meta #subscription-toggle a {
    text-decoration: none;
}

.ovt-topic__lead {
    background-color: var(--ovt-m-grey);
    border-radius: 10px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    padding: 2rem 2rem 1.75rem;
    margin-block-end: 2rem;
}

#bbpress-forums .ovt-topic__lead-header h1 {
    color: var(--ovt-primary--700);
    font-family: 'Hind';
    font-weight: 400;
    line-height: 1.3em;
    font-size: clamp(1.75rem, 1rem + 1.1vw, 2rem);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ovt-dark-grey);
}

.ovt-topic__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;

    color: var(--ovt-dark-grey);
    font-size: 1rem;
    font-family: 'Hind';
}

.ovt-topic__meta-author {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.ovt-topic__meta-author img {
    border-radius: 50px;
}

#bbpress-forums .ovt-topic__lead-body div:has(.ovt-topic__content) {
    background-color: transparent;
    margin-block: 0.75rem 2rem;
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
    font-family: 'Hind';
    line-height: 1.4em;
    color: var(--ovt-dark-grey);
}

.ovt-topic__lead-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    font-family: 'Hind';
    font-size: 1rem;
}

.ovt-topic__reply-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ovt-primary--700) !important;
    font-weight: 500;
}

@media screen and (max-width: 48em) {
    .ovt-topic__lead-footer {
        flex-direction: column;
        align-items: flex-start;
        row-gap: 1rem;
    }
}

span.bbp-admin-links {
    float: none;
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
}

#bbpress-forums span.bbp-admin-links a {
    color: #fff;
    background-color: var(--ovt-primary);
    padding: 0.25rem;
    font-size: 0.9rem;
    text-transform: capitalize;
    border-radius: 4px;
    margin-inline: 0;
    border: 2px solid var(--ovt-primary);
    transition: all 0.2s;
}

#bbpress-forums span.bbp-admin-links a:hover {
    color: var(--ovt-primary);
    background-color: transparent;
}

.ovt-topic__replies {
    width: 100%;
}

.ovt-topic__replies .ovt-forum__pagination-count {
    font-weight: 600;
    font-size: clamp(1.1rem, 1rem + 0.1vw, 1.125rem);
    margin-block-end: 1rem;
}

.ovt-topic__replies-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ovt-topic__reply {
    background-color: var(--ovt-m-grey);
    border-radius: 10px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.ovt-topic__reply-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ovt-topic__reply-meta {
    display: flex;
    gap: 1rem;
    font-size: 1rem;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.ovt-topic__reply-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ovt-topic__reply-meta img {
    border-radius: 50px;
}

.ovt-topic__reply-date {
    max-width: 75%;
}

.ovt-topic__reply-content {
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
    font-family: 'Hind';
    line-height: 1.4em;
    color: var(--ovt-dark-grey);
}

.ovt-topic__replies .ovt-forum__pagination {
    margin-block-start: 1rem;
}

.bbp-topic-revision-log-item {
    font-size: 1rem;
}

@media screen and (max-width: 48em) {
    .ovt-topic__reply-body {
        flex-direction: column;
        align-items: flex-start;
        row-gap: 1rem;
    }

    .ovt-topic__reply-meta {
        max-width: 100%;
        flex-direction: row;
        align-items: center;
    }
}

.ovt-forum__form .mce-toolbar .mce-btn button {
    background-color: var(--ovt-m-grey);
    border: none;
}

/******************** Styling for forms ************************/

div.bbp-template-notice.info.ovt-forum__form-notice {
    background-color: var(--ovt-xl-grey);
    color: #000;
}

.ovt-forum__form div.bbp-template-notice.error {
    background-color: var(--ovt-orange);
    color: #fff;
}

.ovt-forum__form
    .bbp-submit-wrapper
    button#bbp_reply_submit.button[type='submit'],
.ovt-form__submit-wrapper button.button[type='submit'] {
    background-color: var(--ovt-primary);
    border: 2px solid var(--ovt-primary);

    &:hover {
        background-color: transparent;
        color: var(--ovt-primary);
    }
}

/* .ovt-forum__form
    .bbp-submit-wrapper
    button#bbp_reply_submit.button[type='submit']:hover,
.ovt-form__submit-wrapper button.button[type='submit']:hover {
    background-color: transparent;
    color: var(--ovt-primary);
} */
/******************* Styling for search page and forms ************/

body:has(.ovt-forum__search) {
    background-color: #fafbfd;
}

body:has(.ovt-forum__search) main#content {
    margin-block-start: 4rem;
}

@media screen and (max-width: 48em) {
    body:has(.ovt-forum__search) main#content {
        margin-block-start: 1rem;
    }

    body:has(.ovt-forum__search) main#content h1 {
        padding-inline: 2rem;
    }

    .ovt-forum__search-wrapper {
        padding-inline: 2rem;
    }
}

#bbpress-forums div.bbp-search-form.ovt-forum__search {
    float: none;
    clear: both;
    align-self: end;
    width: 100%;
}

body:has(.ovt-forum__search) main#content h1 {
    color: var(--ovt-primary--700);
    font-family: 'Hind';
    font-weight: 400;
    line-height: 1.3em;
    font-size: clamp(1.75rem, 1rem + 1.1vw, 2rem);
}

body:has(.ovt-forum__search) main#content .ovt-forum__wrapper {
    padding: 0;
    margin-bottom: 4rem;
}

.ovt-forum__search form div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ovt-forum__search form div input[type='text'] {
    flex: 1;
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
    font-family: 'Hind';
    padding-bottom: 0.3rem;
}

.ovt-forum__search-body {
    display: flex;
    flex-direction: column;
    row-gap: 1.25rem;
}

.ovt-forum__search-result {
    background-color: var(--ovt-xl-grey);
    border-radius: 10px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    padding: 1rem;
}

#bbpress-forums div.bbp-reply-header.ovt-search__header,
#bbpress-forums div.bbp-forum-header.ovt-search__header,
#bbpress-forums div.bbp-topic-header.ovt-search__header {
    padding: 0;
    background: none;
    border: none;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
    font-weight: 400;
    font-family: 'Hind';
    color: var(--ovt-primary--700);
}

#bbpress-forums div.bbp-reply-header.ovt-search__header,
#bbpress-forums div.bbp-topic-header.ovt-search__header {
    border-bottom: 1px solid var(--ovt-grey--dark);
    padding-bottom: 0.75rem;
}

#bbpress-forums .ovt-search__header h3 {
    margin: 0;
    font-size: clamp(1.1rem, 1rem + 0.1vw, 1.125rem);
    font-weight: 600;
}

.ovt-search__header .ovt-forum__post-date {
    font-size: 1rem;
}

@media screen and (max-width: 48em) {
    #bbpress-forums .ovt-search__header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem;
    }

    #bbpress-forums .bbp-body div.bbp-reply-content,
    #bbpress-forums .bbp-body div.bbp-topic-content {
        margin: 0 0 0.5rem 0 !important;
    }
}

#bbpress-forums .ovt-forum__search-result div.type-reply,
#bbpress-forums .ovt-forum__search-result div.type-topic,
#bbpress-forums .ovt-forum__search-result div.type-forum,
#bbpress-forums .ovt-forum__search-result div.bbp-reply-content,
#bbpress-forums .ovt-forum__search-result div.bbp-forum-content,
#bbpress-forums .ovt-forum__search-result div.bbp-topic-content {
    background: none;
    margin: 0;
    padding: 0;
    margin-top: 0.75rem;

    font-size: clamp(1.1rem, 1rem + 0.1vw, 1.125rem);
    line-height: 1.4em;
}

.ovt-forum__back-link {
    font-size: clamp(1.1rem, 1rem + 0.1vw, 1.125rem);
    margin-block: 0.75rem;
}
