:root{
    --main-color:rgb(3, 17, 99);
    --hover-color:rgb(231, 247, 255);
    --border-color:rgb(145,145,145);
    --divider-color:#ddd;
    --error-color:#d40000;
    --error-fill: rgb(255, 242, 242);
}


html {
    font-family: sans-serif;
    background: white;
    min-width: 20rem;
}

body {
    max-width: 55rem;
    margin: 0 auto;
    background: white;
}

h1 {
    color: var(--main-color);
    margin: 1rem 0 0 0;
}

a {
    color: var(--main-color);
    text-decoration: none;
}

a:hover{
    text-decoration:underline;
}

hr {
    border: none;
    border-top: 1px solid lightgray;
}


nav {
    position: sticky;
    top: 0;
    min-height: 3rem;
    display: grid;
    background-color: white;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid rgb(200, 200, 200);
    z-index: 9;
}
nav .logo{
    display: flex;
    flex:auto;
    width: 100%;
    margin:0;
    padding:0;
}

nav h1 {
    flex: auto;
    margin: 0;
    color:var(--main-color);
    text-decoration: none;
    padding: 0rem .5rem;
    align-self: center;
}
nav img {
    height: 4.5rem;
    margin-left: 1rem;
}
nav h1 a {
    text-decoration: none;
    color:var(--main-color);
}
nav h1 a:hover{
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    margin-top: .5rem;
    margin-left:1.5rem;
    margin-right:1.5rem;
    margin-bottom: 0;
    padding: 0;
    justify-content: right;
    align-items: center;
    gap: 1.5rem;
}

nav .left {
    align-content: center;
    justify-content: flex-start;
}


nav ul li a {
    color:var(--main-color);
    padding:.3rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.3rem;
    display: inline-block;
    text-align: center;
}
nav ul li a:hover {
    color:var(--main-color);
    scale:1.15;
    text-decoration: none;
}

header .action {
    display: block;
}

textarea{
    padding:.5rem;
}

.content {
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
    padding-top:1rem;
    padding-left:5rem;
    padding-right:5rem;
    align-items: center;
}

.content>header {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap:.5rem;
    margin-bottom: 1rem;
}

.content>header h1 {
    flex: auto;
}

.flash {
    width: 60%;

}
.flash .entry{
    text-align: center;
    margin: .5rem 0;
    padding: 1rem;
    background: var(--hover-color);
    border: 1px solid var(--main-color);
}

.content:last-child {
    margin-bottom: 0;
}

.content form {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
}


.content label {
    margin-bottom: 0.5rem;
}

.content input,
.content textarea {
    font-size:1rem;
    margin-bottom: 1rem;
    accent-color: var(--main-color);
}

input[type="email"]{
    max-width: 20rem;
}

input[type="checkbox"] {
    cursor: pointer;
}

.content textarea {
    min-height: 12rem;
    resize: vertical;
    font-family: "Arabic Transparent";
    line-height: 1.2rem;
}




input.danger {
    color: #cc2f2e;
}

input[type=submit] {
    align-self: center;
    min-width: 10rem;
    margin-top: 2rem;
    padding: .3rem;
    font-weight: bold;
    font-size: medium;
    background-color: white;
    border-color: var(--main-color);
    border-radius: 2px;
}
input[type=submit]:hover {
    background-color: var(--hover-color);
}

input {
    accent-color:  var(--main-color);
}

details:hover{
    cursor: pointer;
}



.bottom {
    position: sticky;
    bottom: 0;
    background: white;
    display:flex;
    border-top: 1px solid rgb(200, 200, 200);
    border-bottom: none;
    z-index: 9;
    padding: 1rem;
    margin: 0;
    justify-content: center;
    vertical-align: middle;
    gap: 5rem;
}

.bottom input[type="submit"] {
    margin: 0;
    width: 100%;
    max-width: 15rem;
}



input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    background-color: red;
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
input[type=number] {
    -moz-appearance:textfield; /* Firefox */
}



.dialog_box {
    position:fixed;
    top:0;
    left:0;
    width: 100%;
    height:100%;
    background: rgba(80, 80, 80, 0.6);
    padding:1rem;
    box-sizing: border-box;

    opacity: 0;

    animation-name: dialog--open;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;

    display:flex;
    align-items: center;
    justify-content: center;

    z-index: 10;
}

.dialog_box_close{
    animation-name: dialog--close;
}

@keyframes dialog--open {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes dialog--close {
    from {opacity: 1}
    to {opacity: 0}
}


.dialog_window{
    width: 100%;
    max-width: 35rem;

    background: white;
    opacity: 0;
    scale: .75;
    animation-name: dialog_window--open;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;

    animation-delay: 0.1s;

    border-radius: 5px;

}

.dialog_window .title_bar {
    background-color: var(--main-color);
    font-weight: bold;
    font-size: 2rem;
    line-height: 3rem;
    color:white;
    text-align: center;
    padding:.5rem;
    border-radius: 5px 5px 0 0;
}

.dialog_window .content_bar {
    padding:2rem;
    border-radius: 2rem;
    font-size: 1.3rem;
    line-height: 2rem;
}


.dialog_window .button_bar {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    background-color: var(--divider-color);
    border-radius: 0 0 5px 5px ;
}

.dialog_window .button_bar input[type="submit"] {
    margin: 0 1rem;
    font-size: 1.3rem;
}


a:hover {
    cursor: pointer;
}

input[type="submit"]:hover {
    cursor: pointer;
}

input[type="button"]:hover {
    cursor: pointer;
}

@keyframes dialog_window--open {
    to {
        opacity: 1;
        transform: scale(1);
    }
}


@media screen and (width < 50rem) {
    .content{
        padding-left:1rem;
        padding-right:1rem;
    }
}

@media screen and (width < 37.5rem) {

    
    nav ul {
        flex-direction: column;
        gap:.1rem;
        margin-bottom: .4rem;
        align-items: flex-end;
    }

    .left {
        align-items: flex-start;
    }

    .bottom {
        gap:2rem;
    }
}


@media screen and (width < 28.125rem) {

    .bottom {
        flex-direction: column;
    }
    .dialog_window .button_bar {
        flex-direction: column;
    }
    
    .dialog_window .button_bar input[type="submit"] {
        margin: .5rem 0;
    }
}


