﻿:root {
    --ThemeColor: rgb(60 32 96);
    --drawer-width-expanded: 260px;
    --drawer-width-collapsed: 80px; /* Increased from 70px */
    --appbar-height: 80px;
    --transition-duration: 0.3s;
    --mud-default-borderradius: 0px;
    /*    --mud-palette-action-default-hover:  rgb(47 64 134) !important;*/
}

body {
    font-family: 'Roboto SemiCondensed', Arial, sans-serif !important;
}

/* ==========================================================================
   APP BAR
   ========================================================================== */
.mud-appbar.mud-appbar-fixed-top {
    box-shadow: none;
    border-bottom: solid #dbdbdb 1px;
    height: var(--appbar-height) !important;
    z-index: 1400 !important;
}

/* ==========================================================================
   DESKTOP DRAWER - COLLAPSIBLE
   ========================================================================== */
.desktop-drawer {
    box-shadow: none;
    border-right: solid #e9e9e9 1px;
    width: var(--drawer-width-expanded) !important;
    transition: width var(--transition-duration) ease;
    overflow: hidden; /* Prevent scrolling */
}

    .desktop-drawer.collapsed {
        width: var(--drawer-width-collapsed) !important;
        overflow: hidden; /* Ensure no scrolling in collapsed state */
    }

.desktop-nav-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    overflow: hidden; /* Prevent container overflow */
}
.cursor {
    cursor: pointer;
}
.desktop-nav-content {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Hide scrollbar in collapsed state */
.desktop-drawer.collapsed .desktop-nav-content {
    overflow: hidden; /* No scrolling needed in collapsed state */
    padding: 15px 0; /* Reduce padding */
}

.desktop-nav-item {
    display: flex;
    align-items: center;
    padding: 9px 20px;
    margin: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #484848;
    min-height: 26px;
    position: relative;
    width: 240px;
}

.desktop-drawer.collapsed .desktop-nav-item {
    padding: 12px 8px; /* Reduced padding */
   /* margin: 4px 6px;*/ /* Reduced margin */
    justify-content: center;
    width: calc(100% - 10px); /* Adjust width for collapsed state */
    min-height: 44px; /* Slightly reduced height */
}

.desktop-nav-item:hover {
    background-color: rgba(21, 73, 152, 0.08);
    width:240px;
    /*transform: translateX(20px);*/
}

.desktop-drawer.collapsed .desktop-nav-item:hover {
    transform: none;
    background-color: rgba(21, 73, 152, 0.12);
    /* Ensure it stays within bounds */
}

.desktop-nav-icon {
    color: var(--ThemeColor) !important;
    font-size: 22px !important; /* Slightly reduced from 22px */
    margin-right: 16px;
    flex-shrink: 0;
    transition: margin var(--transition-duration) ease;
}

.desktop-drawer.collapsed .desktop-nav-icon {
    margin-right: 0;
    font-size: 24px !important; /* Even smaller in collapsed state */
}

.desktop-nav-text {
    font-size: 0.81rem !important;
    font-weight: 500;
    color: #484848;
    letter-spacing: -0.2px;
    opacity: 1;
    transition: opacity var(--transition-duration) ease;
    white-space: nowrap; /* Prevent text wrapping */
}

.desktop-drawer.collapsed .desktop-nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none; /* Completely hide in collapsed state */
}

/* Collapse Toggle Button */
.collapse-toggle-container {
    border-top: 1px solid #e9e9e9;
    padding: 8px 6px; /* Adjusted padding */
    background: white;
    flex-shrink: 0; /* Prevent shrinking */
}

.collapse-toggle-btn {
    width: 100% !important;
    justify-content: flex-start !important;
    color: #666 !important;
    font-size: 12px !important;
    text-transform: none !important;
    padding: 8px 12px !important;
    min-height: 36px !important;
}

.desktop-drawer.collapsed .collapse-toggle-btn {
    justify-content: center !important;
    padding: 8px !important;
}

    .desktop-drawer.collapsed .collapse-toggle-btn span {
        display: none;
    }

/* Enhanced expand button for collapsed state */
.expand-btn-collapsed {
    width: calc(100% - 4px) !important; /* Responsive width */
    height: 44px !important; /* Slightly reduced */
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    color: var(--ThemeColor) !important;
    position: relative;
    transition: all 0.2s ease !important;
    margin: 2px !important; /* Small margin to prevent edge cutting */
}

    .expand-btn-collapsed:hover {
        background-color: rgba(21, 73, 152, 0.1) !important;
        border-color: var(--ThemeColor) !important;
        transform: scale(1.02); /* Scale instead of translate to avoid overflow */
        box-shadow: 0 2px 8px rgba(21, 73, 152, 0.2) !important;
    }

    /* Add a subtle animation to draw attention */
    .expand-btn-collapsed::after {
        content: '';
        position: absolute;
        left: 2px;
        top: 50%;
        transform: translateY(-70%);
        width: 16px; /* Reduced width */
        height: 16px; /* Reduced height */
        background: linear-gradient(to bottom, transparent, var(--ThemeColor), transparent);
        border-radius: 1px;
        animation: slideIn 2s infinite;
    }

