@import '/fonts/iransans/IRANSans.css';

@font-face {
    font-family: "calibri";
    font-weight: bold;
    src: url('/fonts/calibrib.ttf');
}

@font-face {
    font-family: "tafkik";
    font-weight: bold;
    src: url('/fonts/Tafkik-Bold.ttf');
}

@font-face {
    font-family: "vazir";
    src: url('/fonts/Vazirmatn-VariableFont_wght-Farsinum.ttf');
}

:root {
    --color1: #0ff;
    --color1Dark: #099;
    --color1Light: #ddffff;
    --color2: #b0b;
    --color2Dark: #505;
    --bodyFont: iransans;
    interpolate-size: allow-keywords;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--bodyFont);
    margin: 0;
    direction: rtl;
    background: whitesmoke;
}

input,
select,
textarea,
button {
    font-family: var(--bodyFont);
    border: 1px solid gainsboro;
    border-radius: 10px;
    background-color: white;
    max-width: 100%;
    padding: 8px 15px;
    outline: none;
    /* margin: 10px; */
}

button,
input[type=submit],
input[type=reset] {
    background-color: var(--color1Dark);
    color: white;
    white-space: nowrap;
    &:not(:disabled){
        cursor: pointer;
    }
}

button:not(:disabled):hover,
input[type=submit]:hover,
input[type=reset]:hover {
    background-color: var(--color2Dark);
}

main {
    flex-grow: 2;
}

p {
    text-align: justify
}

a {
    cursor: pointer;
    text-decoration: none;
    color: black;
}

a:hover {
    color: var(--color2Dark)
}

input:invalid:not(:placeholder-shown) {
    border: 1px solid var(--color2);
}

select:invalid:not(:placeholder-shown) {
    border: 1px solid var(--color2);
}


h2 {
    width: 100%;
    border-bottom: 1px solid gainsboro;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--color2);
}

.col1Start {
    grid-column-start: 1;
}

.colToEnd {
    grid-column: auto / -1;
}

.colTotal {
    grid-column: 1 / -1;
}

.w1200px {
    width: min(100%, 1200px);
    margin-inline: auto;
    padding: 3vw;
}

.w100 {
    width: 100%;
    padding: 3vw;
}

@media print {
    .noPrint {
        display: none;
    }
}

.flexBreak {
    flex-basis: 100%;
    height: 0;
}

.formGroup {
    width: 100%;
    background: #fff;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    ;
    border-radius: 10px;
    margin: 0 0 20px 0;
    box-shadow: 0 10px 30px -20px #000;
    gap: 20px;

    h2 {
        grid-column: 1 / -1;
    }

    select,
    input:not([type=radio], [type=submit], [type=checkbox], [type=radio]),
    .formGroup textarea {
        width: 100%;
    }

    >div:not(.inline)>label {
        display: block;
    }

    .inline {
        display: inline;
    }
}

.optionGroup {
    display: flex;
    gap: 10px;
}


header {
    background: var(--color1);
    margin-bottom: 15px;
    font-weight: bold;
    #headerTitle {
        display: flex;
        align-items: end;
        gap: 15px;

        img {
            height: 50px;
        }

        >div {
            font-size: 20px
        }
    }

    >section {
        padding: 10px !important;
        display: flex;
        justify-content: space-between;
        justify-items: flex-start;
        gap: 15px;
        &.home {
            width: 100%;
            padding-inline: 0;

            #headerTitle {
                width: 100%;
                flex-direction: column;
                align-items:stretch;

                img {
                    height: 150px;
                }

                >div {
                    text-align: center;
                    font-weight: 900;
                    font-size: 60px;
                    margin: 0;
                    color: black;
                    background-color: rgba(255, 255, 255, 0.6);
                    margin-block: 10px;
                }
            }
        }
        nav{
            flex-grow:2;
            align-self: flex-end;
            display: flex;
            gap:15px;
            a{
                background-color: var(--color1Dark);
                color:white;
                padding-inline:10px;
                border-radius: 5px;
                font-weight: normal;
                font-size: 14px;
                &:hover{
                    background-color: var(--color2Dark);
                    color:white !important;
                }
            }
        }
    }
}


dialog {
    width: 800px;
    max-width: 90%;
    border: 1px solid black;
    border-radius: 15px;
    box-shadow: 0 0 10px 8px gray;
    >.closeBtn {
        cursor: pointer;

        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10000;

        &::after {
            content: 'X';
            font-size: 30px;
        }

        &:hover {
            color: red;
        }
    }
    .formGroup {
        box-shadow: none;
    }
}

::backdrop {
    background-color: #555;
    opacity: 0.5;
}
details{
    line-height: 200%;
    margin-inline-start: 30px;
}
summary{
    list-style-position: outside;
    margin-inline-start: -10px;
    cursor: pointer;
    margin-bottom: 15px;
    
    
    
    
    &:hover{
        color:var(--color2Dark);
    }
}
summary::marker{
    font-size: 20px;
}
.inputContainer{
    position: relative;
    margin-block:20px;

    label{
        position: absolute;
        font-size: .9em;
        top:-15px;
        right:5px;
        font-weight: bold;
        background-color: lightgray;
        border-radius: 5px;
        padding-inline: 5px;
    }
}
.padding15{
    padding-inline: 15px;
}

.alert{
    margin:auto;
    margin-top:50px;
    background-color:red;
    color:white;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    padding:15px;
}

.homeLink{
    margin-inline:auto;
    display: block;
    width:fit-content;
    border-bottom: 1px solid var(--color2Dark);
    font-weight: bold;
    color: var(--color2Dark);
    font-size:14px;
    &:hover{
        color:var(--color2Dark);
        border-color: var(--color2Dark);
    }
}
/* aparat styles */
.h_iframe-aparat_embed_frame {
    position: relative;
}

.h_iframe-aparat_embed_frame .ratio {
    display: block;
    width: 100%;
    height: auto;
}

.h_iframe-aparat_embed_frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}