/* apps/outlook/theme.css */

.oe-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ECE9D8; 
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    font-size: 11px;
    color: black;
    overflow: hidden;
}

/* --- Toolbar --- */
.oe-toolbar {
    height: 38px;
    border-bottom: 1px solid #ACA899;
    border-top: 1px solid white;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    background: linear-gradient(to bottom, #F9F8F4 0%, #D7D4CA 100%);
}

.oe-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    margin-right: 2px;
    border: 1px solid transparent;
    cursor: default;
    color: black;
    text-align: center;
}
.oe-btn:hover {
    border: 1px solid #ACA899;
    background-color: #FDFCF8;
    border-radius: 2px;
}
.oe-btn:active {
    border: 1px solid #ACA899;
    background-color: #ECE9D8;
    transform: translate(1px, 1px);
}

.oe-separator {
    width: 2px;
    height: 28px;
    margin: 0 6px;
    border-left: 1px solid #ACA899;
    border-right: 1px solid white;
}

.oe-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    border-top: 1px solid #ACA899;
}

/* --- Sidebar (Classic Tree View) --- */
.oe-sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #ACA899;
    display: flex;
    flex-direction: column;
}

.oe-folder-header {
    background: #ECE9D8;
    padding: 4px 8px;
    border-bottom: 1px solid #ACA899;
    font-weight: bold;
    color: #444;
}

.oe-tree-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    background: white;
}

.oe-tree, .oe-tree-group {
    list-style: none;
    margin: 0;
    padding: 0;
}

.oe-tree-group {
    padding-left: 19px; /* Indent for children */
}

/* --- Tree Lines (The Magic) --- */
.oe-tree-item {
    position: relative;
}

/* Vertical Dotted Line */
.oe-tree-group > .oe-tree-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px; /* Position line in the padding area */
    bottom: 0;
    width: 1px;
    border-left: 1px dotted #808080;
}

/* Horizontal Dotted Line (Connector) */
.oe-tree-group > .oe-tree-item::after {
    content: "";
    position: absolute;
    top: 9px; /* Center of 18px height */
    left: -10px;
    width: 10px;
    height: 1px;
    border-top: 1px dotted #808080;
}

/* Fix Last Child: Stop vertical line halfway */
.oe-tree-group > .oe-tree-item:last-child::before {
    height: 10px; /* Only go down to the connector */
    bottom: auto;
}

/* Root item shouldn't have lines to its left */
.oe-tree > .oe-tree-item::before,
.oe-tree > .oe-tree-item::after {
    display: none;
}

/* --- Tree Row Content --- */
.oe-tree-row {
    display: flex;
    align-items: center;
    padding: 0;
    cursor: default;
    white-space: nowrap;
    position: relative;
    height: 18px; /* Fixed height for alignment */
}

/* --- Toggle Button [ + ] --- */
.oe-tree-toggle {
    width: 9px;
    height: 9px;
    border: 1px solid #808080;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2; /* Sit on top of lines */
    position: relative;
    margin-right: 4px;
    margin-left: 0px; 
    flex-shrink: 0;
}

/* Positioning the toggle exactly on the line intersection */
.oe-tree-group > .oe-tree-item > .oe-tree-row > .oe-tree-toggle {
    margin-left: -15px; /* Pull back onto the vertical line */
    margin-right: 6px;
}

/* Plus Sign */
.oe-tree-toggle.plus::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 1px;
    background: black;
}
.oe-tree-toggle.plus::after {
    content: "";
    position: absolute;
    width: 1px;
    height: 5px;
    background: black;
}

/* Minus Sign */
.oe-tree-toggle.minus::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 1px;
    background: black;
}

/* Placeholder for items with no toggle */
.oe-tree-toggle.none {
    border: none;
    background: transparent;
}
.oe-tree-toggle.none::before, 
.oe-tree-toggle.none::after {
    display: none;
}

