/* OutlookLayout Styles */

/* Main Layout Grid */
.outlook-layout {
    display: grid;
    grid-template-rows: 48px 1fr;
    grid-template-columns: 48px 1fr;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Prevent layout-level scrolling */
    background-color: #dadada;
}

/* 1a. Main Header - Spans full width */
.main-header {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    z-index: 100;
    height: 48px;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 200px;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #2d4e6f;
}

.app-logo {
    height: 32px;
    width: 32px;
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-input {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 200px;
    justify-content: flex-end;
}

.header-right .icon-button {
    color: #1d5b9a;
}

.icon-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 8px !important;
    min-width: 32px !important;
    height: 32px !important;
}

.icon-button .rz-button-icon-left {
    margin: 0 !important;
}

/* RadzenProfileMenu customization */
.header-right .rz-profile-menu {
    margin-left: 8px;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1d5b9a;
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure Gravatar has the same size */
.header-right .rz-gravatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
}

/* Custom Sign Out menu item styling to match RadzenProfileMenuItem */
.rz-profile-menu .rz-navigation-item {
    list-style: none;
}

.rz-profile-menu .rz-navigation-item:hover .rz-navigation-item-link {
    background-color: var(--rz-navigation-item-hover-background-color, rgba(0, 0, 0, 0.04));
}

.rz-profile-menu .rz-navigation-item-link {
    transition: background-color 0.2s ease;
}

/* Legacy styles - can be removed if not used elsewhere */
.profile-menu {
    position: relative;
    margin-left: 8px;
}

.profile-button {
    padding: 0 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.profile-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background: white;
    border: 1px solid #e1dfdd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 4px;
}

.profile-dropdown .menu-item {
    text-align: left !important;
    padding: 8px 12px !important;
}

/* 1b. Main Sidebar - collapsed by default; expands as a whole on hover to reveal labels */
.main-sidebar {
    grid-row: 2;
    grid-column: 1;
    width: 48px;
    transition: width 180ms ease;
    overflow: visible;
    z-index: 250;
}

.main-sidebar:hover {
    width: 180px;
    background-color: #dadada;
    box-shadow: 3px 0 1px rgba(0, 0, 0, 0.06), 2px 0 2px rgba(0, 0, 0, 0.05), 2px 0 2px rgba(0, 0, 0, 0.11);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
    width: 100%;
}

.sidebar-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    justify-content: flex-start;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: none;
    border: none;
    color: #1d5b9a;
    cursor: pointer;
    transition: background-color 150ms ease;
    white-space: nowrap;
    font-size: 14px;
    border-left: 3px solid transparent;
    position: relative;
    overflow: visible;
}

.main-sidebar:hover .sidebar-button {
    width: 100%;
    justify-content: flex-start;
    padding: 0 12px;
    gap: 8px;
}

.sidebar-button:hover {
    background-color: rgba(29,91,154,0.06);
}

.sidebar-button.active {
    border-left-color: #1d5b9a;
}

.sidebar-label {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: none !important;
    font-weight: 400;
    font-size: 0.8rem;
    color: #4a4a4a;
}

.sidebar-label:hover{

    color : #1d5b9a;
}


.main-sidebar:hover .sidebar-label {
    display: inline-block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 160ms ease, visibility 160ms ease;
    
}

.icon-wrap {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
}

.sidebar-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    display: block;
    margin: 0;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: transform 120ms ease, box-shadow 120ms ease;
    object-fit: contain;
    background: transparent;
}

/* 1c. Workspace - Takes remaining space */
.workspace {
    grid-row: 2;
    grid-column: 2;
    display: grid;
    grid-template-rows: 44px 1fr 32px;
    grid-template-columns: auto 1fr;
    background-color: #f4f4f4;
    border-top-left-radius: 8px;
    overflow: hidden; /* Prevent workspace-level scrolling */
    position: relative;
    box-shadow: -3px -3px 8px rgba(0, 0, 0, 0.06), -6px -6px 16px rgba(0, 0, 0, 0.04), -10px -10px 24px rgba(0, 0, 0, 0.02);
}

.workspace-header {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #e1dfdd;
    border-top-left-radius: 8px;
    gap: 16px;
    height: 44px;
}

.workspace-icons {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.workspace-icon-btn {
    color: #555 !important;
}

.workspace-icon-btn:hover {
    color: #333 !important;
}

/* Notification badge */
.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #d13438;
    color: white;
    border-radius: 10px;
    padding: 1px 3px;
    font-size: 10px;
    font-weight: 600;
    min-width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 10;
}

.horizontal-menu {
    display: flex;
    gap: 4px;
    align-items: center;
}

.menu-link {
    color: #323130;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.1s;
}

.menu-link:hover {
    background-color: #f3f2f1;
}

.workspace-navbar {
    grid-row: 2 / 4;
    grid-column: 1;
    border-right: 1px solid #e1dfdd;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.2s ease;
    width: 220px;
}

