﻿@font-face {
    font-family: "mainbold";
    src: url('Fonts/IBMPlexSansArabic-Regular.ttf');
}

@font-face {
    font-family: "mainLight";
    src: url('Fonts/IBMPlexSansArabic-Light.ttf');
}


@font-face {
    font-family: "icon";
    src: url('Fonts/FontAwesomeRegulars.ttf');
}

@font-face {
    font-family: "iconBold";
    src: url('Fonts/FontAwesomeSolid.otf');
}

body {
    --PrimaryColor: #3887BE;
    --PrimaryLightColor: #52D3D8;
    --PrimaryDarkColor: #0766AD;
    --LightColor: #D9D9D9;
    --GrayColor: #C4C4C4;
    --DarkColor: #303030;
    --DarkerColor: #202020;
    font-family: mainbold;
}


*::selection {
    color: white;
    background: var(--PrimaryColor);
}

.icon {
    font-family: iconBold;
    font-size: 17px;
}

input {
    outline: none !important;
    box-shadow: none !important;
}


    input.min {
        min-width: 0px !important;
        width: 130px !important;
    }

    input:not([type='checkbox']) {
        border-width: 0px 0px 2px 0px;
        font-family: 'mainLight';
        border-color: var(--GrayColor);
        border-style: solid;
        padding: 0px 5px;
    }

        input:not([type='checkbox'])::selection {
            background: var(--PrimaryDarkColor);
            color: white;
        }

        input:not([type='checkbox']):focus {
            border-color: var(--PrimaryColor);
        }

    input[type=checkbox] {
        background-size: 115%;
        background-color: white;
        width: 18px;
        height: 18px;
    }

        input[type=checkbox]:checked {
            background-color: var(--PrimaryColor);
            border-color: var(--PrimaryColor);
        }


/*Button*/
.bttn {
    --base: var(--DarkColor);
    --hover: var(--PrimaryColor);
    background: red;
    gap: 10px;
    font-family: mainbold;
    display: flex;
    flex-direction: row;
    align-items: center;
    color: white;
    background-color: var(--base);
    border: none;
    border-radius: 12px;
    padding: 3px 12px;
    text-decoration: none;
}

    .bttn.danger {
        --base: darkred;
        --hover: red;
    }


    .bttn > *:not(.icon) {
        flex-grow: 1;
        min-width: 70px;
    }

    .bttn > .icon {
        flex-shrink: 1;
    }

    .bttn:hover {
        background-color: var(--hover);
        color: white;
    }

    .bttn.inactive {
        background-color: var(--GrayColor) !important;
    }
/* Table Control */
.grid-container {
    overflow-x: auto;
    max-width: 100%;
}


.table-base {
    background-color: var(--GrayColor);
    border-radius: 8px;
}

    .table-base tbody {
        outline: 1px var(--GrayColor) solid;
    }

        .table-base tbody tr > * {
            padding: 2px 10px;
            vertical-align: middle;
            outline: 1px var(--GrayColor) solid;
            text-wrap: nowrap;
        }

    .table-base tr {
        display: table-row;
    }

    .table-base thead tr {
        padding: 0px;
    }

        .table-base thead tr > * {
            padding: 0px;
        }

    .table-base thead button {
        background-color: var(--DarkColor);
        color: white;
        margin-top: 5px;
        padding: 4px 15px 2px;
        border: none;
        border-radius: 8px 8px 0px 0px;
    }

        .table-base thead button.inactive {
            background-color: transparent;
            color: black;
        }

    .table-base tbody tr {
        background-color: white;
    }

        .table-base tbody tr:hover {
            background-color: var(--GrayColor);
        }

.base-select {
    position: relative;
    border-radius: 8px;
    border: 1px black solid;
    background-color: var(--GrayColor);
}

    .base-select > select {
        background-color: transparent;
        border: none;
        min-width: 50px;
        height: 100%;
        width: 100%;
        color: black;
        padding-inline: 15px 25px;
        appearance: none;
    }

        .base-select > select:focus {
            outline: none;
        }

    .base-select::after {
        position: absolute;
        content: "";
        font-family: iconBold;
        top: 50%;
        right: 10px;
        font-size: 20px;
        pointer-events: none;
        transform: translateY(-50%);
    }

    .base-select:has(select:hover:focus)::after {
        content: "";
    }

    .base-select option {
        background-color: transparent;
    }

.base-inline-select {
    display: flex;
    flex-direction: row;
    padding: 3px;
    border-radius: 17px;
    background-color: var(--GrayColor);
    gap: 5px;
    flex-wrap: wrap
}

    .base-inline-select > button {
        border: none;
        border-radius: 5em;
        min-width: 60px;
        background-color: transparent;
    }

        .base-inline-select > button.active {
            background-color: var(--DarkColor);
            color: white;
        }


.expander-panel {
    border-radius: 15px;
    background-color: var(--DarkColor);
    padding: 10px;
}

.ep-button {
    background-color: transparent;
    width: 100%;
    color: white;
    border: none;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: start;
    align-items: center;
    padding: 0px;
}

    .ep-button > span {
        font-size: 1.1em;
    }

    .ep-button > .icon {
        font-family: iconBold;
        font-size: 25px;
        transform: rotateZ(180deg);
        transition: transform 150ms ease-out;
    }

        .ep-button > .icon.active {
            transform: rotateZ(0deg);
        }


.ep-con {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: white;
    border-radius: 12px;
    padding: 10px;
}

.border-con > *,
.border-con > * > * {
    border-radius: 0px !important;
}