@keyframes slideIn {
    0%, 100% {
        opacity: 0;
        transform: translateY(-50%) translateX(-30px); /* Reduced distance */
    }

    50% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* ==========================================================================
   CUSTOM MOBILE NAVIGATION
   ========================================================================== */
.custom-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1250;
    animation: fadeIn 0.3s ease;
}

.custom-mobile-nav {
    position: fixed;
    top: var(--appbar-height);
    left: 0;
    width: var(--drawer-width-expanded);
    height: calc(100vh - var(--appbar-height));
    background: white;
    z-index: 1300;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

    .custom-mobile-nav.open {
        transform: translateX(0);
    }

.mobile-nav-content {
    padding: 20px 0;
    height: 100%;
    overflow-y: auto;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #484848;
    min-height: 52px;
}

    .mobile-nav-item:hover {
        background-color: rgba(21, 73, 152, 0.08);
        transform: translateX(4px);
    }

.mobile-nav-icon {
    color: var(--ThemeColor) !important;
    font-size: 20px !important;
    margin-right: 16px;
    flex-shrink: 0;
}

.mobile-nav-text {
    font-size: 0.81rem;
    font-weight: 500;
    color: #484848;
    letter-spacing: -0.2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   MAIN CONTENT - RESPONSIVE TO COLLAPSED STATE
   ========================================================================== */
.mud-main-content.px-4 {
    padding-top: calc(var(--appbar-height) + 20px);
    transition: margin-left var(--transition-duration) ease;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* Desktop */
@media (min-width: 769px) {
    :root {
        --appbar-height: 85px;
    }
    .mud-main-content.px-4 {
        margin-left: var(--drawer-width-expanded) !important;
        padding-top: 100px;
    }

    /* Adjust main content margin when drawer is collapsed */
    .desktop-drawer.collapsed ~ .mud-main-content.px-4 {
        margin-left: var(--drawer-width-collapsed) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mud-main-content.px-4 {
        margin-left: 0 !important;
        padding-top: calc(var(--appbar-height) + 20px) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* ==========================================================================
   OTHER STYLES (unchanged)
   ========================================================================== */
.CustomButton {
    border-radius: 1px;
    font-size: 13px;
    background: var(--ThemeColor) !important;
}

.mud-button {
    padding: 6px 16px;
    font-family: 'Roboto SemiCondensed', Arial, sans-serif !important;
}

.mud-table {
   
    box-shadow: none;
    border-radius: 0px;
    padding: 5px 23px;
    padding-bottom: 37px;
}

.mud-table-dense * .mud-table-row .mud-table-cell {
    font-weight: bold;
    font-size: 12px;
    color: #505050;
    border-bottom: solid #eff4ff 1px;
}

th.mud-table-cell {
    background: #f7f7f7;
}

.mud-dialog {
    border-radius: 0px;
}

/* Ensure dialogs appear above the app bar */
.mud-dialog-container {
    z-index: 1500 !important;
}

.mud-dialog {
    z-index: 1510 !important;
}

/*.mud-overlay {
    z-index: 1450 !important;
}
*/
.mud-dialog-title {
    background: #e6e9ed;
    color: white;
    border-radius: 0px !important;
}
/* Ensure table headers don't show sorting dropdowns on mobile */
@media (max-width: 768px) {
    .mud-table-head .mud-table-sort-label {
        display: none !important;
    }

/* Focus states for accessibility */
.rz-tabview-nav .rz-tabview-nav-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}
.rz-tabview.rz-tabview-top > .rz-tabview-nav li {
    border-bottom: 2px solid transparent;
    border-radius: 0px;
   
}
.rz-tabview-nav > li > a {
    position: relative;
    overflow: hidden;
    padding: 14px 43px !important;
    color: black !important;
    font-weight: 500 !important;
    font-size: 13px !important;
}
.rz-tabview.rz-tabview-top > .rz-tabview-nav .rz-tabview-selected {
    border-top-width: 0;
    border-bottom: 2px solid #b2cd605e;
}
.mud-grid-spacing-xs-2 > .mud-grid-item {

    padding-top: 8px;
    line-height: 54px;
    border-bottom: solid #f3f3f3 1px;
    padding-bottom: 7px;
}
.mud-tabs-tabbar.mud-tabs-rounded {
    border-radius: 0px;
}
    .mud-table-head .mud-button {
        display: none !important;
    }

    .mobile-filters-card {
        background: white;
        border-radius: 8px;
        margin-bottom: 16px;
    }
}
.PageHeader, .page-header {
    font-size: 13px;
    font-weight: 500;
    background: #FFFFFF;
    padding: 13px 16px 13px 19px;
    color: #060606;
    position: relative;
    position: relative;
    box-sizing: border-box;
    left: 20px;
}

    .PageHeader::before, .page-header:before {
        content: "";
        position: absolute;
        top: 62%;
        left: 22px;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-top: 20px solid transparent;
        border-bottom: 20px solid transparent;
        border-right: 19px solid #FFFFFF;
        transform: rotate(-88deg);
    }
.mud-tabs-tabbar.mud-tabs-rounded {
  
    border-radius: 0px;
}


.desktop-nav-item.active-nav-item {
    background: #b3c2d16e;
    /*    border-radius: 0px;
    border-radius: 4px;*/
    border-radius: 3px;
}

    .desktop-nav-item.active-nav-item .desktop-nav-text {
        color: #000000 !important;
    }


    .desktop-nav-item.active-nav-item .mud-icon-root.mud-svg-icon {
        fill: #0e0e0e !important;
    }
.custom-table-tab .mud-table-toolbar {
    padding: 0px !important;
    height: auto !important;
}
.btntab {
    position: absolute;
    right: 7px;
    top: -52px;
}
.mud-tab.mud-ripple.mud-tab-panel.CustomTabPanel {
    font-size: 13px;
    font-weight: 700;
}
.mud-tabs-tabbar-content {
  
    padding-top: 5px;
    padding-bottom: 14px;
}
.username {
    font-size: 14px;
    font-weight: 500;
}
.mud-table td .mud-button-root {
 /*   background: #ffffff;*/
    padding: 1px 6px;
    width: 27px;
    height: 26px;
    border-radius: 2px !important;
    border: solid #e1e1e187 1px;
}

    .mud-table td .mud-button-root svg {
        width: 15px;
    }
/*.mud-button:hover, button:hover {
    transform: none !important;
}*/
.mud-icon-button {
 
    color: rgb(0 0 0);
}

.mud-table-pagination-toolbar {

    color: gray;
}
.mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol {
  
    font-size: 0.9rem;
  
}
.yaslogoclass {
    height: 100%;
    max-height: 82px;
    object-fit: contain;
    padding: 10px 0;
}
/*
==================================================================
== DEFINITIVE MUDTABLE ANTI-COLLAPSE FIX
== This forces the table to maintain its grid structure and prevents
== it from switching to the stacked mobile view during the initial
== server-side render.
==================================================================
*/

/*
  This is the key: We target the table rows and force them
  to always display as table rows, overriding the responsive
  'display: block' style from MudBlazor.
*/
.mud-table-root .mud-table-body .mud-table-row {
    display: table-row !important;
}

/*
  We also force the cells to behave like table cells.
*/
.mud-table-root .mud-table-body .mud-table-cell {
    display: table-cell !important;
}
.weighteen {
    width: 18px;
}

/* CSP-compliant utility classes */
.cursor-pointer {
    cursor: pointer;
}

.min-height-100 {
    min-height: 100px;
}

.text-muted {
    color: #6c757d;
}

/* Table width and alignment classes for CSP compliance */
.table-width-100 {
    width: 100%;
}

.table-width-200 {
    width: 200px;
}

.table-width-150 {
    width: 150px;
}

.table-width-110 {
    width: 110px;
}

.text-align-center {
    text-align: center;
}

.text-align-right {
    text-align: right;
}

.min-width-150 {
    min-width: 150px;
}

.bordered-dashed {
    border: 2px dashed #ccc;
}

/* Theme park mapping styles for CSP compliance */
.theme-park-mapped {
    border-left: 4px solid var(--mud-palette-success);
    background-color: rgba(var(--mud-palette-success-rgb), 0.05);
}

.theme-park-not-mapped {
    border-left: 4px solid var(--mud-palette-surface);
    background-color: rgba(var(--mud-palette-surface-rgb), 0.02);
}

/* StructuredTnCEditor styles for CSP compliance */
.height-300 {
    height: 300px;
}

.max-height-85vh {
    max-height: 85vh;
    overflow-y: auto;
    padding-right: 5px;
}

.min-height-56 {
    min-height: 56px;
    padding-top: 4px;
    padding-bottom: 4px;
    width: 100%;
}

.min-width-160 {
    min-width: 160px;
}

.min-height-36 {
    min-height: 36px;
    padding: 4px 0;
    width: 100%;
}

.editor-height-250 {
    height: 250px;
    margin-bottom: 1rem;
}

.editor-height-250-rtl {
    height: 250px;
    margin-bottom: 1rem;
    text-align: right;
}

.height-100-padding {
    height: 100%;
    padding: 8px;
}

.padding-inline {
    padding-inline-start: 8px;
    padding-inline-end: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.min-height-200 {
    min-height: 200px;
}

.text-disabled-italic {
    color: var(--mud-palette-text-disabled);
    font-style: italic;
}

.cursor-pointer-nowrap {
    cursor: pointer;
    white-space: nowrap;
}