/* AIM 5-style IM controls: embossed icon strip, grouped actions, red send meter. */
.chat-window { width: 332px; height: 430px; display: flex; flex-direction: column; background: #ece9d8; color: #000; }
.chat-window > .titlebar { flex: 0 0 28px; }
.chat-menu { flex: 0 0 24px; padding: 4px 7px; font: 11px/15px Tahoma,Arial,sans-serif; color: #000; }
.chat-menu span { margin-left: 14px; }
.chat-tabs { flex: 0 0 28px; padding: 3px 5px 0; }
.chat-tabs button { padding: 4px 9px; font-size: 10px; }
#chat-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.chat-to.sr-only { padding: 0; }
.chat-log { flex: 1; min-height: 65px; height: auto; margin: 4px 5px 0; padding: 5px 6px; border: 2px inset #fff; background: #fff; color: #000; font: 12px/1.35 Arial,sans-serif; overflow-y: scroll; scrollbar-gutter: stable; }
.chat-log p { margin: 0 0 5px; }
.chat-log b { color: #a00000; font: bold 13px "Times New Roman",serif; }
.chat-log b.you { color: #000080; }
.chat-log .chat-system-message { font: 10px/1.3 Tahoma,sans-serif; color: #666; }
.chat-log .typing { font: 10px/1.3 Tahoma,sans-serif; color: #777; }
.chat-hint-link { border: 0; padding: 0; margin-top: 3px; background: transparent; color: #0000ee; text-decoration: underline; font: 11px Tahoma,Arial,sans-serif; }
.task-button.has-unread { background: linear-gradient(#ffce85, #f38b19 45%, #de6d07); color: #fff; box-shadow: inset 1px 1px #ffe3ad; }
.chat-format { flex: 0 0 28px; display: flex; align-items: center; gap: 1px; padding: 2px 3px; margin: 4px 5px 3px; border: 2px outset #fff; font: bold 15px "Times New Roman",serif; }
.chat-format > button { display: flex; align-items: center; justify-content: center; gap: 1px; height: 21px; width: 22px; flex: 1 1 0; padding: 0; min-width: 0; border: 1px solid transparent; border-radius: 0; background: transparent; color: #000; font: inherit; line-height: 1; }
.chat-format > button:hover { border: 1px outset #fff; background: #f8f5e8; }
.chat-format > button[aria-pressed="true"] { border: 1px inset #fff; background: #d5d2c2; }
.chat-format small { margin: 0; color: #000; font: bold 11px "Times New Roman",serif; }
.chat-format > .aim-text-color { color: #000080; text-decoration: underline; text-underline-offset: 2px; }
.chat-format > .aim-text-highlight { color: #fff; background: #000080; border: 3px solid #ece9d8; }
.chat-format > #chat-link { font: bold 11px "Times New Roman",serif; color: #000080; flex-grow: 1.35; }
.aim-format-separator { align-self: stretch; flex: 0 0 2px; margin: 0 2px; width: 2px; border-left: 1px solid #aaa796; border-right: 1px solid #fff; }
.aim-icon { width: 28px; height: 28px; display: block; flex-shrink: 0; overflow: visible; }
.chat-format .aim-icon { width: 18px; height: 18px; }
.chat-window #chat-form { flex: 0 0 auto; margin: 0 5px; }
.chat-window textarea { height: 57px; padding: 4px; border: 2px inset #fff; font: 12px/1.3 Arial,sans-serif; color: #000; }
.chat-actions { height: 62px; margin-top: 7px; display: grid; grid-template-columns: 2fr 2fr 1.2fr; border: 2px outset #fff; background: #ece9d8; }
.aim-action-group { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; border-right: 1px solid #aaa796; box-shadow: 1px 0 #fff; }
.aim-action { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 3px 1px 4px; border: 1px solid transparent; border-radius: 0; background: transparent; color: #333; font: 11px/13px Tahoma,Arial,sans-serif; text-shadow: 1px 1px #fff; }
.aim-action:hover:not(:disabled) { border: 1px outset #fff; background: #f7f4e7; }
.aim-action:active:not(:disabled),.aim-action[aria-pressed="true"] { border: 1px inset #fff; background: #dfdccd; }
.aim-action:active:not(:disabled) .aim-icon { transform: translate(1px,1px); }
.aim-action:focus-visible { outline: 1px dotted #333; outline-offset: -4px; }
.aim-action > span { white-space: nowrap; }
.aim-action-send { padding-bottom: 11px; }
.aim-action-send > .aim-icon { width: 35px; height: 28px; }
.aim-send-meter { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 6px; border: 1px inset #bbb; background: #150000; display: flex; gap: 1px; padding: 0 1px; }
.aim-send-meter i { flex: 1; background: linear-gradient(90deg,#8f0000,#e5362d,#970000); }
.aim-action:disabled { opacity: 1; color: #88867d; text-shadow: 1px 1px #fff; }
.aim-action:disabled > .aim-icon { opacity: .65; }
.aim-action-send.sending .aim-send-meter i { animation: aim-send .6s alternate infinite; }
.aim-action-send.sending .aim-send-meter i:nth-child(even) { animation-delay: .2s; }
@keyframes aim-send { to { opacity: .3; } }
.chat-status { flex: 0 0 17px; display: flex; align-items: center; justify-content: space-between; padding: 2px 7px 1px; gap: 6px; font: 8px/12px Tahoma,sans-serif; color: #666253; }
.chat-status small { font: 7px/12px Tahoma,sans-serif; white-space: nowrap; }
.chat-suggestions { flex: 0 0 20px; padding: 3px 7px; gap: 8px; }
.chat-suggestions button { font: 8px/12px Tahoma,sans-serif; color: #5a584e; }
.chat-window.maximized .chat-log { height: auto; }
.aim-dialog { width: 340px; }
.aim-dialog-content { padding: 13px; font: 11px/1.35 Tahoma,sans-serif; color: #000; }
.aim-dialog-content h2 { font: bold 14px "Trebuchet MS",Tahoma,sans-serif; margin: 0 0 10px; }
.aim-dialog-content p { margin: 8px 0 12px; }
.aim-dialog-content label { display: flex; align-items: center; gap: 5px; }
.player-window { top: 522px; }
@media (min-width: 1550px) { .chat-window { width: 332px; } .player-window { top: 553px; } }
@media (min-width: 901px) and (max-width: 1100px) { .chat-window { width: 310px; right: 19px; } }
@media (max-height: 820px) and (min-width: 901px) { .chat-window { height: 370px; } .player-window { top: min(466px,calc(100dvh - 340px)); } }
@media (max-width: 900px) {
 .chat-window { height: 450px; }
 .chat-window .chat-log { height: auto; min-height: 65px; font-size: 12px; }
 .chat-window .chat-log b { font-size: 13px; }
 .chat-window textarea { font-size: 12px; }
 .chat-tabs button { padding: 4px 9px; font-size: 11px; }
 .chat-suggestions button { font-size: 9px; }
 .chat-status { font-size: 9px; }
 .chat-status small { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .aim-action-send.sending .aim-send-meter i { animation: none; } }

@media (pointer: coarse) {
  .chat-window { height: 470px; }
  .chat-window > .titlebar { flex-basis: 44px; }
  .chat-window textarea { font-size: 16px; }
}
