/* apps/aim/theme.css */

/* --- 1. AIM Buddy List (The App) --- */
.aim-app .window-content {
    background: #ECE9D8;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.aim-bl-container {
    display: flex; flex-direction: column; height: 100%;
}

/* 1. Menu Bar */
.aim-bl-menubar {
    height: 19px; min-height: 19px;
    background: #ECE9D8;
    display: flex; align-items: center;
    padding-left: 4px;
}
/* [UPDATED] Disabled menu items */
.aim-menu-item { 
    margin-right: 10px; 
    cursor: default; 
    padding: 2px 4px; 
    color: #a29f90; /* XP Disabled Text Color */
    user-select: none;
}
/* [UPDATED] No hover effect */
.aim-menu-item:hover { 
    background-color: transparent; 
    color: #a29f90; 
}

/* 2. Logo Area */
.aim-bl-logo-area {
    height: 87px; min-height: 87px;
    background-color: #fffbf0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: end;
}
.aim-bl-logo-1 { margin-bottom: 2px; }

/* 3. Title Area */
.aim-bl-list-title {
    height: 19px; min-height: 19px;
    background: #ECE9D8;
    display: flex; align-items: center;
    padding-left: 3px;
    font-size: 11px;
    border: 1px solid #fffbf0;
    box-shadow: inset 1px 1px 0 #aca899, inset -1px -1px 0 #ffffff;
}
.aim-username { font-weight: bold; margin-right: 3px; }

/* --- UNIFIED FRAME --- */
.aim-bl-frame {
    flex: 1;
    display: flex; flex-direction: column;
    border: 1px solid #716f64;
    min-height: 0;
}

