/* === Chat Themes === */
/* Each theme overrides CSS variables from retro.css */

/* Win98 is the default — no overrides needed */

/* === AIM (AOL Instant Messenger) === */
[data-theme="aim"] {
    --bg-desktop: #d4d0c8;
    --bg-window: #ece9d8;
    --bg-field: #fff;
    --bg-titlebar: linear-gradient(to bottom, #0054e3, #0041b0);
    --bg-titlebar-inactive: linear-gradient(to bottom, #7a96df, #5f7dc8);

    --text-primary: #000;
    --text-secondary: #555;
    --text-titlebar: #fff;
    --text-link: #0050d0;

    --border-light: #f0ede5;
    --border-dark: #a09e92;
    --border-darker: #716f64;
    --border-white: #fff;

    --color-admin: #cc3300;
    --color-mod: #3366cc;
    --color-member: #333;

    --font-main: Tahoma, "MS Sans Serif", Geneva, sans-serif;
}

[data-theme="aim"] .sidebar-item:hover,
[data-theme="aim"] .sidebar-item.active {
    background: #316ac5;
    color: #fff;
}

[data-theme="aim"] .mention-dropdown li:hover,
[data-theme="aim"] .mention-dropdown li.selected {
    background: #316ac5;
}

[data-theme="aim"] .radio-station:hover,
[data-theme="aim"] .radio-station.active {
    background: #316ac5;
}

/* === ICQ === */
[data-theme="icq"] {
    --bg-desktop: #1a472a;
    --bg-window: #d4e8d4;
    --bg-field: #f0f8f0;
    --bg-titlebar: linear-gradient(to right, #1a6b2a, #4aab5a);
    --bg-titlebar-inactive: linear-gradient(to right, #6a9a6a, #8aba8a);

    --text-primary: #1a3a1a;
    --text-secondary: #4a6a4a;
    --text-titlebar: #fff;
    --text-link: #006030;

    --border-light: #c8dcc8;
    --border-dark: #6a8a6a;
    --border-darker: #3a5a3a;
    --border-white: #e8f4e8;

    --color-admin: #cc3300;
    --color-mod: #005080;
    --color-member: #1a3a1a;

    --color-mention-bg: #d0f0d0;
    --color-mention-border: #60a060;

    --font-main: Tahoma, "MS Sans Serif", Geneva, sans-serif;
}

[data-theme="icq"] .sidebar-item:hover,
[data-theme="icq"] .sidebar-item.active {
    background: #2a7a3a;
    color: #fff;
}

[data-theme="icq"] .mention-dropdown li:hover,
[data-theme="icq"] .mention-dropdown li.selected {
    background: #2a7a3a;
}

[data-theme="icq"] .radio-station:hover,
[data-theme="icq"] .radio-station.active {
    background: #2a7a3a;
}

[data-theme="icq"] .reaction-grid button:hover {
    background: #2a7a3a;
}

[data-theme="icq"] .unread-badge {
    background: #cc3300;
}

/* === MSN Messenger === */
[data-theme="msn"] {
    --bg-desktop: #3a6ea5;
    --bg-window: #eef2f6;
    --bg-field: #fff;
    --bg-titlebar: linear-gradient(to right, #2b5797, #5b9bd5);
    --bg-titlebar-inactive: linear-gradient(to right, #8a9eb5, #a8bed4);

    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-titlebar: #fff;
    --text-link: #2b5797;

    --border-light: #d8e0ea;
    --border-dark: #8a9aaa;
    --border-darker: #5a6a7a;
    --border-white: #f4f6f8;

    --color-admin: #cc3333;
    --color-mod: #2b5797;
    --color-member: #1a1a2e;

    --color-mention-bg: #d6e4f0;
    --color-mention-border: #5b9bd5;

    --font-main: "Segoe UI", Tahoma, Geneva, sans-serif;
    --font-size: 12px;
}

[data-theme="msn"] .sidebar-item:hover,
[data-theme="msn"] .sidebar-item.active {
    background: #2b5797;
    color: #fff;
}

[data-theme="msn"] .mention-dropdown li:hover,
[data-theme="msn"] .mention-dropdown li.selected {
    background: #2b5797;
}

[data-theme="msn"] .radio-station:hover,
[data-theme="msn"] .radio-station.active {
    background: #2b5797;
}

[data-theme="msn"] .reaction-grid button:hover {
    background: #2b5797;
}

[data-theme="msn"] .radio-now-playing {
    background: #1a1a2e;
    color: #5bcdff;
}

/* === mIRC === */
[data-theme="mirc"] {
    --bg-desktop: #000;
    --bg-window: #1a1a1a;
    --bg-field: #000;
    --bg-titlebar: linear-gradient(to right, #333, #555);
    --bg-titlebar-inactive: linear-gradient(to right, #222, #333);

    --text-primary: #c0c0c0;
    --text-secondary: #808080;
    --text-titlebar: #fff;
    --text-link: #5599ff;
    --text-error: #ff4444;

    --border-light: #333;
    --border-dark: #555;
    --border-darker: #666;
    --border-white: #222;

    --color-online: #00cc00;
    --color-away: #cccc00;
    --color-offline: #666;
    --color-admin: #ff4444;
    --color-mod: #4499ff;
    --color-member: #c0c0c0;

    --color-mention-bg: #2a2a00;
    --color-mention-border: #888800;

    --font-main: "Fixedsys", "Courier New", "Lucida Console", monospace;
    --font-mono: "Fixedsys", "Courier New", "Lucida Console", monospace;
    --font-size: 12px;

    --bevel-out: inset -1px -1px 0 #000,
                 inset 1px 1px 0 #333,
                 inset -2px -2px 0 #111,
                 inset 2px 2px 0 #2a2a2a;

    --bevel-in: inset 1px 1px 0 #000,
                inset -1px -1px 0 #333,
                inset 2px 2px 0 #111,
                inset -2px -2px 0 #2a2a2a;
}

[data-theme="mirc"] .sidebar {
    background: #1a1a1a;
}

[data-theme="mirc"] .sidebar-header {
    background: #1a1a1a;
    color: #c0c0c0;
    border-bottom-color: #333;
}

[data-theme="mirc"] .sidebar-header:hover {
    background: #2a2a2a;
}

[data-theme="mirc"] .sidebar-list {
    background: #000;
}

[data-theme="mirc"] .sidebar-item:hover,
[data-theme="mirc"] .sidebar-item.active {
    background: #003366;
    color: #fff;
}

[data-theme="mirc"] .room-hash {
    color: #808080;
}

[data-theme="mirc"] .sidebar-item:hover .room-hash,
[data-theme="mirc"] .sidebar-item.active .room-hash {
    color: #aaa;
}

[data-theme="mirc"] .chat-messages {
    background: #000;
    color: #c0c0c0;
}

[data-theme="mirc"] .message:hover {
    background: #111;
}

[data-theme="mirc"] .retro-input {
    background: #111;
    color: #c0c0c0;
}

[data-theme="mirc"] .retro-select {
    background: #111;
    color: #c0c0c0;
    border-color: #555;
}

[data-theme="mirc"] .retro-btn {
    background: #2a2a2a;
    color: #c0c0c0;
}

[data-theme="mirc"] .title-btn {
    background: #2a2a2a;
    color: #c0c0c0;
}

[data-theme="mirc"] .toolbar-btn {
    background: #2a2a2a;
    color: #c0c0c0;
}

[data-theme="mirc"] .status-bar {
    background: #1a1a1a;
}

[data-theme="mirc"] .status-bar-right {
    color: #808080;
}

[data-theme="mirc"] .status-bar-right a {
    color: #5599ff;
}

[data-theme="mirc"] a {
    color: #5599ff;
}

[data-theme="mirc"] .mention-dropdown {
    background: #111;
    border-color: #555;
}

[data-theme="mirc"] .mention-dropdown li:hover,
[data-theme="mirc"] .mention-dropdown li.selected {
    background: #003366;
}

[data-theme="mirc"] .reaction-picker {
    background: #111;
    border-color: #555;
}

[data-theme="mirc"] .reaction-grid button:hover {
    background: #003366;
}

[data-theme="mirc"] .reaction-pill {
    background: #2a2a2a;
    color: #c0c0c0;
}

[data-theme="mirc"] .reaction-pill.own {
    background: #1a1a4a;
}

[data-theme="mirc"] .reply-quote {
    background: #111;
    color: #999;
    border-left-color: #555;
}

[data-theme="mirc"] .reply-quote:hover {
    background: #1a1a1a;
}

[data-theme="mirc"] .reply-preview {
    background: #1a1a1a;
    border-left-color: #5599ff;
}

[data-theme="mirc"] .typing-indicator {
    color: #808080;
}

[data-theme="mirc"] .radio-now-playing {
    background: #000;
    color: #00ff00;
}

[data-theme="mirc"] .radio-station:hover,
[data-theme="mirc"] .radio-station.active {
    background: #003366;
    color: #fff;
}

[data-theme="mirc"] .profile-card {
    background: #1a1a1a;
    color: #c0c0c0;
    border-color: #555;
}

[data-theme="mirc"] .profile-card-no-avatar {
    background: #003366;
}

[data-theme="mirc"] .topic-bar {
    background: #111;
    border-bottom-color: #333;
}

[data-theme="mirc"] .search-panel {
    background: #1a1a1a;
    border-bottom-color: #333;
}

[data-theme="mirc"] .search-result:hover {
    background: #111;
}

[data-theme="mirc"] .search-highlight {
    background: #666600;
    color: #fff;
}

[data-theme="mirc"] .dm-window {
    border-color: #555;
}

[data-theme="mirc"] .dm-messages {
    background: #000;
    color: #c0c0c0;
}

[data-theme="mirc"] .emoticon-picker {
    background: #111;
    border-color: #555;
}

[data-theme="mirc"] .emoticon-btn:hover {
    background: #003366;
}

[data-theme="mirc"] .nudge-message {
    color: #ff8800;
}

[data-theme="mirc"] ::-webkit-scrollbar-track {
    background: #111;
}

[data-theme="mirc"] ::-webkit-scrollbar-thumb {
    background: #333;
}

[data-theme="mirc"] ::-webkit-scrollbar-button {
    background: #333;
}

/* === Theme Picker === */

.theme-picker {
    position: fixed;
    background: var(--bg-window);
    box-shadow: var(--bevel-out);
    border: 1px solid var(--border-dark);
    padding: 4px;
    z-index: 200;
    width: 140px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 11px;
}

.theme-option:hover {
    background: #000080;
    color: #fff;
}

[data-theme="mirc"] .theme-option:hover {
    background: #003366;
}

.theme-option.active {
    font-weight: bold;
}

.theme-option .theme-swatch {
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-dark);
    flex-shrink: 0;
}
