/*
Theme Name: Salient Child Theme
Description: Atelier Table child theme for Salient
Author: Hay IT AB
Author URI: https://hayit.se
Template: salient
Version: 1.0
*/

/* =============== Variables =============== */

:root {
    --at-color-accent: #D60301;
    --at-color-light: #FCF6EF;
    --at-color-dark: #000000;
    --at-color-gray: #666666;
    /* --at-color-green: #1E311E; */
    --at-color-shadow: rgba(0,0,0,0.25);

    --at-outline: 2px solid var(--at-color-accent);

    --at-font: 'DM Mono';
}


/* =============== General styling =============== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    text-transform: uppercase;
}

p a:hover, li a:hover {
    text-decoration: underline;
}


/* =============== Shortcode classes =============== */

article.atOccasion {
    margin: 2rem 0;

    & > p:last-of-type {
        padding-bottom: 0;
    }

    h4 {
        margin: 0 !important;
    }
    
    ul {
        margin: 0;

        li {
            list-style: none;
        }
    }

    &.atPopUp {
        display: grid;
        grid-template-columns: 3fr 1fr;
        gap: 1rem 2rem;

        @media (max-width: 650px) {
            grid-template-columns: 1fr;
        }

        .atButton {
            margin-bottom: 1rem;
        }
    }
}

/* =============== Re-usable classes =============== */

.atMarginTop {
    margin-top: 4rem;
}

.atContainBackground .viewport-desktop {
    @media (min-width: 691px) {
        background-size: contain;
        background-position: right top !important;
    }
}

.atBox {
    border: 6px double var(--at-color-accent);
    border-radius: 6px;

    &.dark {
        border-color: var(--at-color-dark);
    }

    &.gray {
        border-color: var(--at-color-gray);
    }
}

.atButton {
    font-family: 1rem var(--at-font);
    background-color: var(--bg_color);
    color: var(--text_color);
    text-transform: uppercase;
    border-radius: 100px !important;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-align: center;
    min-width: 200px;
    display: inline-block;
    position: relative;
    transition: 0.3s opacity;

    &::after {
        content: "";
        position: absolute;
        inset: -4px;
        border: 2px solid var(--bg_color);
        border-radius: 100px;
        pointer-events: none;
    }

    &:hover {
        color: var(--text_color);
        opacity: 0.7;
    }

    span {
        display: grid;
        grid-template-columns: 1fr auto 1fr;

        &::before, &::after {
            content: ' ';
            height: 55%;
            border-bottom: 2px solid var(--at-color-light);
            box-sizing: border-box;
            margin: 0 0.5rem;
            min-width: 1rem;
        }
    }
}

.atTextShadow {
    text-shadow: 0 1px 2px rgba(0,0,0,1);
}

.atTextBackground {
    display: flex;

    & > * {
        background-color: var(--at-color-light);
        padding: 0.5rem 1.25rem;
        border-radius: 4px;
    }
}

.atFrontPageHeroImage {
    height: calc(100vh - 300px) !important;
}

.atFrontPageHeroHeadline h1 {
    letter-spacing: 0.5vw;
    font-size: clamp(1rem, 5vw, 3rem);
}

/* =============== Custom menu =============== */

header.atHeader {
    position: fixed;
    display: grid;
    grid-template-columns: 250px 100px;
    top: 0;
    left: 0;
    transform: translateX(calc(-100% + 95px));
    transition: 0.3s transform ease-in-out;
    z-index: 100;
    align-items: start;
    pointer-events: none;

    .atMenuWrapper {
        background-color: var(--at-color-light);
        box-shadow: 2px 0 4px var(--at-color-shadow);
        padding: 3rem 1.5rem;
        height: 100dvh;
        text-transform: uppercase;
        line-height: 3;
        position: relative;
        z-index: 13;
        overflow-y: auto;
        pointer-events: auto;

        ul {
            margin: 0;

            li {
                list-style: none;
                display: flex;

                &.current-menu-item {
                    font-weight: bold;
                }

                a {
                    display: flex;
                    gap: 2px;
                    width: 100%;

                    &:after {
                        content: '';
                        border-bottom: 2px dotted var(--at-color-accent);
                        flex: 1;
                        height: 1.5rem;
                    }
                }
            }
        }

        .logo {
            display: flex;
            flex-direction: column;

            img {
                width: 100%;
                height: auto;
            }

            p {
                text-align: center;
                letter-spacing: 3px;
                line-height: 1rem;
            }
        }

        .atButton {
            width: 100%;
            min-width: 100%;
            line-height: 1.5;
            margin-top: 1rem;

            &:hover {
                color: var(--at-color-light)
            }
        }
    }

    .atMenuButton {
        font-family: 1rem var(--at-font);
        background-color: var(--at-color-accent);
        color: var(--at-color-light);
        text-transform: uppercase;
        border: none;
        border-radius: 0 100px 100px 0 !important;
        padding: 0.5rem 1rem;
        margin-top: 3rem;
        display: flex;
        gap: 0.5rem;
        cursor: pointer;
        z-index: 12;
        position: relative;
        pointer-events: auto;

        &::after {
            content: "";
            position: absolute;
            inset: -4px;
            border: 2px solid var(--at-color-accent);
            border-radius: 0 100px 100px 0;
            pointer-events: none;
        }

        i {
            font-size: 1rem;
        }
    }

    &.open {
        transform: none;
    }
}

/* ===== CookieYes ===== */

.cky-btn-revisit-wrapper,
.cky-btn-reject,
.cky-btn-accept,
.cky-btn-preferences {
	background-color: var(--at-color-accent) !important;
	border-color: var(--at-color-accent) !important;
}

.cky-btn-customize {
	color: var(--at-color-accent) !important;
	border-color: var(--at-color-accent) !important;
}