﻿  /*******************/
 /***  Variables  ***/
/*******************/

:root {
    --background-color: white;
    --background-color-secondary: ghostwhite;
    --background-color-header-footer: hsl(0, 0%, 97%);
    --text-color: hsl(0, 0%, 10%);
    --text-color-subdued: hsl(0, 0%, 50%);
    --border-color: lightgray;
    --button-text-color: white;
    --button-background-color-primary: hsl(210, 75%, 45%);
    --button-background-color-primary-disabled: hsl(210, 50%, 75%);
    --button-border-color-primary: hsl(210, 75%, 20%);
    --title-color: steelblue;
    --box-shadow-bottom: 0 .25rem .75rem rgba(0, 0, 0, 0.1);
    --box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.dark-mode {
    --background-color: black;
    --background-color-secondary: hsl(0, 0%, 10%);
    --background-color-header-footer: hsl(0, 0%, 5%);
    --text-color: hsl(0, 0%, 90%);
    --text-color-subdued: hsl(0, 0%, 50%);
    --border-color: hsl(0, 0%, 30%);
    --button-text-color: hsl(0, 0%, 90%);
    --button-background-color-primary: hsl(210, 75%, 45%);
    --button-background-color-primary-disabled: hsl(210, 50%, 25%);
    --button-border-color-primary: hsl(210, 75%, 20%);
    --title-color: steelblue;
    --box-shadow-bottom: 0 .25rem .75rem rgba(210, 115, 50, 0.2);
    --box-shadow: 5px 5px 10px rgba(210, 115, 50, 0.2);
}

  /*****************************/
 /***  Login screen styles  ***/
/*****************************/

html {
    background-color: var(--background-color);
    color: var(--text-color);
}

.header-login {
    background-color: var(--background-color-header-footer);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-bottom);
    grid-area: header;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-auto-flow: column;
    grid-template-areas: "title login-link";
    gap: 15px;
    align-content: center;
    align-items: center;
    padding: 10px 20px;
}

.garage-container {
    grid-area: garage;
}

.garage {
    height: 250px;
    width: 300px;
    margin-top: 10px;
    margin-bottom: 20px;
    background-color: var(--title-color);
    clip-path: polygon(0px 90px, 40px 90px, 40px 250px, 80px 250px, 80px 110px, 220px 110px, 220px 250px, 260px 250px, 260px 90px, 300px 90px, 150px 0px);
    animation: open-door 5s linear;
}

.welcome {
    font-size: x-large;
    font-weight: bold;
    text-align:center;
    width: 300px;
    margin-top: -100px;
    margin-bottom: 70px;
    color: darkred;
}

.heading {
    color: var(--title-color);
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 2rem;
}

.welcome-text {
    font-size: 1.5rem;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .heading {
        font-size: 1.8rem;
    }

    .welcome-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 520px) {
    .heading {
        font-size: 1.5rem;
    }

    .welcome-text {
        font-size: 1.25rem;
    }
}

@media (max-width: 340px) {
    .title {
        font-size: 1.2rem;
    }

    .content {
        padding: 10px;
    }
}

.navbar-nav {
    list-style: none;
    grid-area: login-link;
}

.nav-link {
    text-decoration: none;
}

.text-dark {
    color: var(--text-color-subdued);
}

.login-buttons {
    grid-area: login-buttons;
}

.login-button {
    width: 220px;
    text-align: center;
}

.row {
    display: grid;
    gap: 20px;
    grid-template-areas: "col1 col2";
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    width: clamp(320px, 80%, 785px);
}

@media (max-width: 740px) {
    .row {
        grid-template-areas: "col1"
                             "col2";
    }
}

.col1 {
    grid-area: col1;
    display: grid;
    justify-content: center;
    grid-template-rows: auto 1fr;
    grid-template-areas: "garage" "login-buttons";
}

.col2 {
    grid-area: col2;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out,
                background-color .15s ease-in-out,
                border-color .15s ease-in-out,
                box-shadow .15s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    color: var(--button-text-color);
    background-color: var(--button-background-color-primary);       /*rgb(27, 110, 194);*/
    border-color: var(--button-border-color-primary);               /*rgb(24, 97, 172);*/
    display: flex;
    gap: 5px;
    margin: auto;
}

.btn-primary:not([disabled]):hover {
    color: white;
    background-color: hsl(210, 76%, 53%);
    border-color: #0062cc;
}

.btn-primary:disabled {
    background-color: hsl(210, 20%, 40%);
    cursor: default;
}

.fbimage {
    vertical-align: middle;
    border: none;
}

.email-input {
    height: 20px;
    width: 200px;
}

@keyframes open-door {
    0% {
        clip-path: polygon(  0px  90px,
                            40px  90px,
                            40px 250px,
                            80px 250px,
                            80px 250px,
                           220px 250px,
                           220px 250px,
                           260px 250px,
                           260px  90px,
                           300px  90px,
                           150px   0px);        /* Initial clip-path (door closed) */
    }

    50% {
        clip-path: polygon(  0px  90px,
                            40px  90px,
                            40px 250px,
                            80px 250px,
                            80px 180px,
                           220px 180px,
                           220px 250px,
                           260px 250px,
                           260px  90px,
                           300px  90px,
                           150px   0px);        /* 50% clip-path (door half open) */
    }

    100% {
        clip-path: polygon(  0px  90px,
                            40px  90px,
                            40px 250px,
                            80px 250px,
                            80px 110px,
                           220px 110px,
                           220px 250px,
                           260px 250px,
                           260px  90px,
                           300px  90px,
                           150px   0px);        /* Final clip-path (door open) */
    }
}