/* 4. Buddy List Body */
.aim-bl-body-wrapper {
    flex: 1; 
    border: none;
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.aim-bl-list {
    width: 100%; height: 100%;
    overflow-y: auto;
    background-image: url('../../assets/aim/buddy_bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    border: 1px solid #716f64;
    border-bottom-color: #f1efe2;
    box-sizing: border-box;
    outline: none; /* Remove default browser outline */
}

/* Groups */
.aim-group { margin-bottom: 2px; }

.aim-group-header {
    cursor: default;
    padding: 0 2px;
    font-weight: bold;
    display: flex;
    align-items: center;
    user-select: none;
    color: #000;
	line-height: 14px;
	font-size: 9pt;
}

.aim-group-arrow {
    font-family: monospace;
    font-size: 10px;
    margin-right: 4px;
    width: 10px;
    text-align: center;
    cursor: pointer;
}

/* Wrapper for Group Title & Count (The part that gets selected) */
.aim-group-label {
    padding: 0 2px;
    cursor: pointer;
    border: 1px solid transparent; /* Reserve space for dotted line */
}

.aim-group-body {
    display: block;
    padding-left: 8px; 
}

/* BUDDY ITEMS */
.aim-buddy-item {
    padding: 1px 4px 1px 25px; 
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
	line-height: 14px;
	font-size: 9pt;
    border: 1px solid transparent; 
    
    /* Selection Box Sizing: Fits content */
    width: fit-content;
    min-width: 50px;
}

/* Base style for icons */
.aim-buddy-item::before {
    content: '';
    position: absolute;
    left: 2px; top: 1px;
    width: 16px; height: 16px;
    background-image: url('../../assets/aim/buddy_icons.png');
    background-repeat: no-repeat;
    display: none; /* Hidden by default */
}

/* --- ICONS VISIBILITY --- */
/* Show icons regardless of selection state */
.aim-buddy-item.signing-in::before,
.aim-buddy-item.leaving::before {
    display: block;
}

/* "Leaving" - Door Close */
/* [UPDATED] Cursor reset to default */
.aim-buddy-item.leaving {
    cursor: default !important;
}

.aim-buddy-item.leaving::before {
    background-position: 0 0; 
}

/* "Signing In" - Door Open */
.aim-buddy-item.signing-in::before {
    background-position: -16px 0; 
}

.aim-buddy-item.signing-in .aim-buddy-text {
    font-weight: bold;
}

.aim-buddy-item.leaving .aim-buddy-text {
    font-style: italic;
    color: #888;
}

/* --- SELECTION & FOCUS STATES --- */

/* 1. Selection (Yellow Background + Dotted Outline) */
/* Applied to ALL selected items */
.aim-selectable.selected {
    background-color: #fff100 !important;
    color: black !important;
    
    /* Active Window: Black Dotted Line */
    outline: 1px dotted #0000ff;
    outline-offset: -1px;
}

/* 2. Inactive Window: Gray Dotted Line */
/* When the window container has the 'aim-window-blur' class */
.aim-window-blur .aim-selectable.selected {
    outline-color: #808080;
}

/* 5. Footer */
.aim-bl-footer {
    height: 45px; min-height: 45px;
    background: #ECE9D8;
    display: flex; justify-content: center; align-items: center;
    gap: 2px; padding: 0 4px;
    border: none;
    border-top: 1px solid #ffffff;
}

.aim-bl-btn {
    width: 27px; height: 45px;
    background-image: url('../../assets/aim/buddy_buttons1.png');
    background-repeat: no-repeat;
    cursor: pointer;
}
.aim-bl-btn:active { position: relative; top: 1px; }
.aim-btn-1 { background-position: 0px 0; }
.aim-btn-2 { background-position: -27px 0; }
.aim-btn-3 { background-position: -54px 0; }
.aim-btn-4 { background-position: -81px 0; }
.aim-btn-5 { background-position: -108px 0; }

/* --- 2. AIM Chat Window --- */
.aim-window .window-content {
    background-color: #ECE9D8;
    font-family: Tahoma, Helvetica, sans-serif;
    font-size: 11px;
    height: 100%;
    overflow: hidden;
}

.aim-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.aim-chat-header {
    height: 19px; min-height: 19px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2px 0 4px; background: #ECE9D8; user-select: none;
    flex-shrink: 0;
}
/* [UPDATED] Disabled menu items in chat */
.aim-chat-menus span { 
    margin-right: 8px; 
    cursor: default; 
    color: #a29f90; /* XP Disabled Text Color */
    user-select: none;
}
/* [UPDATED] No hover effect */
.aim-chat-menus span:hover { 
    background-color: transparent; 
    color: #a29f90; 
}
.aim-chat-warning { cursor: default; }

.aim-header-separator {
    height: 1px; min-height: 1px;
    border-top: 1px solid #ffffff; background-color: #aca899; border-bottom: 1px solid #ffffff;
    flex-shrink: 0;
}

.aim-chat-body-outer {
    flex: 1; 
    padding: 0 3px 0 4px;
    display: flex; flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.aim-chat-border-1 {
    flex: 1; display: flex; flex-direction: column;
    border-top: 1px solid #aca899; border-left: 1px solid #aca899;
    border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
    min-height: 0;
}
.aim-chat-border-2 {
    flex: 1; display: flex; flex-direction: column;
    border-top: 1px solid #000000; border-left: 1px solid #000000;
    border-right: 1px solid #ece9d8; border-bottom: 1px solid #ece9d8;
    background: #ffffff;
    min-height: 0;
}
.aim-chat-container {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 5px; font-size: 16px;
}

.aim-toolbar {
    height: 17px; min-height: 17px;
    background: #ECE9D8;
    display: flex; align-items: center;
    justify-content: center;
    margin: 5px 4px 1px 4px;
    flex-shrink: 0;
    border: 1px solid #aca899;
    box-shadow: 1px 1px 0 #ffffff, inset 1px 1px 0 #ffffff;
    padding: 1px;
}

.aim-toolbar-group { display: flex; align-items: center; }
.aim-toolbar-sep {
    width: 0; border-left: 1px solid #aca899; border-right: 1px solid #ffffff;
    height: calc(100% - 2px); margin: 0 2px;
}

.aim-tbtn {
    width: 17px; height: 17px;
    background-image: url('../../assets/aim/chat_buttons1.png');
    background-repeat: no-repeat;
    border: none; margin: 0 .5em; cursor: default;
}
.aim-tbtn-1  { background-position: 0px 0; }
.aim-tbtn-2  { background-position: -17px 0; }
.aim-tbtn-3  { background-position: -34px 0; }
.aim-tbtn-4  { background-position: -51px 0; }
.aim-tbtn-5  { background-position: -68px 0; }
.aim-tbtn-6  { background-position: -85px 0; }
.aim-tbtn-7  { background-position: -102px 0; }
.aim-tbtn-8  { background-position: -119px 0; }
.aim-tbtn-9  { background-position: -136px 0; }
.aim-tbtn-10 { background-position: -153px 0; }
.aim-tbtn-11 { background-position: -170px 0; }
.aim-tbtn-12 { background-position: -187px 0; }
.aim-tbtn-13 { background-position: -204px 0; }
.aim-tbtn-14 { background-position: -221px 0; }

.aim-reply-wrapper {
    height: 48px; min-height: 48px;
    padding: 0 3px 0 4px;
    display: flex; flex-direction: column;
    flex-shrink: 0;
}
.aim-reply-input {
    width: 100%; height: 100%; border: none; resize: none; outline: none;
    font-family: Tahoma, sans-serif; font-size: 12px;
    padding: 3px; box-sizing: border-box;
}

.aim-footer-buttons {
    height: 52px; min-height: 52px;
    background: #ECE9D8; margin: 12px 3px 2px 4px;
    border: 1px solid #aca899;
    box-shadow: 1px 1px 0 #ffffff, inset 1px 1px 0 #ffffff;
    display: flex; justify-content: space-between; align-items: flex-end;
    flex-shrink: 0; padding: 1px;
}

.aim-btn-group-left, .aim-btn-group-center, .aim-btn-group-right {
    display: flex; gap: 0px; align-items: flex-start; height: 100%;
}
.aim-footer-sep {
    width: 0; border-left: 1px solid #aca899; border-right: 1px solid #ffffff;
    height: calc(100% - 1px); margin: 1px 2px 0 2px;
}

.aim-icon-btn {
    width: 52px; height: 52px;
    background-image: url('../../assets/aim/chat_buttons2.png');
    background-repeat: no-repeat;
    cursor: default; border: none; background-color: transparent;
}
.aim-btn-warn        { background-position: 0px 0px; }
.aim-btn-block       { background-position: -52px 0px; }
.aim-btn-expressions { background-position: -104px 0px; margin: 0px 20px; }
.aim-btn-games       { background-position: -156px 0px; margin: 0px 5px; }
.aim-btn-talk        { background-position: -208px 0px; margin: 0px 5px; }
.aim-btn-send        { background-position: -260px 0px; }

.aim-message-block { margin-bottom: 4px; display: block; word-wrap: break-word; overflow-wrap: break-word; }
.aim-sender-local { color: #fa0202; font-size: 0.8em; font-weight: 600; font-family: Tahoma, Helvetica, sans-serif; margin-right: 5px; }
.aim-sender-remote { color: #0000FF; font-size: 0.8em; font-weight: 600; font-family: Tahoma, Helvetica, sans-serif; margin-right: 5px; }
.aim-text { color: #000; font-family: serif; }
.aim-text a { color: blue; text-decoration: underline; }
.aim-event { font-family: serif; color: #FF8000; padding-left: 5px; margin-bottom: 4px; }