﻿i#collapsemenuIcon.hidden {
    display: none;
}

/* ============================================================
   2. TABLET STYLES (Max-width: 1024px)
   Applies when screen is 1024px or SMALLER.
   ============================================================ */
@media screen and (max-width: 1024px) {
    i#collapsemenuIcon.hidden {
        display: block;
        opacity:1;
    }
    .screen-content {
        padding: 12px;
    }

    .main-screen-card .screen-title {
        font-size: 20px;
    }

    .dashboard-grid-new {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 10px;
    }

    .number-display {
        width: 50%;
    }

    .number-display {
        font-size: 18px;
    }

    .info-box {
        padding: 12px;
    }

        .info-box:before {
            border-width: 1px;
        }

    .sidebar {
        position: fixed;
        right: -380px;
        width: 380px;
    }

    [dir='ltr'] .sidebar {
        position: fixed;
        left: -380px;
        right: auto;
        width: 380px;
    }

    div#page-container {
        max-width: 100%;
    }

    span.screen-title-dashboard {
        font-size: 20px !important;
    }

    .screen-content-data {
        width: 100%;
    }
    .screen-content.collapsed-menu .sidebar {
        position: fixed !important;
        right: 0 !important;
        margin: 0 !important;
        z-index: 9999 !important;
    }
    .screen-content.collapsed-menu .page-top-bar {
        margin-right: 380px;
    }
    .page-title-component {
        max-height: 100px;
        min-height: 100px;
    }

    #layout-preview {
        min-height: calc((100vh / var(--zoom) - 285px));
        max-height: calc((100vh / var(--zoom) - 285px));
    }

    .text-box-container * {
        font-size: 12pt !important;
        line-height: 15pt !important;
    }

    .kpi-header {
        font-size: 12pt !important;
    }

    .kpi-value {
        font-size: 28pt !important;
    }
}

/* ============================================================
   3. MOBILE STYLES (Max-width: 768px)
   Applies when screen is 768px or SMALLER.
   ============================================================ */
@media screen and (max-width: 768px) {
    .screen-content {
        padding: 12px;
        overflow-y: auto;
    }

    .screen-content-data {
        width: calc(100vw / var(--zoom) - 24px);
        height: auto;
    }

    .main-screen-card {
        height: auto;
        display: block;
        padding: 12px;
        font-family: var(--main-font), sans-serif;
    }

        .main-screen-card .screen-title {
            font-size: 20px;
            color: var(--primary-font-color);
        }

        .main-screen-card .top-part {
            flex: 1;
            direction: rtl;
            justify-content: center;
        }

        .main-screen-card .main-logo img {
            height: 80px;
            width: 100%;
            margin: 0 auto;
        }

    .menu-content {
        padding-top: 12px;
    }

    .menu-items-card {
        max-width: 100%;
        gap: 12px;
    }

    .menu-card {
        border-radius: 10px;
        padding: 12px;
        text-align: center;
        height: auto;
        cursor: pointer;
        min-width: 100%;
    }

    .screen-details-content {
        display: none;
    }

    .screen-footer-content {
        display: block;
    }

    .right-footer-part {
        border-top-right-radius: 20px;
        border-top-left-radius: 20px;
    }

    .left-footer-part {
        border-radius: 20px 20px;
    }

    .sidebar {
        position: fixed;
        right: -90%;
        margin: 0;
        width: 90%;
        max-width: 100%;
        min-width: 250px;
        left: auto;
    }

    div#page-container {
        width: 100%;
        max-width: 100%;
    }

    .dashboard-header {
        flex-wrap: wrap;
        overflow-x: auto;
    }

    .dashboard-title-section {
        width: 100%;
        flex-wrap: wrap;
    }

    span.screen-title-dashboard {
        font-size: 20px !important;
        text-align: center;
    }

    .page-title-component {
        gap: 20px !important;
        justify-content: normal !important;
        align-items: baseline !important;
        padding: 12px !important;
    }

    .text-box-container,
    .e-panel-content,
    .e-panel-container,
    .panel-element-container,
    #layout-preview .e-panel {
        height: auto !important;
    }

    #layout-preview .e-panel {
        position: relative !important;
        top: auto !important;
        display: block;
        margin-bottom: 24px;
    }
}
