﻿html, body {
    font-family: HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.selection {
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.logout-btn {
    width: 40px;
    border-radius: 8px;
}

    .logout-btn .oi {
        font-size: 20px !important;
        background-color: transparent;
    }

app {
    position: relative;
    display: flex;
    /*flex-direction: column;*/
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


/** scroll bar */
::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #e1e1e1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background-image: linear-gradient(to bottom, rgba(17,17,17,1) 0%,rgba(76,76,76,1) 23%,rgba(76,76,76,1) 23%,rgba(71,71,71,1) 72%,rgba(17,17,17,1) 99%);
}

/* material theme */
:root {
    --mdc-theme-primary: #1d1d1d;
    --mdc-theme-secondary: #fbaf41;
    /*--mdc-theme-on-primary: #495f90;
    --mdc-theme-on-secondary: #ffe172;*/
    --mdc-theme-text-primary: #ffffff;
    --mdc-theme-text-secondary: #333;
    --mdc-theme-text-on-primary: #001037;
    --mdc-theme-text-on-secondary: #c48003;
    /*--mdc-theme-surface: #263238; */
}

.mdc-icon-button .fa {
    font-size: 30px;
}

/* Loading page */
.triangle-container {
    left: calc(-50vw + 50%);
    position: fixed;
    right: calc(-50vw + 50%);
    top: 0;
    bottom: 0;
    z-index: -1;
    background-color: #1d1d1d;
}

.triangles {
    background-image: url("../images/triangles.svg");
    background-size: cover;
    height: 100%;
    bottom: 0;
    left: 0;
    mix-blend-mode: hard-light;
    position: fixed;
    right: 0;
    top: 0;
    background-position: center center;
}

.loading-container {
    position: relative;
    text-align: center;
    background-color: #fff;
    margin: 10% auto 0 auto;
    padding: 20px;
}

/* Login page */
.login-body {
    position: relative;
}

.logo {
    text-align: center;
}

    .logo h4 {
        margin: 20px auto;
    }

.login-container, .loading-container, .mdc-card {
    border-radius: 0 !important;
    box-shadow: 0 8px 17px 0 rgba(0,0,0,.2), 0 6px 20px 0 rgba(0,0,0,.19) !important;
}

    .login-container .mdc-card {
        padding: 40px 30px;
        width: 500px;
    }

    .login-container .mat-accordion {
        width: 500px;
    }

.container-fluid .login-container {
    display: block;
    max-width: 500px;
}

.additional-info {
    color: #636c72;
    background-color: rgba(0,0,0,.04);
    padding: 10px 6px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: .875rem;
}

.login-container {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    align-content: center;
    margin: 5% auto 0;
}

.login-body {
    flex-direction: column;
    margin: 0 auto;
}

    .login-body .mat-accordion .mat-expansion-panel__header {
        flex-basis: 80%;
    }

    .login-body .mat-expansion-panel {
        background-color: #f4f4f4 !important;
    }

.GoogleGLogo {
    width: 20px;
    height: 20px;
    margin: auto;
}


/* app bar */
.mdc-top-app-bar__row {
    background-color: #fff;
    color: #404040;
}

.mdc-icon-button {
    color: #1d1d1d !important;
}

.logo-img {
    height: 42px;
}

.mdc-top-app-bar {
    box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
    color: white;
    z-index: 7 !important;
    position: sticky !important;
    top: 0;
}

.mdc-top-app-bar__title,
.mdc-top-app-bar__title a {
    color: white;
}


.sub-menu {
    visibility: hidden; /* hides sub-menu */
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    transform: translateY(-2em);
    z-index: -1;
    transition: all 0.3s ease-in-out 0s, visibility 0s linear 0.3s, z-index 0s linear 0.01s;
}

.hidden-mdc-down nav a {
    color: #E00;
    display: block;
    padding: 0.5em 1em;
    text-decoration: none;
}

    .hidden-mdc-down nav a:hover {
        color: #F55;
    }

.hidden-mdc-down nav ul,
.hidden-mdc-down nav ul li {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.hidden-mdc-down nav > ul {
    background: #EEE;
    text-align: center;
}

    .hidden-mdc-down nav > ul > li {
        display: inline-block;
        border-left: solid 1px #aaa;
    }

        .hidden-mdc-down nav > ul > li:first-child {
            border-left: none;
        }

.sub-menu {
    background: #DDD;
}


/* page */
.container-fluid {
    min-height: 350px;
    padding: 10px 30px;
}

.page-footer {
    bottom: 0;
    right: 0;
    display: flex;
    flex: 0 0 auto;
    background: #fff;
    color: #4d4d4d;
    padding: 7px 0px 3px 18px;
    box-shadow: 0 0 5px 0 rgba(0,0,0,0.21);
    font-size: 12px;
}

.flex-1 {
    flex: 1;
}

.mini .mdc-drawer,
.mini .app-sidebar {
    width: 54px;
    transition: width .4s ease-in-out;
}

    .mini .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
        margin-left: 54px;
        transition: margin-left .4s ease-in-out;
    }

.mini .drawer-profile {
    padding: 0 4px;
}

.mini .mdc-sub-menu-icon,
.mini .miniHover {
    transform: translateX(200%);
    animation: slide-out 1s forwards;
    transition: .4s ease-in-out;
    visibility: hidden;
    opacity: 0;
    position: fixed;
}

.mini .mdc-drawer:hover .mdc-sub-menu-icon,
.mini .mdc-drawer:hover .miniHover {
    transform: translateX(0%);
    animation: slide-in 1s forwards;
    transition: width .4s ease-in-out;
    visibility: visible;
    opacity: 1;
    position: relative;
}

.mini .drawer-footer .mdc-button {
    min-width: 36px;
}

.mdc-drawer:hover,
.mdc-drawer:hover .app-sidebar,
.full .mdc-drawer,
.full .app-sidebar {
    width: 256px;
    transition: width .4s ease-in-out;
}

.closed .mdc-drawer,
.closed .app-sidebar {
    width: 0;
    transition: width .4s ease-in-out;
}

.mini .mdc-drawer:hover.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content,
.full .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
    margin-left: 256px;
    transition: margin-left .4s ease-in-out;
}

.closed .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
    margin-left: 0;
    transition: margin-left .4s ease-in-out;
}

