/*
Theme Name: Primo Codes Membership Site
Theme URI: 
Author: BBI Marketing
Author URI: http://bbimarketing.com/
Description: 
Version: 1.0
License: 
License URI: 
Tags: 
Text Domain: theme
*/

/* -- Normalize -- */
@import 'css/normalize.css';

/* -- WordPress Core -- */
@import 'css/wordpress-core.css';

/* -- Typography -- */
@import 'css/typography.css';

/* -- Header & Nav Styles -- */
@import 'css/header-nav.css';

/* -- Theme Colors -- */
:root {
    --black: #000;
    --blue: #0090E2;
    --gray-light: #f6f6f6;
    --red: #E70000;
	--teal: #006491;
    --white: #fff;
}

/* -- Global Styles -- */
*{
    box-sizing: border-box;
}

a, button {
    transition: all 0.25s ease;
}

img {
    display: inline-block;
}

main {
    margin: 0 auto;
    max-width: 1600px;
    padding: 2rem;

    @media (min-width: 992px) {
        min-height: calc(100vh - 6.15rem);
    }
}

.site-footer {
    margin: 2rem auto 1rem 0;
    max-width: 1600px;
    text-align: center;
}

/* -- Component Styles */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    details {
        background: var(--gray-light);
        border-radius: 5px;
        padding: 1em;

        summary {
            align-items: center;
            cursor: pointer;
            display: flex;
            font-family: var(--font-family-header);
            font-size: var(--font-size-large);
            font-weight: 900;

            &::before {
                background: url("assets/icons/arrow.svg") center no-repeat;
                background-size: contain;
                content: '';
                display: inline-block;
                flex-shrink: 0;
                height: 1em;
                margin-right: 0.5em;
                width: 1em;
            }
        }

        &[open] summary::before{
            transform: rotate(90deg);
        }

        & > :last-child {
            margin-bottom: 0;
        }
    }
}

.button {
    align-items: center;
    background: var(--blue);
    border-radius: 5px;
    color: var(--white);
    cursor: pointer;
    display: inline-flex;
    gap: 1em;
    padding: 0.5em 1.5em;
    text-decoration: none;

    &:hover,
    &:focus-visible {
        outline: 2px solid var(--black);
    }
}

.card {
    border-radius: 10px;
    box-shadow: 0 2px 14px 0 rgba(0, 0, 0, .15);
    overflow: hidden;
    padding: 2rem;
    position: relative;

    &.accent-blue,
    &.accent-red {
        padding-left: calc(2rem + 7px);

        &::before {
            content: '';
            display: block;
            inset: 0 auto 0 0;
            position: absolute;
            width: 7px;
        }
    }

    &.accent-blue:before {
        background: var(--blue);
    }

    &.accent-red:before {
        background: var(--red);
    }
}

.grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    margin: 2rem 0;
}


.icon-line {
    align-items: center;
    display: flex;
    gap: 1em;
    margin: 1em 0;

    p {
        margin: 0;
    }
}

nav.pagination {
    margin: 2em 0;

    .nav-links {
        display: flex;
        font-size: var(--font-size-large);
        font-weight: bold;
        gap: 0.5em;
        justify-content: center;
    }
}

.posts-grid {
    display: grid;
    gap: 2em;
    grid-template-columns: 1fr;

    @media (min-width: 768px) {
        grid-template-columns: 1fr 1fr;
    }

    @media (min-width: 1200px) {
        grid-template-columns: 1fr 1fr 1fr;
    }

    article {
        padding: 0;

        a {
            color: var(--black);
            font-size: var(--font-size-x-large);
            text-decoration: none;

            &:hover,
            &:focus-visible {
                outline: 2px solid var(--blue);
            }
        }

        .post-category {
            background: rgba(0, 0, 0, 0.1);
            border-radius: 2em;
            font-size: var(--font-size-large);
            padding: 0.25em 0.75em;
        }

        .post-content {
            align-items: center;
            display: flex;
            justify-content: space-between;
            padding: 1em;
        }

        .post-image {
            background: rgba(0, 0, 0, 0.1);

            img {
                background: var(--white);
                display: block;
                margin: 0 auto;
            }
        }
    }
}

