﻿:root {
    --app-nav-back-color: dodgerblue;
    /*--nav-bar-bootom: 0px;*/ /*mobile: 49px*/
    --nav-bar-top: 0px; /*mobile: 42px*/
    --nav-bar-height: 48px; /*mobile: 42px*/
    --main-minus: 100px; /*mobile: 192px; */
    /*--direction: rtl !important;*/
    --nav-bottom-padding: 1px;
}
fluent-button::part(control),
fluent-text-area::part(control),
fluent-text-field::part(control),
fluent-search::part(control),
fluent-combobox::part(selected-value),
fluent-number-field::part(control) {
    font-size: 16px; 
}
 
::part(control) {
    --dialog-padding: 4px !important;
    /*--dialog-width: auto !important;*/
    --dialog-height: auto !important; 
}

fluent-dialog::part(control) {
    border: 2px solid var(--app-nav-back-color) !important;
    border-radius: 8px 3px 0 0 !important;
}

/*Using fix for into dialog apply*/
fluent-dialog.fix::part(control) {
    position: fixed !important;
    top: -50dvh !important;
}

    fluent-dialog.fix::part(control)::before {
        content: "";
        position: absolute;
        top: calc(-50dvh + 100px);
        left: 0;
        right: calc(-50dvw + 106px);
        bottom: 0;
        height: 100dvh;
        width: 100dvw;
        background-color: rgba(0, 0, 0, 0.5); /* اللون الخلفي */
        z-index: -1; /* التأكد من أن الطبقة تكون خلف المكون */
    }
/*Using red input dialog red apply*/
fluent-dialog.red::part(control) {
    background-color: red !important;
}


/*fluent-dialog:has(div[class~="fluent-dialog-body"]) .fluent-dialog-body {
    padding: 12px !important;
}*/

.fluent-dialog-footer {
    justify-content: start !important;
}

.fluent-dialog-header {
    background-color: var(--app-nav-back-color);
    color: white !important;
    margin: -4px;
    padding: 4px !important;
    height: 24px;
}

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: color-mix( in srgb, var(--app-nav-back-color, white) 25%, transparent );
}

.main {
    min-height: calc(100dvh - var(--main-minus, 0px));
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
}

.body-content {
    align-self: stretch;
    height: calc(100dvh - var(--main-minus, 0px)) !important;
    display: flex;
}

.content {
    /*padding: 0.5rem 0.5rem;*/
    align-self: stretch !important;
    width: 100%;
    /*height: 91%;*/
}

h1, h2, h3, h4, h5, h6, div {
    /*color: var(--neutral-foreground-rest);*/
    /*background: var(--neutral-layer-1);*/
}

header, .header, .header-gutters {
    background-color: var(--app-nav-back-color) !important;
    background: var(--neutral-layer-1);
    /*height: 48px !important;
    min-height: 48px !important;*/ /* نستخدم min-height للتأكيد */
    /*padding: 0 15px;*/
}



.btn-maroon {
    color: white !important;
    background-color: maroon !important;
}

.btn-disabled {
    color: white !important;
    background-color: gray !important;
}


.has-sticky-bottom {
    padding-bottom: var(--nav-bar-height, 48px);
}

.sticky-bottom {
    position: fixed;
    background-color: color-mix( in srgb, var(--app-nav-back-color, white) 75%, transparent );
    bottom: calc(var(--nav-bar-height, 48px) + 6px + var(--nav-bar-top, 0px));
    left: 0;
    right: 0;
    padding: 8px;
    z-index: 1000;
}

.sticky-top {
    position: fixed;
    background-color: color-mix( in srgb, var(--app-nav-back-color, white) 75%, transparent );
    top: calc(var(--nav-bar-height, 48px) + var(--nav-bar-top, 0px));
    left: 0;
    right: 0;
    padding: 8px;
    z-index: 1000;
}

@keyframes pulse {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadex {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.over-dim {
    position: fixed;
    width: 100%;
    height: 100%;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); /* تعتيم خفيف */

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* دعم سفاري */

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .over-dim .content {
        animation: pulse 0.3s 1 ease-in-out;
        max-height: calc(100vh - 40px); /* بسبب margin 20px */
        overflow-y: auto;
        padding: 20px;
        margin: 20px;
        width: calc(100% - 0px);
        height: auto;
        /*background-color: color-mix( in srgb, var(--app-nav-back-color, white) 75%, white );*/
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    }



.over-content {
    position: absolute;
    width: calc(100% - 16px);
    height: calc(100% - 18px);
    padding: 8px;
    top: calc(var(--nav-bar-height, 48px) + var(--nav-bar-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    background-color: gainsboro;
}

#app-loading {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #444;
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}



.over-opax {
    position: fixed;
    width: calc(100% - 48px);
    height: 32px;
    padding: 8px;
    left: 16px;
    right: 16px;
    bottom: 54px;
    z-index: 1000;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.75);
    animation: pulse 0.3s 1 ease-in-out;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* دعم سفاري */
}