.mdc-drawer__content {
    background-image: linear-gradient(180deg, rgba(17,17,17,1) 0%, #1d1d1d 70%);
    color: #FFF;
}

.mdc-drawer .mdc-list-item {
    margin: 8px 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
}

.mdc-drawere .mdc-list-item:active {
    box-shadow: inset 3px 0 0 #886ab5;
}

.mdc-drawer .mdc-list-item--disabled {
    color: rgba(125,125,125,0.87) !important;
}

.mdc-drawer a.mdc-list-item {
    padding: 0 14px !important;
}

.mdc-drawer .mdc-list-item--selected {
    border-left: solid 3px rgba(255, 255, 255, .5);
}

    .mdc-drawer .mdc-list-item--selected::before {
        opacity: 0.3 !important;
    }

.mdc-expansion-panel--selected .mat-expansion-panel__summary {
    border-left: solid 3px rgba(255, 255, 255, .3);
}

    .mdc-expansion-panel--selected .mat-expansion-panel__summary::before {
        opacity: 0.2 !important;
    }

.mat-accordion .mdc-nav-menu .mat-expansion-panel.mat-expansion-panel--expanded {
    margin: 0;
}

.drawer-header {
    display: flex;
    align-items: stretch;
    height: 56px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* LEFT SIDE (fills remaining space) */
.drawer-logo {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    flex: 1; /* take all available space */
}

    .drawer-logo a {
        color: #fff;
        text-decoration: none;
    }

/* RIGHT SIDE */
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

/* optional: make select fit nicely */


.drawer-profile {
    padding: 16px;
    border-bottom: solid 1px #777;
    background-image: url("../images/profile-bg.jpg");
    background-size: cover;
    color: #fff;
    font-size: 12px;
}

    .drawer-profile a,
    .drawer-profile .material-icons {
        color: #fff;
    }

.app-sidebar .material-icons {
    margin-right: 8px;
    padding-left: 7px;
}

.app-sidebar .mat-expansion-panel__content .material-icons {
    padding-left: 2px;
    margin-left: -3px;
}

.mdc-drawer {
    /*margin-top: 64px;*/
    box-shadow: 2px 0 5px 0 rgba(0,0,0,0.16);
}

.mdc-drawer-app-content {
    background-color: #f5f5f5;
}

.mat-drawer-container-responsive {
    display: flex;
    flex-direction: row;
}

    .mat-drawer-container-responsive .mdc-drawer {
        width: unset !important;
        position: relative;
    }

        .mat-drawer-container-responsive .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
            margin-left: unset !important;
            position: relative;
            flex: 1;
        }

.mdc-top-app-bar--fixed-adjust {
    padding-top: 0 !important;
    overflow: hidden;
}

.drawer-footer {
    position: absolute;
    text-align: left;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: solid 1px #AAA;
    font-size: 12px;
    background-color: lightgray
}

/*  forms */
fieldset {
    border: none;
}

hr {
    clear: both;
}

/* breadcrumbs */
ul.breadcrumb {
    padding: 10px 16px;
    list-style: none;
    background-color: #eee;
}

    /* Add a slash symbol (/) before/behind each list item */
    ul.breadcrumb li + li:before {
        padding: 8px;
        content: "›";
    }

    ul.breadcrumb li,
    ul.breadcrumb li a {
        text-transform: uppercase;
        text-shadow: none;
        font-size: 13px;
        text-decoration: none;
        display: inline;
    }

        ul.breadcrumb li a:hover {
            text-decoration: underline;
        }

/* misc */
.contrib-card {
    padding: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .contrib-card img {
        height: 50px;
        width: 50px;
    }

.screenshot {
    text-align: center;
    display: block;
}

    .screenshot img {
        max-width: 100%;
    }

/* Extra small devices (portrait phones, less than 576px) */
@media screen and (max-width: 596.98px) {
    .drawer-logo {
        height: 56px;
    }

    .logo-img {
        height: 38px;
    }

    .foreach .mobilehidetext {
        display: none;
    }
}

/* Small devices (landscape phones, less than 768px)*/
@media (max-width: 767.98px) {
    /* Sidebar becomes a fixed overlay – no longer in flex flow, does not push content */
    .app-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        z-index: 500;
        box-shadow: 2px 0 8px rgba(0,0,0,0.35);
        transition: width 0.25s ease;
    }

    .sidebar-expanded {
        width: 250px;
    }

    .sidebar-collapsed {
        width: 0;
        border-right: none;
    }

    /* Compact header: hide brand text and username to save space */
    .miniHover {
        display: none !important;
    }

    .user-name {
        display: none;
    }

    /* Shrink language selector on mobile */
    .selection {
        width: 80px;
        font-size: .72rem;
        padding: 3px 4px;
    }

    /* Legacy mdc-drawer rules kept for backward compatibility */
    .mdc-drawer {
        width: 54px;
        transform: translateX(0%);
        transition: width .4s ease-in-out;
    }

    .drawer-profile {
        padding: 0 4px;
    }

    .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
        margin-left: 54px;
        transition: margin-left .2s ease-in-out;
    }

    .mat-accordion .mdc-nav-menu .mat-expansion-panel__content {
        padding-left: 6px;
    }

    .full .mdc-drawer:hover .mat-accordion .mdc-nav-menu .mat-expansion-panel__content {
        padding-left: 13px;
    }

    .mdc-sub-menu-icon,
    .drawer-profile span,
    .brand {
        visibility: hidden;
        opacity: 0;
        position: fixed;
    }

    .mdc-drawer:hover,
    .full .mdc-drawer {
        width: 256px;
        z-index: 99;
    }

    .full .drawer-profile span,
    .full .brand,
    .mdc-drawer:hover .drawer-profile span,
    .mdc-drawer:hover .brand {
        visibility: visible;
        opacity: 1;
        position: relative;
    }

    .full .mdc-top-app-bar__section--align-end {
        display: none;
        transition: .4s ease-in-out;
    }

    .full .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
        margin-left: 256px;
        transition: margin-left .2s ease-in-out;
    }

    .closed .mdc-drawer {
        width: 0;
        transform: translateX(-100%);
        animation: slide-out 1s forwards;
        transition: .4s ease-in-out;
    }

    .closed .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing) + .mdc-drawer-app-content {
        margin-left: 0;
        transition: margin-left .2s ease-in-out;
    }

    .drawer-footer {
        padding: 0;
    }

    .login-container .mdc-card {
        padding: 20px;
        width: 300px;
    }

    .login-container .mat-accordion {
        width: 300px;
    }

    .loading-container {
        padding: 10px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
}

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
}