.posts-filters {
    display: grid;
    gap: 2em;
    grid-template-columns: repeat(9, 1fr);
    margin: 2em 0;

    button {
        all: unset;
        background: var(--blue);
        border-radius: 5px;
        cursor: pointer;
        color: var(--white);
        font-size: var(--font-size-large);
        padding: 0.5em 1em;
        text-align: center;

        &:hover,
        &:focus-visible {
            outline: 2px solid var(--black);
        }
    }

    #posts-categories-dropdown,
    #posts-search {
        font-size: var(--font-size-x-large);
        padding: 0.5em;

        &:hover,
        &:focus-visible {
            outline: 2px solid var(--black);
        }
    }

    #posts-categories-dropdown {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' height='8' width='12'><path d='M1 1l5 5 5-5' fill='none' stroke='black' stroke-width='2'/></svg>");
        background-position: right 0.75em center;
        background-repeat: no-repeat;
        grid-column: 7 / 9;
    }

    #posts-search {
        grid-column: 1 / 7;
    }
}

.wpcf7 {
    form {
        display: flex;
        flex-wrap: wrap;
        gap: 1em;

        .wpcf7-response-output {
            margin: 2em 0;
            flex-basis: 100%;
        }
    }

    button {
        all: unset;
        background: var(--red);
        border-radius: 5px;
        color: var(--white);
        cursor: pointer;
        font-family: var(--font-family-header);
        font-weight: 900;
        padding: 1em 1.5em;
        text-align: center;
        width: 100%;

        &:active,
        &:focus-visible,
        &:hover {
            outline: 2px solid var(--black);
        }
    }

    input, textarea {
        border: 1px solid rgba(0, 0, 0, 0.15);
        border-radius: 5px;
        padding: 1em;
        width: 100%;

        &:focus-visible {
            outline: 2px solid var(--black);
        }
    }

    label {
        align-items: center;
        display: flex;
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 0.5em;

        /* &::before {
            background: url("assets/icons/arrow.svg") center no-repeat;
            background-size: contain;
            content: '';
            display: inline-block;
            height: 1em;
            width: 1em;
        } */

        .wpcf7-form-control-wrap {
            display: block;
            flex-basis: 100%;
        }
    }

    /* Contact Page specific form styles */
    &#wpcf7-f188-o1 {
        label:nth-of-type(-n+2) {
            flex-basis: calc(50% - 0.5em);
        }

        /* label:nth-of-type(1)::before {
            background-image: url("assets/icons/profile.svg");
        }

        label:nth-of-type(2)::before {
            background-image: url("assets/icons/email.svg");
        }

        label:nth-of-type(3)::before {
            content: unset;
        }

        label:nth-of-type(4)::before {
            content: unset;
        } */
    }
}

/* -- Page Styles -- */
.blog {
    h1 ~ p {
        font-size: var(--font-size-large);
    }
}

.page-template-contact-faq-template {
    main > .grid {
        display: flex;
        flex-direction: column;

        @media (min-width: 1200px) {
            display: grid;
        }
    }
}

.page-template-dashboard-template {
    .card {
        position: relative;

        & > :first-child {
            margin-top: 0;
        }

        & > :last-child {
            margin-bottom: 0;
        }

        @media (min-width: 768px) {
            .button {
                inset: 1em 1em auto auto;
                position: absolute;
            }
        }
    }

    .grid {
        grid-template-columns: 1fr;

        @media (min-width: 600px) {
            grid-template-columns: 1fr 1fr;
        }
    }

    .quick-actions {
        a {
            color: var(--black);
            display: block;
            position: relative;
            text-decoration: none;

            &:hover,
            &:focus-visible {
                background: var(--blue);
                color: var(--white);

                svg {
                    color: var(--white);
                }
            }

            & > :last-child {
                margin-bottom: 0;
            }

            .arrow {
                inset: 1em 1em auto auto;
                position: absolute;
            }

            .icon {
                display: inline-block;
                font-size: var(--font-size-h2);
            }

            strong {
                display: block;
                font-size: var(--font-size-h3);
            }

            svg {
                color: var(--blue);
                transition: color 0.25s ease;
            }
        }
    }
}