@font-face{
    font-family: "yekan";
    src: local("B Yekan"), local("2  Yekan"), url("./BYekan.ttf");
    font-display: swap;
}
@-webkit-keyframes animatezoom {
    from {-webkit-transform: scale(0)} 
    to {-webkit-transform: scale(1)}
}

@keyframes animatezoom {
    from {transform: scale(0)} 
    to {transform: scale(1)}
}
/* --- Common settings --- */
* {
    padding: 0;
    margin: 0;
    direction: rtl;
    /* font-family: Arial, Helvetica, sans-serif; */
    box-sizing: border-box;
    font-family: "yekan" !important;
}
h1, h2, h3 {
    font-weight: bold;
}
h1, h2, p {
    line-height: 1.5;
}
a {
    text-decoration: none;
}
input[type = "number"] {
    direction: ltr;
    border: 1px solid rgb(76, 136, 96);
    border-radius: 5px;
    padding: 0px 6px;
    padding-right: 0px;
}
#input_box input {
    font-size: 23px;
}
body {
    /* padding-top: 100px; */
    /* background: rgb(235, 235, 235); */
    background: rgba(230, 238, 228, 0.87);
}

/* ----------Top Bar---------- */
#topbar {
    display: block;
    margin: auto;
    margin-top:0px;
    text-align: center;
    color: rgb(56, 184, 135);
    border-radius: 10px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    padding: 10px 10px;
    border: 1px solid rgb(24, 129, 32);
    border-top: none;
    background: #efe;
    width: 100%;
    max-width: 450px;
    box-shadow: 0px 0px 2px 0px rgba(70, 185, 180, 0.6);
}
#topbar h1 {
    color: rgb(98, 192, 95);
}
#topbar h3 {
    opacity: 0.8;
}



/* -------- Main Body -------- */

.container { 
    margin: auto;
    max-width: 750px;
    padding: 15px;
}
#info_box {
    margin-bottom: 15px;
}
/* Styling inbox items */
#calc_btn,
#input_box input,
#input_box label {
    margin: 10px 0px;
}
#calc_btn,
#input_box input {
    transition: all 0.2s;
}
/* stick input and label together */
#input_box input,
#input_box label {
    float: right;
} br {
    clear: both; /* br tag seperate the text inputs*/
}
#input_box input {
    width: 83%;
    min-height: 50px;
}
#input_box label {
    width: 17%;
    line-height: 3;
}

#calc_btn {
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: 2px solid rgb(72, 134, 72);
    border-radius: 4px;
    font-size: large;
}
#calc_btn:hover {
    background: rgb(72, 134, 72);
    color: #dfdfdf;
}

#calc_btn:focus,
#input_box input:focus {
    box-shadow: 0px 0px 0px 3px rgb(99, 182, 99);
}



/* ---- Settings Section ---- */
#settings .box {
    padding: 20px;
    background: rgb(255, 255, 255);
    border-radius: 9px;
    border: 1px solid rgb(76, 136, 96);
    box-shadow: 0px 0px 1px 1px rgb(218, 218, 218)
}
#settings .box h3 {
    margin-bottom: 7px;
}
#settings .box p {
    margin-top: 4px;
    line-height: 1.25;
}



#settings .box input {
    /* min-width: 20px; */
    width: 35px;
    max-width: 60px;
    font-size: 16px;
    padding: 3px 4px;
    padding-right: 0px;
    border-radius: 3px;
    /* background: red; */
    /* padding: 40px; */
}

/* ------ Popup Style ------ */

#popup {
    position: fixed;
    z-index: 1;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
}
#popup .msgbox {
    -webkit-animation: animatezoom 0.4s;
    animation: animatezoom 0.4s;
    animation-fill-mode: forwards;
    overflow: hidden; /* Needed for flaoting img and p */
    position: relative;
    margin: 10% auto 5% auto;
    border: 1px solid rgb(76, 136, 96);
    width: 100%;
    max-width: 400px;
    min-height: 130px;
    border-radius: 7px;
    box-shadow: 0px 0px 12px 2px rgb(199, 199, 199);
    padding: 20px;
    padding-top: 30px;
    background: rgb(236, 236, 236);
    /* border-top-right-radius: 30px; */
    
}
#popup .close {
    color: rgb(124, 124, 124);
    position: absolute;
    top: 0;
    left: 0;
    /* padding: 15px; */
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 42px;
    background: rgb(250, 250, 250);
    border-radius: 3px;
    box-shadow: 0px 0px 5px 1px #ccc;
    transition: all 0.3s ease;
    font-weight: bold;
    font-family: monospace;
}
#popup .close:hover {
    background: rgb(171, 209, 139);
    color: rgb(255, 255, 255);
    cursor: pointer;
}
#popup .close:active {
    background: rgb(109, 148, 78);
}
#popup img {
    float: left;
}
#popup .msgbox p {
    float: right;
    /* the image size is 256*256 */
    width: calc(100% - 256px);
    font-size: xx-large;
    margin-top: 50px;
}
/* according to javascript, devices from lower 600px will get 200*200 image */
@media only screen and (max-width: 600px) {
    #popup .msgbox p {
        width: calc(100% - 200px);
    }
}
.not_showing {
    display: none;
}
/* Extend p which is near a image that has not_showing class */
/* it's just for popup. there isn't any other img tag in this webpage :) */
img.not_showing ~ p {
    width: 100% !important;
}


#popup .msgbox .title h3 {
    float: left;
    padding-top: 7px;
    padding-left: 10px;
}

/* ------------- Checkbox --------------*/
/* setting checkbox size */
.checkbox {
    line-height: 25px;
} .checkmark {
    width: 25px;
    height: 25px;
}

.checkbox {
    /* position: relative; */
    display: block;
    padding: 10px 0px;
    padding-right: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide the browser's default checkbox */
.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    display: block;
    float: right;
    position: relative;
    /* top: 0; */
    /* right: 0; */
    height: 25px;
    width: 25px;
    margin-left: 7px;
    background: rgb(110, 158, 126);
    border-radius: 3px;
}
.checkbox:hover input ~ .checkmark {
    background-color: rgb(76, 136, 96);;
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox input:checked ~ .checkmark:after {
    display: block;
}
.checkbox .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}
@media only screen and (max-width: 700px) {
    #input_box label,
    #input_box input {
        /* clear: both; */
        display: block;
        width: 100%;
        margin: 5px 0px;
    }
    /* body {
        padding-top: 90px;
    } */
    #input_box label {
        /* width: 17%; */
        margin: 5px 0px;
        /* padding-top: 22px; */
        line-height: 1;
    }
    #popup .msgbox .close {
        /* padding: 50px; */
        width: 60px;
        height: 60px;
        line-height: 62px;
        font-size: 25px;
        
    }
    #popup .msgbox {
        margin: 20% auto 5% auto;
    }
    #calculator {
        margin: 4px 0px;
    }
    #checkbox_box {
        padding: 8px 0px;
    }
}