/* We gebruiken hier Cascade layers, wat mogelijke problemen met Specificiteit voorkomt
   https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers
   https://css-tricks.com/css-cascade-layers/ */
 
/* BARIOL REGULAR */
@font-face {
    font-family: 'Bariol';
    src: url('./fonts/Bariol_Regular.woff');
    font-weight: 400;

}
 
/* BARIOL REGULAR ITALIC */
@font-face {
    font-family: 'Bariol';
    src: url('./fonts/Bariol_Regular_Italic.woff');
    font-style: italic;
}
 
/* BARIOL BOLD */
@font-face {
    font-family: 'Bariol';
    src: url('./fonts/Bariol_Bold.woff');
    font-weight: 700;
}
 
/* BARIOL LIGHT */
@font-face {
    font-family: 'Bariol';
    src: url('./fonts/Bariol_Light.woff');
    font-weight: 300;
}
 
/* BARIOL THIN */
@font-face {
    font-family: 'Bariol';
    src: url('./fonts/Bariol_Thin.woff');
    font-weight: 200;
}
 
@layer styleguide {
 
    /* Kleuren */
    :root {
        --primary-color: #172F3B;
        --primary-action: #00E53D;
        --secondary-action: #00FF44;
        --white: #FFFFFF;
        --grey-background: #E9ECEE;
        --grey-text-color: #90A1AA;

        /* knop kleuren */
        --like-button: #00FF44;
        --tomato-button: #FF2A34;
        --star-button: #F8E71C;
        /* deze knop is voor Add people, add snaps, edit, remove etc, eigenlijk de grijze basis kleur van veel knoppen, even goed naam bedenken nog */
        --add-action: #4E6977;
 
        /* TEXT */
        --primary-text-color: #FFFFFF;
        --secondary-text-color: #90A1AA;
 
        /* TYPOGRAPHY */
        --font-family: 'Bariol', sans-serif;
 
        /* FONT-SIZE */
        --first-line: 2em;
        --second-line: 1.6em;
        --description: 1.8em;
 
        --letter-spacing: 1px;
        --line-height-heading: 2;
        --line-height-list: 1.6;
        --line-height-text: 1.3;
 
        /* BORDER */
        --border-radius-button: 20px;
        --border-radius-photo: 7px;
        --border-radius-round: 100%;
        --border-radius-searchbar: 2px;
 
        /* BUTTON SIZE MOET NOG BESPROKEN WORDEN*/
        --padding-button: .8em;
    }

    * {
        font-family: var(--font-family);
    }

    .primary-color {
        background-color: var(--primary-color);
    }
 
    .primary-action {
        background-color: var(--primary-action);
    }
 
    .secondary-action {
        background-color: var(--secondary-action);
    }

    .white {
        background-color: var(--white);
        border: 1px solid #000000; /* zodat je de witte kleur nog kunt zien */
    }
 
    .grey-background {
        background-color: var(--grey-background);
    }

    /* Done / Invite / Create buttons */
    button {
        background-color: var(--primary-action);
        border-radius: var(--border-radius-button);
        cursor: pointer;
        padding: var(--padding-button);
        border: var(--border-none);
        color: var(--white);
        font-weight: 700;

            &:hover {
                background-color: var(--secondary-action);
            }

            &:focus-visible {
                outline: 2px solid var(--primary-color);
            }

        /* &:active
        /* animatie kiezen? */
    }

    /* Button zonder achtergrondkleur CANCEL, REMOVE & EDIT */
    .only-text-button {
        background: none;
        border: none;
        color: var(--grey-text-color);
        padding: .5em;
        cursor: pointer;
        font-size: inherit;

        &:hover {
            text-decoration: underline;
            color: var(--tomato-button);
            background: none;
        }

        &:focus-visible {
            outline: 1px solid var(--primary-color);
        } 
    }

    .ok-button {
        cursor: pointer;
        border-radius: var(--border-radius-round);
        padding: 1em;
        width: 5vw;
        display: flex;
        justify-content: center;
    }

    input[type="radio"],
    input[type="checkbox"] {
     accent-color: var(--primary-action);
        margin: .5em;

        &:focus-visible {
            outline: 1px solid var(--primary-action);
        } 
    }

    /* Slider voor het aan- en uitzetten van notificaties */
    .checkbox-slider {
        appearance: none;
        width: 4em;
        aspect-ratio: 2/1;
        margin: .5em;
        background-color: var(--white);
        border-radius: var(--border-radius-button);
        box-shadow: 0 0 3px ;
        font: inherit;
        cursor: pointer;
        padding: .1em;


        /* de :after is het balletje van de switch */
        &::after {
            content: "";
            display: block;
            width: 1.8em;
            aspect-ratio: 1;
            background-color: var(--white);
            border-radius: inherit;
            box-shadow: 0 0 3px ;

            transition: .2s;
        }

        &:checked {
            background-color: var(--primary-action);
        }

        &:checked::after {
            background-color: var(--white);
            translate: 2em;
        }

        &:focus-visible {
            outline: 2px solid var(--secondary-action);
        }
    }

    .searchbar {
        border-radius: var(--border-radius-searchbar);
        border: var(--border-none);
        padding: .5em;
    }

    .thesearchbar {
        background-color: var(--grey-background);
        place-items: center;
        text-decoration: none;

    }

    .buttons {
        padding: 2em;
        display: flex;
        justify-content: space-around;
    }

    .nav-bar{
        background-color: var(--primary-color);
        /* Dit moet je in je css zetten voor een bottom navigatie */
        /* position: fixed;
        bottom: 0;
        left: 0;
        right: 0; */
        z-index: 10;
        height: 4em;

        ul {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            padding: 1rem;

            li {
                display: grid;
                place-items: center;
            }
        }
    }
}