﻿/* =============================== */
/* General Layout & Page Structure - Bootstrap 5.1 */
/* =============================== */
html, body {
    overflow-x: hidden;
    width: 100%;
}

#page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#maintext.main-content {
    padding: 15px;
    flex-grow: 1;
    height: calc(100vh - 3.5rem - 3rem); /* Header (3.5rem) + Footer (3rem) */
    overflow-y: auto;
}

/* Main Layout */
.row {
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 10px;
}

.item-manager-container {
    width: 100%;
    padding: 10px;
}


/* Left Panel: Grids and Documents */
.item-grid, .item-documents {
    width: 100%;
    margin-bottom: 20px;
}

.item-grid {
    height: 60vh;
    overflow: hidden;
}

.item-documents {
    height: 40vh;
    overflow-y: auto;
}

/* Right Panel: Sticky Details */
.sticky-details {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-left: 1px solid #ddd;
    padding: 15px;
    width: 22%;
}

.d-flex {
    display: flex;
    align-items: center;
}




/* Responsive Layout */
@media screen and (max-width: 1024px) {
    .row {
        flex-direction: column;
    }

    .sticky-details {
        position: relative;
        width: 100%;
        height: auto;
    }
}


/* =============================== */
/* Forms, Validation, Controls     */
/* =============================== */

.control_wrapper {
    max-width: 500px;
    margin: auto;
    border: 1px solid #ddd;
    border-radius: 3px;
    max-height: 420px;
    min-height: 230px;
    overflow: auto;
}



/* Active Item Code */
.active-item-code {
    font-size: smaller;
    font-weight: normal;
    margin-left: 10px;
}

/* Column Name */
.column-name div {
    margin-bottom: 2px;
    margin-left: 5px;
}

/* Column Value */
.column-value {
    white-space: normal;
    display: block;
    margin-bottom: 5px;
    margin-left: 20px;
}

/* Selected row: LightCyan */
.e-grid .e-row[aria-selected="true"] .e-rowcell,
.e-grid .e-selectionbackground,
.e-grid .e-selectionbackground .e-rowcell {
    background-color: #E0FFFF !important;
}

/* Hover row: Azure */
.e-grid .e-row:hover .e-rowcell {
    background-color: #F0FFFF !important;
}

/* Hightlight Cell if BOMSync corrects an improperly entered formula */
.formula-cell {
    transition: background-color 0.3s ease;
}

.formula-cell.uppercase {
    /* background-color: #e0f7fa;*/ /* optional: light cyan if visually needed */
    font-weight: bold;
}


/* =============================== */
/* Section Titles & Headers        */
/* =============================== */

.section-title {
    background-color: cornflowerblue;
    color: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.info-grid h3 {
    color: white;
    padding: 10px;
    margin: 0;
    border-radius: 4px;
}

.bg-cornflower {
    background-color: cornflowerblue;
    color: white;
    padding: 10px;
    border-radius: 5px;
}

.e-mastertext, .e-statustext {
    margin: 10px 0;
}


/* =============================== */
/* Detail Panels                   */
/* =============================== */
.item-details-panel h5 {
    font-size: 0.9rem;
}

.item-details-panel .btn-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* =============================== */
/* Image Carousel Styles           */
/* =============================== */

/*.template-carousel-section .carousel-sample {
    margin: 0 auto 2em;
    max-width: 200px;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}*/
.template-carousel-section {
    max-width: 240px;
    margin: 0 auto;
    overflow: hidden;
}

.templateCarousel .e-carousel-items {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*.templateCarousel .img-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    width: 100%;
}*/

.templateCarousel {
    width: 100%;
    max-width: 100%;
}

.templateCarousel .img-container {
    width: 200px;
    margin: 0 auto;
}


.templateCarousel .img-caption {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
    position: static; /* Remove relative positioning */
}

.templateCarousel img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.templateCarousel .img-container img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.templateCarousel .e-carousel-navigators {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 0;
    width: 100%;
    padding: 0 10px;
    pointer-events: none;
}

    .templateCarousel .e-carousel-navigators .nav-btn {
        pointer-events: auto;
        padding: 0;
        background-color: transparent;
    }

    .templateCarousel .e-carousel-navigators svg {
        fill: none;
        stroke: currentColor;
        stroke-linecap: square;
        stroke-width: 8px;
        height: 1rem;
        width: 1rem;
    }

    .templateCarousel .e-carousel-navigators .e-previous svg {
        transform: rotate(180deg);
    }

.templateCarousel .e-carousel-indicators .e-indicator-bars .e-indicator-bar .indicator {
    background-color: #ECECEC;
    border-radius: 0.25rem;
    cursor: pointer;
    height: 3.5rem;
    margin: 0.5rem;
    width: 5rem;
}

.templateCarousel .e-carousel-indicators .e-indicator-bars .e-indicator-bar.e-active .indicator {
    background-color: #3C78EF;
}

/* =============================== */
/* Image Thumbnails Section        */
/* =============================== */

.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.thumbnail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .thumbnail-container img {
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .thumbnail-container button {
        margin-top: 5px;
        padding: 5px 10px;
        border: none;
        border-radius: 3px;
        cursor: pointer;
    }

/* =============================== */
/* Responsive Carousel Adjustments */
/* =============================== */

@media screen and (max-width: 480px) {
    .template-carousel-section .carousel-sample {
        width: 100%;
        height: 250px;
    }

    .templateCarousel .img-container {
        margin: 12px;
    }
}

@media screen and (min-width: 480px) {
    .template-carousel-section .carousel-sample {
        width: 80%;
        height: 400px;
    }
}

/* =============================== Main Layout Styles =============================== */

/* =============================== */
/* Sticky Toolbar and Footer */
/* =============================== */

.sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
}


/* Footer */
.footer-bar {
    flex-shrink: 0;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f7f7;
    border-top: 1px solid #ccc;
    font-size: 0.9rem;
}

/* Container Adjustments */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}


