/*

    CARDINAL CSS FRAMEWORK

    This file contains the basic styles of Cardinal CSS.
    Create a custom CSS file in your project and import this file at the top of your custom CSS:
    
    @import '@bobanm/cardinal'

    Then in your custom CSS file extend these styles to fit your needs.

*/

@import 'https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,300;8..144,500&display=swap';

:root {
    --red: hsl(0, 78%, 62%);
    --cyan: hsl(180, 62%, 55%);
    --orange: hsl(34, 97%, 64%);
    --blue: hsl(212, 86%, 64%);
    --veryDarkBlue: hsl(234, 12%, 34%);
    --grayishBlue: hsl(229, 6%, 66%);
    --veryLightGray: hsl(0, 0%, 98%);
    --grayText: #6a6c71;
    --weight1: 300;
    --weight2: 500;
}

body {
    font-size: 1.125rem;
    font-family: 'Roboto Flex', sans-serif;
    font-weight: var(--weight1);
    color: var(--grayText);
    background-color: var(--veryLightGray);
    margin: 0.5em;
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5em;
    max-width: 64em;
    margin: 0.5em auto;
}

div, h2 {
    text-overflow: ellipsis;
    overflow: hidden;
}

h2 {
    white-space: nowrap;
}

button, input, select, option {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin: 0.3em 0;
    border-radius: 0.3em;
    transition-duration: 0.5s;
    transition-timing-function: ease-out;
}

input {
    padding: 0.4em 0.4em;
    border: 1px solid var(--grayishBlue);
    outline: 0 none;
}

input:focus {
    border-color: var(--grayishBlue);
    box-shadow: 0 1px 1px var(--veryLightGray) inset, 0 0 10px var(--grayishBlue);
}
input.input-red:focus {
    border-color: var(--red);
    box-shadow: 0 1px 1px var(--veryLightGray) inset, 0 0 10px var(--red);
}
input.input-orange:focus {
    border-color: var(--orange);
    box-shadow: 0 1px 1px var(--veryLightGray) inset, 0 0 10px var(--orange);
}

button {
    color: white;
    cursor: pointer;
    display: inline-block;
    padding: 0.4em 1em;
    background-color: var(--veryDarkBlue);
    border: 1px solid var(--veryDarkBlue);
}

button.btn-red:enabled {
    background-color: var(--red);
    border: 1px solid var(--red);
}
button.btn-blue:enabled {
    background-color: var(--blue);
    border: 1px solid var(--blue);
}
button.btn-cyan:enabled {
    background-color: var(--cyan);
    border: 1px solid var(--cyan);
}
button.btn-orange:enabled {
    background-color: var(--orange);
    border: 1px solid var(--orange);
}

button.btn-red:hover:enabled, button.btn-red:active:enabled {
    color: var(--red);
}
button.btn-blue:hover:enabled, button.btn-blue:active:enabled {
    color: var(--blue);
}
button.btn-cyan:hover:enabled, button.btn-cyan:active:enabled {
    color: var(--cyan);
}
button.btn-orange:hover:enabled, button.btn-orange:active:enabled {
    color: var(--orange);
}

button:disabled, input:disabled {
    color: var(--grayText);
    border: 1px solid var(--grayishBlue);
    cursor: not-allowed;
}

button:disabled {
    background-color: var(--grayishBlue);
}

button:hover:enabled, button:active:enabled {
    background-color: initial;
    color: var(--veryDarkBlue)
}

select {
    margin: 0 0.5em;
    padding: 0.1em 0.2em;
}
select:focus-visible {
    outline: auto 0;
}

section {
    background-color: var(--veryLightGray);
    border-radius: 0.5em;
    box-shadow: 0 0.5em 1.5em -0.5em var(--grayishBlue);
    padding: 2em;
    border-top: 3px solid;
    overflow: hidden;
    transition-duration: 0.25s;
    transition-timing-function: ease-out;
}

section:hover {
    box-shadow: 0 0.5em 2em -0.1em var(--grayishBlue);
}

section.top-cyan {
    border-top-color: var(--cyan);
}
section.top-red {
    border-top-color: var(--red);
}
section.top-blue {
    border-top-color: var(--blue);
}
section.top-orange {
    border-top-color: var(--orange);
}

img.right {
    float: right;
}

img.zoom {
    transition-duration: 0.25s;
    transition-timing-function: ease-out;
}

img.zoom:hover {
    transform: scale(1.2, 1.2);
}

ul {
    list-style-type: square;
}

h2 {
    color: var(--veryDarkBlue);
    font-weight: var(--weight2);
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
}

footer img {
    margin: 0 1rem;
    width: 64px;
}

#modal-mask {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

#modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 85%;
    height: 90%;
    transform: translate(-50%, -50%);
}

@media (min-width: 50em) {
    #modal-dialog {
        top: 10%;
        width: min(34rem, 75%);
        height: auto;
        transform: translate(-50%, 0%);
    }
}

#modal-close {
    float: right;
    width: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 0.25rem;
    background-color: lightgray;
}

#modal-close:hover {
    background-color: darkgray;
}