@font-face {
    font-family: 'maghribi';
    src: url('/fonts/samir-khouaja-maghribi-bold.ttf') format('truetype');
}

/* arabic */
@font-face {
    font-family: 'classic';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/noto-google-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

/* latin-ext */
@font-face {
    font-family: 'classic';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/noto-google-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: 'classic';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/noto-google-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --light-color: rgb(253, 240, 240);
    --dark-color: rgb(189, 126, 150);
}

* {
    text-align: right;
    direction: rtl;
    margin: 0 0 0 0;
    caret-color: transparent;
    scroll-margin-top: 80px;
    scroll-margin-bottom: 20px;
}

a {
    text-decoration: none;
}

body {
    padding-top: 80px;
    background-image: url('/images/zellige_pattern.png');
    background-attachment: fixed;
    overflow: scroll;
    background-color: white;
}

/* chrome and opera */
body::-webkit-scrollbar {
    display: fixed;
}

.header {
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    background: url('/images/zellige_pattern.png'),
        linear-gradient(to left, var(--light-color), var(--dark-color) 120%);
    font-size: 16px;
    color: black;
    z-index: 100;
}

.header * {
    font-family: 'maghribi';
    font-weight: normal;
    position: fixed;
    top: 0;
    left: 0;
}

.header .title {
    text-shadow: 2px 2px 5px #505050;
    right: 0;
    padding-right: 10px;
}

.subtitle,
.subtitle * {
    top: 50px;
    right: 0;
    padding-right: 10px;
}

.header .counter {
    top: 48px;
    padding-left: 10px;
}

.footer_open,
.footer_close {
    height: 20px;
    width: 100%;
    background: url('/images/zellige_pattern.png'),
        linear-gradient(to left, var(--light-color), var(--dark-color) 120%);
    background-position-y: 10px;
}

.footer_open {
    position: sticky;
    bottom: 0;
}

@media screen and (max-height: 30em) and (orientation:landscape) {

    * {
        scroll-margin-top: 45px;
    }

    body {
        padding-top: 45px;
    }

    .header {
        height: 50px;
    }

    .header .counter {
        top: 10px
    }

    .subtitle {
        display: none
    }
}

hr {
    border: 1px solid rgb(220, 220, 220);
    opacity: 1;
}

.item {
    background-color: white;
    width: 100%;
}

.item * {
    font-family: 'maghribi';
    font-weight: normal;
    border: none;
    background: none;
}

.item button {
    padding: 12px 15px;
    font-size: 24px;
    width: 100%;
    color: black;
    display: flex;
}

.item button * {
    flex-grow: 2;
}

.jouk {
    font-family: 'classic';
    font-size: 16px;
    text-align: left;
    flex-grow: 1;
    padding-top: 7px;
}

.subitem {
    padding: 8px 20px;
    font-size: 20px;
    display: none;
}

.keep .subitem {
    display: block;
}

.item_hover button:hover,
.subitem:hover {
    background-color: var(--light-color);
    text-shadow: 1px 1px 2px #505050;
}

.item_selected {
    background-color: var(--light-color);
    opacity: 0.85;
    padding-bottom: 5px;
    border-top: rgb(200, 200, 200) 2px solid;
    border-bottom: rgb(200, 200, 200) 2px solid;
}

#search {
    width: 100%;
    display: flex;
}

#search_input {
    font-family: 'classic';
    font-weight: normal;
    font-size: 16px;
    text-align: right;
    width: 100%;
    border: 2px solid lightgray;
    border-left: none;
    padding: 10px;
    height: 20px;
    outline: none;
    caret-color: black;
}

#search_input:focus {
    border: 2px solid gray;
    border-radius: 0px 5px 5px 0px;
    background: var(--light-color);
}

#search_button {
    width: 40px;
    height: 44px;
    background-color: white;
    border: 2px solid lightgray;
    border-right: none;
    text-align: center;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px 0px 0px 5px;
}

#search_button:hover {
    background-color: var(--light-color);
    border: 2px solid gray;
}

.footer_links {
    display: flex;
}

.link_footer {
    background-color: white;
    border-left: 1px solid rgb(220, 220, 220);
    padding: 10px 0px;
    width: 100%;

    font-family: 'classic';
    font-weight: normal;
    font-size: 16px;
    text-align: center;
    color: black;
}

.link_footer:hover {
    background-color: var(--light-color);
}

.link_footer:visited {
    color: inherit;
}

img {
    margin-bottom: -5px;
}

#google_app {
    padding: 0;
    background-color: white;
}

#google_app img {
    margin: -5px 0 -10px;
    height: 60px;
}

#endpage {
    height: 5vh;
    position: static;
}

body .content {
    font-family: "classic";
    font-weight: normal;
    font-size: 16px;
    padding-right: 15px;
    padding-left: 5px;
    background: white;
}

.princ button * {
    margin: -5px 0;
    text-align: center;
    font-weight: bold;
}

.princ button:hover {
    background-color: var(--light-color)
}

.new {
    color: crimson;
    font-family: 'classic';
    font-size: 20px;
    font-weight: bold;
    padding-right: 15px;
    animation: shake 2s linear infinite;
    display: inline-block;
}

@keyframes shake {
    0% {
        transform: translateX(0px);
    }
    5% {
        transform: translateX(-5px);
    }
    10% {
        transform: translateX(5px);
    }
    20% {
        transform: translateX(-5px);
    }
    25% {
        transform: translateX(0px);
    }
    100% {
        transform: translateX(0px);
    }
}