/*
Theme Name:   Amber Child Theme for Divi
Theme URI:    https://brandandbuildtemplates.me/themes/amber/
Description:  For Writers & Authors
Author:       Brand & Build
Author URI:   https://brandandbuild.me
Template:     Divi
Version:      1.1
*/

/****************/
/*Global styling*/
/****************/

/*Scrollbars*/

html {
    scrollbar-color: var(--bb-amber-dark) var(--bb-amber-biscuit);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--bb-amber-dark);
    border-radius: 0;
}

::-webkit-scrollbar-track {
    background: var(--bb-amber-light);
}

::-webkit-scrollbar-thumb:window-inactive {
    background: var(--bb-amber-dark);
    opacity: 1;
}

/*Back to top*/

.et_pb_scroll_top::before {
    content: '↑';
    color: var(--bb-amber-rust);
}

.et_pb_scroll_top.et-pb-icon {
    background: transparent;
    bottom: 10px;
    padding: 15px;
}

/*Image Borders*/

.bb-amber-short-fiction .et_pb_post .entry-featured-image-url::before,
.bb-amber-short-fiction .et_pb_post .entry-featured-image-url::after,
.bb-amber-events .et_pb_post .entry-featured-image-url::before,
.bb-amber-events .et_pb_post .entry-featured-image-url::after,
.bb-amber-articles .et_pb_post .entry-featured-image-url::before,
.bb-amber-articles .et_pb_post .entry-featured-image-url::after,
.bb-amber-image:before,
.bb-amber-image:after {
    content: '';
    position: absolute;
    height: 100px;
    width: 100px;
    z-index: -1;
}

.bb-amber-short-fiction .et_pb_post .entry-featured-image-url::before,
.bb-amber-events .et_pb_post .entry-featured-image-url::before,
.bb-amber-articles .et_pb_post .entry-featured-image-url::before,
.bb-amber-image:before {
    top: -10px;
    right: -10px;
    border-left: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-top: 20px solid var(--bb-amber-biscuit);
    border-right: 20px solid var(--bb-amber-biscuit);
}

.bb-amber-short-fiction .et_pb_post .entry-featured-image-url::after,
.bb-amber-events .et_pb_post .entry-featured-image-url::after,
.bb-amber-articles .et_pb_post .entry-featured-image-url::after,
.bb-amber-image:after {
    bottom: -10px;
    left: -10px;
    border-left: 20px solid var(--bb-amber-mint);
    border-bottom: 20px solid var(--bb-amber-mint);
    border-top: 20px solid transparent;
    border-right: 20px solid transparent;
}

/*Author large quotes*/

.bb-amber-quotes .et_pb_slide:before,
.bb-amber-quotes .et_pb_slide:before,
.bb-amber-quotes .et_pb_slide:after {
    position: absolute;
    top: 80px;
    font-family: 'Arial Black', Gadget, sans-serif !important;
    font-size: 200px;
    width: 120px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.bb-amber-quotes .et_pb_slide:before {
    content: '“';
    right: 72%;
}

.bb-amber-quotes .et_pb_slide:after {
    content: '”';
    left: 72%;
}

.bb-amber-quotes .et_pb_slide:before,
.bb-amber-quotes .et_pb_slide:after {
    color: var(--bb-amber-biscuit);
}

/*Single Posts*/

/*Sidebar*/

.bb-amber-sidebar h4.widgettitle {
    border-bottom: 2px solid var(--bb-amber-biscuit);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.bb-amber-sidebar ul {
    padding-left: 20px !important;
    list-style: square !important;
}

/*Post content*/

.bb-amber-post-content > p:first-of-type::first-letter {
    font: var(--bb-amber-dropcap);
    text-transform: uppercase;
    color: var(--bb-amber-rust);
    padding: 0 0.32rem 0 0;
    margin: 0.8rem 0 0.37rem;
    float: left;
}

.bb-amber-post-content li::marker,
.bb-amber-event-content li::marker,
.bb-amber-sidebar ul li::marker,
.bb-amber-text-content li::marker {
    color: var(--bb-amber-rust);
}

.bb-amber-post-content blockquote,
.bb-amber-event-content blockquote,
.bb-amber-text-content blockquote {
    background: var(--bb-amber-biscuit);
    padding: 20px;
}

/*Event content*/

.bb-amber-event-content h4 {
    border-bottom: 2px solid var(--bb-amber-biscuit);
    margin-bottom: 20px;
}

/*Short fiction post content*/

.bb-amber-post-content.bb-amber-short-fiction p:not(:first-of-type) {
    text-indent: 30px;
}

.bb-amber-post-content.bb-amber-short-fiction > p:first-of-type::first-letter {
    margin: 0.8rem 0 0.37rem 30px;
}

/*Comment form*/

.bb-amber-comments a {
    color: var(--bb-amber-rust);
}

.bb-amber-book-synopsis .et_pb_text_inner {
    position: relative;
    height: 335px;
    top: -17px;
    padding: 30px 10px 30px 0;
    padding-bottom: 30px;
    overflow-y: auto;
    scrollbar-width: thin;
}

/*Global Header*/

.bb-amber-header-menu .et-menu .menu-item-has-children > a:first-child::after {
    top: 50%;
    transform: translate(0, -50%);
}

.bb-amber-header-menu .nav li ul {
    width: 200px;
}

.bb-amber-header-menu .nav li.et-reverse-direction-nav li ul {
    right: 200px;
    left: auto;
}

.bb-amber-header-menu .nav li li ul {
    top: 25px;
    left: 200px;
    right: auto;
}

.bb-amber-header-menu .et-menu-nav > ul ul,
.bb-amber-header-menu.et_pb_menu ul.sub-menu li.menu-item {
    padding: 0;
}

.bb-amber-header-menu.et_pb_menu ul.sub-menu li.menu-item a {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.bb-amber-header-menu .et_mobile_menu {
    padding: 0;
}

/*Global Footer*/

/*Footer Portfolio*/

.bb-amber-footer-books .et_pb_ajax_pagination_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(75px, 100%), 1fr));
    grid-gap: 10px;
}