/* --- Selection & Labels --- */
.oe-tree-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.oe-tree-row.selected .oe-tree-label {
    background-color: #ece9d8;
    border: 1px solid #ece9d8;
    color: black;
	font-weight: 600;
}

.oe-tree-row:hover .oe-tree-label {
    text-decoration: underline;
    color: #000080;
}

.oe-tree-label {
    padding: 0 2px;
    border: 1px solid transparent; /* Reserve space for selection border */
}

.oe-tree-icon {
    width: 16px;
    height: 16px;
    margin-right: 3px;
    vertical-align: middle;
}

.oe-unread-count {
    color: blue;
    margin-left: 5px;
}

.oe-empty-state {
    color: #888;
    text-align: center;
    margin-top: 20px;
    font-style: italic;
    padding: 10px;
}

/* --- Main Content Area --- */
.oe-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    min-width: 0;
}

/* --- Message List --- */
.oe-list-pane {
    height: 50%;
    overflow: auto;
    background: white;
}

.oe-list-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.oe-list-table th {
    background: #ECE9D8;
    border-bottom: 1px solid #ACA899;
    border-right: 1px solid #ACA899;
    text-align: left;
    padding: 3px 4px;
    font-weight: normal;
    color: black;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 #808080;
}

.oe-list-table td {
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #F0F0F0;
    cursor: default;
    height: 18px;
    vertical-align: middle;
}

.oe-icon-col {
    text-align: center;
    padding: 0;
    width: 20px;
}

.oe-list-msg-icon {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 4px;
}

.oe-list-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.oe-header-icon {
    width: 13px;
    height: 13px;
    opacity: 0.7;
}

.oe-list-table tr.unread {
    font-weight: bold;
}

.oe-list-table tr.selected {
    background-color: #0A246A;
    color: white;
}

.oe-split-bar {
    height: 5px;
    background: #ECE9D8;
    cursor: ns-resize;
    border-top: 1px solid white;
    border-bottom: 1px solid #ACA899;
}

/* --- Preview Pane --- */
.oe-preview-pane {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
    border-top: 1px solid white;
}

.oe-preview-header {
    background: #ECE9D8;
    padding: 8px 12px;
    border-bottom: 1px solid #ACA899;
    flex-shrink: 0;
}

.oe-ph-row {
    margin-bottom: 3px;
    display: flex;
}
.oe-label {
    width: 60px;
    text-align: right;
    color: #666;
    margin-right: 8px;
    font-size: 11px;
}

#oe-preview-frame {
    flex: 1;
    border: none;
    width: 100%;
    height: 100%;
    background: white;
}

.oe-attachments-bar {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid #ACA899;
}
.oe-attachment-item {
    display: inline-block;
    padding: 1px 4px;
    margin-right: 6px;
    cursor: pointer;
    color: black;
    border: 1px solid transparent;
}
.oe-attachment-item:hover {
    border: 1px solid #ACA899;
    background: #FDFCF8;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oe-drag-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
    border: 4px dashed #999;
    z-index: 2000;
}

/* --- Status Bar (Refactored for Images) --- */
.oe-status-bar {
    height: 23px;
    background: url('../../assets/xp/windowtaskbar_bg.png') repeat-x;
    /* Often XP skins include the top border in the image, but we remove the CSS border to be safe */
    border-top: none; 
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
    font-family: Tahoma, sans-serif;
    user-select: none;
}

.oe-status-sep {
    width: 2px;
    height: 23px;
    background: url('../../assets/xp/windowtaskbar_separator.png') no-repeat;
    flex-shrink: 0;
}

.oe-status-item {
    height: 23px;
    display: flex;
    align-items: center;
    padding: 1px 30px 0px 5px;
    color: black;
    white-space: nowrap;
	font-size: 8pt;
}

.oe-status-grip {
    width: 12px;
    height: 23px;
    background: url('../../assets/xp/windowtaskbara_rightcorner.png') no-repeat;
    flex-shrink: 0;
}