﻿/* =====================
   🎨 GLOBAL RESETS & BASE
   ===================== */
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');


.page {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}



html, body, #app {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: #f0f0f0;
    font-family: system-ui, sans-serif;
}

/* =====================
🧱 Javascript helper
Applies to MainLayout.razor, _Host.cshtml
===================== */
.tree-highlight {
    background-color: #ffffcc !important;
    transition: background-color 0.4s ease;
}



/* =====================
   🧱 ROOT LAYOUT STRUCTURE
   Applies to MainLayout.razor, _Host.cshtml
   ===================== */
#app {
    height: 100vh;
    width: 100vw;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
}


article.content {
    padding: 0 !important;
    margin: 0 !important;
}

.track-header {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 30px;
}

/* =====================
   🧭 SIDEBAR
   Applies to: Left navigation pane (MainLayout)
   ===================== */
.sidebar {
    background-color: seagreen;
    overflow-x: hidden;
    transition: width 0.3s ease;
    min-height: 100vh;
}

    .sidebar.expanded {
        width: 250px;
        flex: 0 0 250px;
    }

    .sidebar.collapsed {
        width: 80px;
        flex: 0 0 80px;
    }

        .sidebar.collapsed ~ .main-toolbar-container {
            margin-left: 80px;
        }

/* =====================
   🎛️ TOOLBAR
   Applies to: SfToolbar in Index.razor or MainLayout.razor
   ===================== */
.main-toolbar-container {
    flex: 0 0 auto;
    width: 100%;
    margin: 5px;
    padding: 5px;
}

.main-toolbar {
    width: 100%;
    box-sizing: border-box;
    margin: 5px;
    padding: 5px;
}

/* =====================
   🔲 MAIN CONTENT AREA
   Applies to <main> in MainLayout.razor
   ===================== */


/* =====================
   🧩 SPLITTERS & PANES
   Applies to SfSplitter and nested Splitters in Index.razor
   ===================== */
.splitter-body {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    overflow: hidden;
}




.e-splitter,
.e-splitter-pane,
.e-pane,
.e-control {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.e-splitter {
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* =====================
   📊 TAB, TREEVIEW, GRID PANELS
   ===================== */
.e-tab,
.e-tab-panel,
.e-tab-header,
.e-tab-content {
    margin: 0 ;
    padding: 0 ;
    border: none ;
}

.compact-grid .e-rowcell,
.compact-grid .e-headercell {
    font-size: 0.75rem;
}

.small-treeview .e-list-text {
    font-size: 0.65rem;
}

/* =====================
   🧱 CONTENT ZONES
   Used inside ContentTemplate wrappers
   ===================== */

/* =====================
   🎯 TOP ROW & ACCOUNT
   Applies to: Top nav bar in MainLayout
   ===================== */
.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /*padding: 5px 5px;*/
    padding: 0;
    min-height: 48px;
    box-sizing: border-box;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ccc;
    overflow-y: visible;
}

.center {
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
}

.account-menu {
    margin-left: auto;
    max-width: 200px;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    
}




/* =====================
   ✅ VALIDATION STYLES
   ===================== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* =====================
   ⚠️ ERROR UI (Blazor System)
   ===================== */
#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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...your-base64-image...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* =====================
   🔗 LINKS & BUTTONS
   ===================== */
a, .btn-link {
    color: #0071c1;
    margin-right: 10px !important;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
    margin-right: 10px !important;
}

.dialog-btn-spacing {
    margin-right: 10px !important;
}
    .dialog-btn-spacing:not(:last-child) {
        margin-right: 10px !important;
    }
.e-footer-content .e-btn:not(:last-child) {
    margin-right: 10px !important;
}
/* Force spacing between buttons inside SfDialog footer */
.e-footer-content .e-button:not(:last-child) {
    margin-right: 10px !important;
}

.e-footer-content .e-dialog-btn-spacer {
    margin-right: 10px;
}




/* =====================
   📱 RESPONSIVE MEDIA QUERIES
   ===================== */
@media (max-width: 576px) {
    .top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-menu {
        width: 100%;
        text-align: right;
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .account-menu {
        max-width: 100%;
        margin-top: 5px;
        text-align: right;
    }
}

@media (min-width: 769px) {
    .account-menu {
        margin-left: auto;
        max-width: 200px;
    }
}