.bb-amber-footer-books .et_pb_ajax_pagination_container .pagination {
    grid-column: 1 / -1;
}

/*Footer Menu*/

/*Flex the footer menu*/

.bb-amber-footer-menu ul {
    display: flex;
    flex-direction: column;
}

/*Set footer menu spacing*/

.bb-amber-footer-menu .et-menu > li {
    margin-top: 0;
    margin-bottom: 10px;
}

/*Hide the mobile menu*/

@media all and (max-width: 980px) {
    .bb-amber-footer-menu .et_pb_menu__menu {
        display: block;
        flex: 1 1 auto;
    }
    .bb-amber-footer-menu .et_mobile_nav_menu {
        display: none;
    }
}

/*Footer Optin*/

/*Flex the optin fields*/

.bb-amber-optin .et_pb_newsletter_field {
    flex: 1 1 auto !important;
}

/*Stop fields wrapping*/

.bb-amber-optin .et_pb_newsletter_fields {
    flex-wrap: nowrap;
}

/*Don't resize the button*/

.bb-amber-optin .et_pb_newsletter_button_wrap {
    flex: 0 1 auto !important;
}

/*Remove the email padding*/

.bb-amber-optin .et_pb_newsletter_form p.et_pb_newsletter_field {
    padding-bottom: 0;
}

/**************/
/*Page styling*/
/**************/

/*Home Page*/

/*Home Header*/

/*Adjust for mobile*/

@media all and (max-width: 767px) {
    .bb-amber-home-header .header-content-container {
        order: 0;
    }
    .bb-amber-home-header .header-image-container {
        order: 1;
    }
    .bb-amber-home-header .header-content {
        margin-right: 2% !important;
    }
}

/*Events & Articles*/

/*Set the grids*/

.bb-amber-events .et_pb_ajax_pagination_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    grid-gap: 50px;
}

.bb-amber-articles .et_pb_ajax_pagination_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    grid-gap: 50px;
}

/*Make pagination fullwidth*/

.bb-amber-events .et_pb_ajax_pagination_container div:last-of-type,
.bb-amber-articles .et_pb_ajax_pagination_container div:last-of-type {
    grid-column: 1 / -1;
}

/*Flex the posts*/

.bb-amber-events .et_pb_post,
.bb-amber-articles .et_pb_post {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bb-amber-events .post-content,
.bb-amber-articles .post-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.bb-amber-events a.more-link,
.bb-amber-articles a.more-link {
    margin-top: auto;
}

/*Comment form*/

.bb-amber-comments #commentform input {
    width: 100%;
}

.bb-amber-comments #commentform input#wp-comment-cookies-consent {
    width: auto;
}

/*Short Fiction*/

/*Adjust for tablet & desktop*/

@media all and (min-width: 768px) {
    .bb-amber-short-fiction .et_pb_post {
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .bb-amber-short-fiction .entry-featured-image-url {
        width: 40%;
        position: absolute;
        margin-bottom: 0;
        height: 100%;
    }
    .bb-amber-short-fiction .entry-featured-image-url img {
        -o-object-fit: cover;
        object-fit: cover;
        height: 100%;
    }
    .bb-amber-short-fiction .entry-title,
    .bb-amber-short-fiction .post-meta,
    .bb-amber-short-fiction .post-content {
        margin-left: calc(40% + 50px);
    }
}

/*Books Page*/

/*Set the portfolio grid*/

.bb-amber-books .et_pb_ajax_pagination_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    grid-gap: 50px;
}

/*Make pagination fullwidth*/

.bb-amber-books .et_pb_ajax_pagination_container .pagination {
    grid-column: 1 / -1;
}

/*Flex the items*/

.bb-amber-books .et_pb_ajax_pagination_container .et_pb_portfolio_item {
    display: flex;
    flex-direction: column;
}

.bb-amber-books
    .et_pb_ajax_pagination_container
    .et_pb_portfolio_item
    .post-meta {
    margin-top: auto;
}