.workspace-navbar.collapsed {
    width: 0;
    border-right: none;
    overflow: hidden;
}

.navbar-header {
    padding: 16px;
    border-bottom: 1px solid #e1dfdd;
}

.navbar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #323130;
}

.workspace-navbar .rz-accordion {
    border: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #323130;
    cursor: pointer;
    transition: background-color 0.1s;
    font-size: 14px;
}

.nav-item:hover {
    background-color: #f3f2f1;
}

.nav-item.selected {
    background-color: rgba(29, 91, 154, 0.1);
    border-left: 3px solid #1d5b9a;
    font-weight: 600;
}

.badge {
    background-color: #1d5b9a;
    color: white;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    line-height: 1;
}

.workspace-footer {
    grid-row: 3;
    grid-column: 1 / -1;
    padding: 8px 16px;
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.04);
    text-align: center;
}

.workspace-footer p {
    margin: 0;
    font-size:0.75rem;
    color:#1d5b9a;
}

.workspace-body {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto; /* Allow vertical scroll when needed */
    display: block;
    min-height: 0;
}

.workspace-body .rz-splitter {
    height: 100%;
    min-height: 300px;
}

.workspace-body .rz-splitter > .rz-splitter-pane,
.workspace-body .rz-splitter .rz-splitter-pane {
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.split-card {
    background-color: #ffffff;
    margin: 4px;
    padding: 6px;
    border-radius: 8px;
    height: calc(100% - 8px);
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08), 0 -2px 6px rgba(0,0,0,0.06);
}

.split-card .card-content {
    height: 100%;
}

.right-card {

 overflow: auto;
 padding:10px 0 0 15px;
 
    }

.split-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #323130;
}

.split-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.split-title-row .split-title {
    margin: 0;
    flex-shrink: 0;
}

.split-title-row .rz-splitbutton,
.split-title-row .rz-splitbutton .rz-button {
    height: 24px !important;
    min-height: 24px !important;
    line-height: 1 !important;
    padding: 0px 4px !important;
}

.split-title-row .rz-splitbutton .rz-button-icon-only {
    padding: 4px !important;
}

.workspace-body .rz-splitter-bar {
    background-color: rgba(29,91,154,0.04);
    transition: background-color 120ms ease;
}

.workspace-body .rz-splitter-bar:hover {
    background-color: rgba(29,91,154,0.08);
}

.detail-header .meta {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Compact custom list styling */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.compact-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e1dfdd;
    border-radius: 4px;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
    min-height: 44px;
}

.compact-list-item:hover {
    background-color: rgba(29,91,154,0.04);
}

.compact-list-item.selected {
    background-color: rgba(224, 242, 255, 0.6) !important;
    border-color: rgba(29,91,154,0.2) !important;
}

.item-checkbox {
    flex: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 24px;
}

.item-subject {
    font-weight: 600;
    font-size: 13px;
    color: #323130;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 2px;
}

.item-detail {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.item-pin {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-pin .rz-togglebutton,
.item-pin .rz-togglebutton .rz-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: 12px !important;
    min-height: 12px !important;
    width: 12px !important;
    height: 12px !important;
}

.item-pin .rz-togglebutton i {
    font-size: 12px !important;
}

.left-card .left-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.left-card .left-datagrid {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: auto;
}

.compact-checkbox .rz-checkbox-inner {
    width: 8px !important;
    height: 8px !important;
    border-radius: 3px !important;
    background-color: transparent !important;
    border: 1px solid #e1dfdd !important;
}

.compact-checkbox .rz-checkbox {
    width: 8px !important;
    height: 8px !important;
}

.left-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.rz-row, .rz-column {
    min-width: 0;
}

/* Media Queries */
@media (max-width: 768px) {
    .search-container {
        max-width: 200px;
    }

    .horizontal-menu {
        display: none;
    }

    .workspace-navbar {
        width: 240px;
    }
}

/* Placeholder message styling */
.placeholder-message {
    text-align: center;
    padding: 64px 24px;
    color: #999;
}

.placeholder-message p {
    margin: 16px 0 0 0;
    font-size: 14px;
}

/* ========================================
   STICKY FORM ACTIONS - Reusable
   ======================================== */

/* Form container with sticky footer */
.form-view-container,
.modal-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Scrollable form content */
.form-content-scrollable,
.modal-content-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* Sticky action buttons at bottom */
.form-actions-sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
    margin: 0;
}

/* For dialogs/modals with dark backgrounds */
.dialog-actions-sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px;
    background: var(--color-background, #ffffff);
    border-top: 1px solid var(--color-border, #e0e0e0);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
    margin: 0;
}

/* Alternative alignment - center */
.form-actions-sticky.centered,
.dialog-actions-sticky.centered {
    justify-content: center;
}

/* Alternative alignment - space between */
.form-actions-sticky.space-between,
.dialog-actions-sticky.space-between {
    justify-content: space-between;
}