.border-con > * {
    border-right: 2px var(--PrimaryLightColor) solid;
}

    .border-con > *:first-child,
    .border-con > *:first-child * {
        border-top-left-radius: 15px !important;
        border-bottom-left-radius: 15px !important;
    }

    .border-con > *:last-child,
    .border-con > *:last-child * {
        border-right: none;
        border-top-right-radius: 15px !important;
        border-bottom-right-radius: 15px !important;
    }


.row-group {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    max-width: 95vw;
}

    .row-group > label {
        width: 150px;
        vertical-align: middle;
        align-self: center;
    }

    .row-group > *:not(label) {
        min-width: 120px;
        width: auto;
        justify-self: center;
        flex-grow: 1;
    }

    .row-group > input[type=checkbox] {
        flex-grow: 0;
        min-width: 30px
    }


.rtl .row-group {
    flex-direction: row-reverse;
}

    .rtl .row-group > label {
        text-align: end;
    }

.map {
    position: relative;
    width: 80vw;
    height: 80vh;
}

    .map > #map {
        width: 100%;
        height: 100%;
    }

    .map > .control {
        display: flex;
        flex-direction: row;
        position: absolute;
        bottom: 0px;
        right: 0px;
        gap: 10px;
    }


    .map > #map button {
        background-color: var(--DarkColor);
        color: white;
        width: 35px;
        font-size: 20px;
        aspect-ratio: 1 / 1;
        border: none;
        border-radius: 8px;
        margin-right: 5px;
        margin-bottom: 5px;
    }


    .map > #map ul {
        display: none;
    }


.dd-container {
    --height: 40px;
    position: relative;
    z-index: 20;
    overflow: visible;
}

    .dd-container > input[type="checkbox"] {
        position: absolute;
        left: -9999px;
        opacity: 0;
        pointer-events: none;
    }



.dd-input:checked + label,
.dd-input:not(:checked) + label {
    position: relative;
    height: var(--height);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: var(--DarkerColor);
    color: white;
    cursor: pointer;
}

.dd-input + label:hover {
    background-color: var(--PrimaryColor);
}

.dd-input:checked + label:before,
.dd-input:not(:checked) + label:before {
    position: fixed;
    top: 0;
    left: 0;
    content: '';
    width: 100%;
    height: 100%;
    z-index: -1;
    cursor: auto;
    pointer-events: none;
}

.dd-input:checked + label:before {
    pointer-events: auto;
}


.dd-items {
    position: absolute;
    top: var(--height);
    left: 0px;
    width: auto;
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    background-color: #111;
    border-radius: 4px;
    z-index: 2;
    pointer-events: none;
}

.r .dd-items {
    left: unset;
    right: 0px;
}

.dd-input:checked ~ .dd-items {
    display: flex;
    pointer-events: auto;
}


.dd-table {
    position: absolute;
    top: 0px;
    right: 0px;
}

.img-s,
.img-xs,
.img-m,
.img-l {
    --min: 50px;
    --max: 90px;
    object-fit: cover;
    min-width: var(--min);
    min-height: var(--min);
    max-width: var(--max);
    max-height: var(--max);
}

.img-xs {
    --min: 25px;
    --max: 35px;
}

.img-m {
    --min: 65px;
    --max: 110px;
}

.img-l {
    --min: 250px;
    --max: 310px;
    object-fit: contain;
}

.img-xl {
    min-width: 80vw;
    min-height: 50vh;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

.img-selector {
    position: relative;
    border: 2px var(--DarkColor) dashed;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    min-height: 35px
}


    .img-selector::after {
        content: attr(data-content);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-family: 'icon';
        color: rgba(0,0,0,0.7);
        font-size: 25px;
        pointer-events: none;
    }

    .img-selector > input {
        position: absolute;
        color: transparent;
        background-color: transparent;
        inset: 0px;
        border: none;
    }

        .img-selector > input::file-selector-button {
            display: none;
        }

        .img-selector > input:hover {
            background-color: white;
            opacity: 0.5;
        }

    .img-selector:has(input:hover) {
        border-color: var(--PrimaryDarkColor);
    }

        .img-selector:has(input:hover):after {
            color: var(--PrimaryDarkColor);
        }




.general-search {
    --height: 32px;
    position: relative;
    width: 200px;
    height: var(--height);
}

.gs-container {
    display: flex;
}

    .gs-container > * {
        height: var(--height);
    }

.gs-input {
    position: relative;
    flex-grow: 1;
}

    .gs-input > input {
        width: 100%;
        height: 100%;
    }

    .gs-input > .bttn {
        position: absolute;
        inset: 0px;
        pointer-events: none;
        height: 100%;
    }

.general-search.active .gs-input > .bttn {
    display: none;
}

.general-search.active .border-con > * {
    border-end-start-radius: 0px !important;
    border-end-end-radius: 0px !important;
}

.general-search.active .items {
    display: flex;
}

.general-search .items {
    position: absolute;
    top: var(--height);
    left: 0px;
    right: 0px;
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--DarkColor);
    border-radius: 0px 0px 15px 15px !important;
    padding: 5px;
    z-index: 410;
}

.valid-error {
    font-size: 0.8em;
    color: red;
}

    .valid-error::before {
        content: 'star';
        font-family: 'iconBold';
        margin-right: 5px;
    }


.inline-option {
    display: flex;
    flex-direction: row;
}

    .inline-option > button {
        border-radius: 0px;
    }

        .inline-option > button:first-child {
            border-radius: 15px 0px 0px 15px;
        }

        .inline-option > button:last-child {
            border-radius: 0px 15px 15px 0px;
        }