/* =============================== */
/* Sidebar Menu (Full and Collapsed) */
/* =============================== */


/* Sidebar Menu Scroll and Height */
.sidebar-menu {
    position: fixed;
    margin-top: 3rem;
    height: calc(100vh - 6.5rem); /* ⬅️ Subtract header (3rem) and footer (3.5rem) */
    overflow-y: auto; /* Scroll if needed */
    background-color: #7eaacd; /* Restore background if lost */
    background: linear-gradient(rgba(126, 170, 205, 0.85), rgba(126, 170, 205, 0.75)), url('/images/ai-grid-overlay2.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-right: 1px solid #7eaacd; /* Clean edge */
    z-index: 10;
}

    /* Sidebar Adjustments */
    .sidebar-menu.sticky-adjusted {
        margin-top: 3rem;
    }

    .sidebar-menu.no-sticky {
        margin-top: 0;
    }




#wrapper .sidebar-menu .e-menu-container {
    border: 0;
    height: 100vh;
    overflow-y: auto;
}

/* =============================== */
/* 2. Sidebar Menu Layout Adjustments */
/* =============================== */
/* Full Width Menu */
.sidebar-menu .e-menu-container ul .e-menu-item.e-menu-caret-icon {
    width: 220px;
}

/* Collapsed Width */
.sidebar-menu.e-dock.e-close .e-menu-container ul .e-menu-item {
    width: 50px;
    padding-right: 12px;
}

.sidebar-menu.e-dock.e-close .e-menu-container ul.e-vertical {
    width: 50px !important;
    min-width: 0;
}


/* =============================== */
/* Icon Handling (Collapsed State) */
/* =============================== */


/* Hide Text, Keep Icons */
.sidebar-menu.e-dock.e-close .e-menu-container ul.e-menu {
    font-size: 0;
}

    .sidebar-menu.e-dock.e-close .e-menu-container ul.e-menu .e-menu-icon {
        font-size: 18px !important;
        display: inline-block !important;
  /*      color: white !important;*/
        width: auto;
        height: auto;
        line-height: 1;
        text-align: center;
        vertical-align: middle;
    }

    /* Material Symbols (Google) */
    .sidebar-menu.e-dock.e-close .e-menu-container ul.e-menu .material-symbols-outlined {
        font-family: 'Material Symbols Outlined' !important;
        font-size: 18px !important;
        display: inline-block !important;
/*        color: white !important;*/
    }

    /* Bootstrap Icons */
    .sidebar-menu.e-dock.e-close .e-menu-container ul.e-menu .bi {
        font-size: 18px !important;
        display: inline-block !important;
/*        color: white !important;*/
    }