/* ── Mobile sidebar overlay backdrop ── */
.mobile-sidebar-overlay {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 499;
        cursor: pointer;
    }
}

/* ── Page content area with responsive padding ── */
.page-content-area {
    width: 100%;
    max-width: 1600px;
    padding: 2rem;
}

@media (max-width: 767.98px) {
    .page-content-area {
        padding: 1rem 0.75rem;
    }
}


/* MatBlazor temp */
.mat-toast-body {
    padding: 8px 5px;
}

.mat-toast-icon {
    padding-left: 5px;
}

.mat-toast-close-button .material-icons {
    color: white;
}

.search-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
}

.grid-search-box {
    width: 400px; /* fixed width looks more DevExpress-like */
}

.dxbl-grid-search-panel {
    display: flex !important;
    align-items: center;
    padding-right: 12px;
}
.orders-list {
    max-height: 140px;
    overflow-y: auto;
}

.orders-row {
    display: grid;
    grid-template-columns: 200px 800px 150px 80px;
    align-items: center;
    padding: 0 12px;
}
    .orders-row > div {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.orders-header {
    font-weight: 600;
}
    .orders-header > div {
        white-space: nowrap;
    }

.orders-grid .dxbl-grid-table tbody tr:hover {
    background-color: #e6f2ff !important;
    cursor: pointer;
}

/* ── Sidebar toggle button ── */
.sidebar-toggle-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    padding: 6px 10px;
    margin-right: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .sidebar-toggle-btn:hover {
        background: rgba(255,255,255,0.15);
        color: #fff;
    }

/* ── Collapsible sidebar ── */
.app-sidebar {
    border-right: 1px solid #e0e0e0;
    background: #fff;
    overflow: hidden;
    transition: width 0.25s ease;
    flex-shrink: 0;
}

.sidebar-expanded {
    width: 250px;
}

.sidebar-collapsed {
    width: 0;
    border-right: none;
}

/* ── User info button in header ── */
.user-info-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px 4px 12px;
    border-radius: 24px;
    transition: background 0.15s;
}

    .user-info-btn:hover {
        background: rgba(255,255,255,0.15);
    }

.user-name {
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .9rem;
}

/* ── Language selector in header ── */
.selection {
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 5px 8px;
    font-size: .8rem;
    height: 34px;
}

    .selection option {
        background: #fff;
        color: #333;
    }

.flag-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.3);
}

    .flag-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ── NavMenu DxTreeView – gray selection instead of blue ── */
.app-sidebar-dx .dxbl-treeview-node-selected > .dxbl-treeview-item,
.app-sidebar-dx .dxbl-treeview-node-selected > .dxbl-treeview-item:hover {
    background-color: #e8e8e8 !important;
    color: #222 !important;
    border-radius: 4px;
}

.app-sidebar-dx .dxbl-treeview-item:hover {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}

/* ── Nav letter-header separators ── */
.nav-letter-header > .dxbl-treeview-item {
    font-size: .6rem !important;
    font-weight: 700 !important;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #999 !important;
    padding: 6px 12px 2px !important;
    margin-top: 4px;
    cursor: default !important;
    pointer-events: none;
    min-height: auto !important;
    border-top: 1px solid #eee;
}