/* Hide Caret Arrow when collapsed */
.sidebar-menu.e-dock.e-close .e-menu-container ul .e-menu-item .e-caret {
    display: none;
}

/* Hide Menu Text when collapsed */
.sidebar-menu.e-dock.e-close .e-menu-container ul .e-menu-item .e-menu-text {
    display: none;
/*    display: inline-block !important;
    color: white !important;*/
}

/* Overflow Control */
.sidebar-menu, .e-menu-wrapper, .e-menu-container ul {
    overflow: hidden;
}


/* =============================== */
/* Toolbar and Icons */
/* =============================== */


/* Sidebar Menu Appearance */
#wrapper .icon-menu {
    font-size: 24px;
}

    #wrapper .icon-menu:before {
        content: '\e914';
        font-family: 'sbicons';
    }

/* Toolbar Styling */
.material #wrapper .e-toolbar {
    border-bottom: 1px solid rgba(0,0,0,0.12);
}


/* =============================== */
/* Special Icon Classes */
/* =============================== */

/* Folder/Heading Font Sizes */
.e-folder {
    text-align: center;
    font-weight: 500;
    font-size: 16px;
}

.e-bigger .e-folder {
    font-size: 18px;
}



/* =============================== */
/* 4. NavBar Icon Styles (Material & Google Icons) */
/* =============================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.bi {
    display: inline-block;
    position: relative;
    margin-right: 0.75rem;
    background-size: cover;
    font-size: 1.25rem;
    vertical-align: middle;
}

/* =============================== */
/* 5. NavBar Icon Styles (Bootstrap Icons) */
/* =============================== */

/* Material Icons */
/* Special class for Material Symbols inside Menu */
.material-symbols-precision-manufacturing::before {
    font-family: 'Material Symbols Outlined';
    content: "precision_manufacturing";
    font-size: 24px;
    font-weight: normal;
}

.material-symbols-logout::before {
    font-family: 'Material Symbols Outlined';
    content: "logout";
    font-size: 24px;
    font-weight: normal;
}

/* Bootstrap Icons */

/* HEADER */
.bi-chevron-left, .bi-chevron-right {
    font-size: 1.50rem;
    color: white;
}

/* HOME */
.bi-house-door {
    font-size: 1.25rem;
    color: dodgerblue !important;
}

/* REGISTER */
.bi-person-workspace {
    font-size: 1.25rem;
    color: salmon !important;
}

/* COMPANY */
.bi-building {
    font-size: 1.25rem;
    color: salmon !important;
}

/* CONTACTS */
.bi-people-fill {
    font-size: 1.25rem;
    color: salmon;
}

/* PROJECTS */
.bi-buildings {
    font-size: 1.25rem;
    color: salmon;
}

/* BIM DATA */
.bi-diagram-3-fill {
    font-size: 1.25rem;
    color: deepskyblue;
}

/* RESOURCES - ITEMS */
.bi-boxes {
    font-size: 1.25rem;
    color: deepskyblue;
}

/* RECIPES */
.bi-list-columns {
    font-size: 1.25rem;
    color: deepskyblue;
}

/*ADMIN SETTINGS */
.bi-tools {
    font-size: 1.25rem;
    color: orange;
}

/*USER SETTINGS */
.bi-toggles {
    font-size: 1.25rem;
    color: orange !important;
}

/* PROCUREMENT */
.bi-cart {
    font-size: 1.25rem;
    color: mediumspringgreen;
}

/* SHIPPING */
.bi-truck {
    font-size: 1.25rem;
    color: mediumspringgreen;
}

/* HELP */
.bi-info-square {
    font-size: 1.25rem;
    color: whitesmoke;
}

/* REGISTER */
.bi-person-plus {
    font-size: 1.25rem;
    color: white;
}

/* PROFILE */
.bi-person-badge {
    font-size: 1.25rem;
    color: white;
}

/*LOGIN */
.bi-box-arrow-in-right {
    font-size: 1.25rem;
    color: white;
}

/* LOGOUT */
.bi-box-arrow-left {
    font-size: 1.25rem;
    color: white;
}

/* AUTHENTICATION */
.bi-fingerprint {
    font-size: 1.25rem;
    color: white;
}

.bi-shield-lock {
    font-size: 1.25rem;
    color: orange !important;
}
