/**
 *    This file is part of "LexyChat".
 *    LexyChat is based on "PCPIN Chat 6", Copyright (C) 2007 Konstantin Reznichak.
 *
 *    "LexyChat" is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    "LexyChat" is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/*
 * Design tokens. js/theme.js sets <html data-theme="dark|light">.
 * Dark is also the fallback without JavaScript. Flat colors only.
 */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --lc-bg: #2C2F33;
  --lc-surface: #36393f;
  --lc-surface-2: #23262a;
  --lc-text: #E3E5E8;
  --lc-text-muted: #b9bbbe;
  --lc-border: #555555;
  --lc-accent: #E6A70B;
  --lc-accent-text: #222222;
  --lc-link: #e3e5e8;
  --lc-link-hover: #E6A70B;
  --lc-button-bg: #E6A70B;
  --lc-button-text: #222222;
  --lc-button-hover-bg: #cc9409;
  --lc-input-bg: #40444b;
  --lc-input-text: #E3E5E8;
  --lc-hover: #454950;
  --lc-messages-bg: rgba(54, 57, 63, 0.85);
  --lc-overlay: rgba(0, 0, 0, 0.6);
  --lc-shadow: rgba(0, 0, 0, 0.45);
  --lc-scrollbar: #6b6e73;
  --lc-scrollbar-track: #2f3136;
  --lc-error: #ff6b6b;
  --lc-success: #E6A70B;
}

html[data-theme="light"] {
  color-scheme: light;
  --lc-bg: #d4d7dc;
  --lc-surface: #E3E5E8;
  --lc-surface-2: #c8ccd1;
  --lc-text: #1e1f22;
  --lc-text-muted: #4d5057;
  --lc-border: #b3b7bd;
  --lc-accent: #E6A70B;
  --lc-accent-text: #222222;
  --lc-link: #2e3035;
  --lc-link-hover: #6b5200;
  --lc-button-bg: #E6A70B;
  --lc-button-text: #222222;
  --lc-button-hover-bg: #cc9409;
  --lc-input-bg: #E3E5E8;
  --lc-input-text: #1e1f22;
  --lc-hover: #cdd1d6;
  --lc-messages-bg: rgba(227, 229, 232, 0.9);
  --lc-overlay: rgba(0, 0, 0, 0.4);
  --lc-shadow: rgba(0, 0, 0, 0.15);
  --lc-scrollbar: #9a9ea5;
  --lc-scrollbar-track: #d4d7dc;
  --lc-error: #c62828;
  --lc-success: #6b5200;
}

 * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, pre {
  color: var(--lc-text);
  font-family: 'Roboto', sans-serif;
  font-size: 1.25rem;
  overflow: auto;
  height: 100%;
}

html, body {
  overflow: auto;
}

body {
  background: var(--lc-bg);
  display: flex;
  flex-direction: column;
  height: 100%;
}

label {
  cursor: pointer;
}

img {
  border: 0px;
}

a {
  color: var(--lc-link);
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  color: var(--lc-link-hover);
}

/* Theme toggle button (js/theme.js) */
.lc-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-radius: 5px;
  font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.lc-theme-toggle:hover {
  background: var(--lc-hover);
  border-color: var(--lc-accent);
}

.lc-theme-toggle:focus-visible,
.lc-theme-toggle-chat:focus-visible,
.lc-userlist-side-btn:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

/* Room selection header: next to "log out" */
.tbl_header_main .lc-theme-toggle {
  margin-left: 10px;
  padding: 2px 8px;
  vertical-align: middle;
}

/* Admin navigation frame: below the logo */
.lc-theme-toggle-bar {
  padding: 0 0 15px 0;
}

/* Chat room: icon buttons (theme, userlist side) in the userlist button row, same size as the other buttons */
.userlist-button.lc-theme-toggle-chat,
.userlist-button.lc-userlist-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 0;
  border: none;
  color: var(--lc-text);
  font-size: 18px;
  line-height: 1;
}

.userlist-button.lc-theme-toggle-chat:hover,
.userlist-button.lc-userlist-side-btn:hover {
  color: var(--lc-button-text);
}

/* Top banner area */
#chatroom_top_banner {
  position: absolute;
  overflow: hidden;
  border: 0px;
  padding: 0px;
  margin: 0px;
  width: 100%;
}

/* Bottom banner area */
#chatroom_bottom_banner {
  position: absolute;
  overflow: hidden;
  border: 0px;
  padding: 0px;
  margin: 0px;
  width: 100%;
}

/* Color selection box */
#color_selection_box {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 292px;
  height: 196px;
  background-color: var(--lc-surface-2);

}

/* Smilie box */
#smilie_selection_box {
  position: absolute;
  top: 0px;
  left: 0px;
  border: solid 1px var(--lc-border);
  background-color: var(--lc-surface);
  overflow: hidden;
  margin: 0px;
  padding: 0px;
}

/* Dialogs: message, question, input (tpl/alertbox.tpl, tpl/confirmbox.tpl, tpl/promptbox.tpl).
   Centered by CSS above everything else (also above the modals of the admin pages and the room selection).
   Explicit button styles: page styles like css/testLogin.css give every button a fixed width */
.lc-dialog {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 1rem;
}

.lc-dialog-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--lc-overlay);
}

.lc-dialog-box {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  margin: 0;
  padding: 22px 24px 18px;
  overflow: auto;
  background: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-top: 4px solid var(--lc-accent);
  border-radius: 12px;
  box-shadow: 0 10px 40px var(--lc-shadow);
}

.lc-dialog-text {
  display: block;
  font-size: 0.8rem;
  font-weight: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: default;
}

.lc-dialog-box .lc-dialog-input {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  padding: 8px 10px;
  background: var(--lc-input-bg);
  color: var(--lc-input-text);
  border: 1px solid var(--lc-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
}

.lc-dialog-box .lc-dialog-input:focus {
  border-color: var(--lc-accent);
  outline: none;
}

.lc-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lc-dialog-actions button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 90px;
  height: auto;
  min-height: 36px;
  margin: 0;
  padding: 0 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lc-dialog-actions .lc-dialog-primary {
  background: var(--lc-button-bg);
  color: var(--lc-button-text);
  border: 1px solid var(--lc-button-bg);
}

.lc-dialog-actions .lc-dialog-primary:hover {
  background: var(--lc-button-hover-bg);
  border-color: var(--lc-button-hover-bg);
  color: var(--lc-button-text);
}

.lc-dialog-actions .lc-dialog-secondary {
  background: var(--lc-surface-2);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
}

.lc-dialog-actions .lc-dialog-secondary:hover {
  background: var(--lc-hover);
  border-color: var(--lc-accent);
  color: var(--lc-text);
}

.lc-dialog-actions button:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

/* Password field box */
#password_field_box {
  position: absolute;
  top: 0px;
  left: 0px;
  border: solid 1px var(--lc-accent);
  background-color: var(--lc-surface-2);
  padding: 3px;
  text-align: center;
}

/* Online status selection box */
#online_status_selection_box {
  position: absolute;
  top: 0px;
  left: 0px;
  padding: 0px;
  margin: 0px;
}

/* Context menu table disabled row */
.context_menu_table_disabled_row {
  background-color: var(--lc-surface);
  color: var(--lc-text-muted);
  font-weight: normal;
  text-align: left;
  vertical-align: middle;
  margin: 0px;
  padding: 0px;
  cursor: default;
}

/* Nickname colorizer preview */
#nickname_preview {
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
}

/* User options context menu (click on a nickname), same look as the help box */
#user_options_box {
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 10;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  padding: 0px;
  margin: 0px;
  background-color: var(--lc-surface);
  border: 1px solid var(--lc-border);
  box-shadow: 0 4px 16px var(--lc-shadow);
}

#user_options_box .context_menu_table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

/* The rows are table rows: no flex layout here */
#user_options_box tr {
  display: table-row;
}

#user_options_box td {
  padding: 10px 16px;
  font-size: 16px;
  color: var(--lc-text);
  text-align: left;
  white-space: nowrap;
}

#user_options_box td.context_menu_table_header {
  padding: 10px 16px;
  font-size: 18px;
  text-align: center;
  color: var(--lc-accent-text);
}

#user_options_box .context_menu_table_row {
  cursor: pointer;
}

#user_options_box .context_menu_table_row:hover td {
  background-color: var(--lc-hover);
}

#user_options_box td.context_menu_table_separator_row {
  height: 1px;
  padding: 0;
  background-color: var(--lc-border);
}

.tbl {
  background-color: var(--lc-border);
}


.tbl_menue {
}

/* Table main header */
.tbl_header_main {
  color: var(--lc-text);
  font-weight: bold;
  font-size: 0.75rem;
  text-align: left;
  margin: 0px;
  padding: 3px;
  vertical-align: middle;
  background-color: var(--lc-surface-2);
  border-bottom: 2px solid var(--lc-accent);
}
.tbl_header_main_link {
  color: var(--lc-text);
}

/* Table sub header */
.tbl_header_sub {
  color: var(--lc-accent-text);
  font-weight: bold;
  font-size: 0.75rem;
  text-align: left;
  margin: 0px;
  padding: 3px;
  vertical-align: middle;
  background-color: var(--lc-accent);
}
.tbl_header_sub_link {
  color: var(--lc-accent-text);
  font-size: 0.75rem;
  font-weight: normal;
  text-decoration: underline;
}

/* Table row */
.tbl_row {
  background-color: var(--lc-surface);
  color: var(--lc-text);
  font-weight: normal;
  font-size: 0.555rem;
  text-align: left;
  margin: 0px;
  padding: 3px;
  vertical-align: middle;
}

.tbl_row_link {
  color: var(--lc-link);
  font-size: 0.75rem;
  font-weight: normal;
  text-decoration: underline;
}

/* Status:Error text message */
.statustext_error {
  color: var(--lc-error);
}

/* Status:Success text message */
.statustext_success {
  color: var(--lc-success);
}

#progressBar {
  position: absolute;
  background-color: var(--lc-surface-2);
  color: var(--lc-text);
  border: solid 1px var(--lc-accent);
  font-size: 13px;
  padding-left: 30px;
  padding-right: 30px;
  padding-top: 15px;
  padding-bottom: 15px;
  z-index: 10000;
}

/* Page numbers area */
#page_numbers {
  font-weight: normal;
  font-size: 12px;
  width: 100%;
  text-align: right;
  padding: 2px;
}
#page_numbers a {
  text-decoration: underline;
  font-weight: normal;
}

/* Banner popup */
#banner_popup {
  position: absolute;
  overflow: hidden;
  border: solid 1px var(--lc-border);
  background-color: var(--lc-surface);
  padding: 2px;
  margin: 0px;
  text-align: right;
}
#banner_popup_frame {
  position: absolute;
  overflow: hidden;
  border: solid 1px var(--lc-border);
  background-color: var(--lc-surface);
  padding: 0px;
  margin: 0px;
  text-align: right;
  top: 22px;
  left: 8px;
}

/* Avatar image "onmouseover" thumb */
.avatar_image_hover_thumb {
  position: absolute;
  border: solid 1px var(--lc-border);
  cursor: pointer;
}

/*LOGIN PAGE*/

.login_page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

/*CHAT ROOM*/

.chatroom-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.chatroom-container {
  display: flex;
  flex-direction: row;
  overflow: auto;
  height: 100%;
}

#chatroom_userlist {
  flex-shrink: 0;
  width: 23%;
  min-width: 251px;
  max-width: 301px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background-color: var(--lc-surface) !important;
  border-right: 1px solid var(--lc-border);
}

/* Userlist position (js/chat_room.js setAreas(): userlist-left, userlist-right) */
.chatroom-container.userlist-right {
  flex-direction: row-reverse;
}

.chatroom-container.userlist-right #chatroom_userlist {
  border-right: 0;
  border-left: 1px solid var(--lc-border);
}

/* Buttons on the divider between userlist and messages: fold away (toggleUserlistCollapsed()) and other side (toggleUserlistSide()).
   The rail has no width, the buttons sit on the divider line; with row-reverse they stay between both areas */
.userlist-collapse-rail {
  position: relative;
  flex: 0 0 0;
  width: 0;
  z-index: 5;
}

.userlist-rail-buttons {
  position: absolute;
  top: 50%;
  left: -12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-50%);
}

.userlist-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 48px;
  margin: 0;
  padding: 0;
  background-color: var(--lc-surface);
  color: var(--lc-text-muted);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  box-shadow: 0 1px 4px var(--lc-shadow);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.userlist-swap-btn {
  height: 32px;
}

.userlist-collapse-btn:hover {
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
}

.userlist-collapse-btn:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

.userlist-collapse-btn .lc-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.userlist-swap-btn .lc-icon {
  width: 14px;
  height: 14px;
}

.userlist-theme-btn {
  font-size: 14px;
  line-height: 1;
}

/* The arrow points to where the userlist goes: right side ">" hides, "<" shows; left side the other way round */
.chatroom-container.userlist-left #userlist_collapse_btn .lc-icon,
.chatroom-container.userlist-right.userlist-collapsed #userlist_collapse_btn .lc-icon {
  transform: rotate(180deg);
}

.chatroom-container.userlist-left.userlist-collapsed #userlist_collapse_btn .lc-icon {
  transform: none;
}

/* Folded away: only the button stays, at the edge of the window.
   !important: initChatRoom() copies "#chatroom_userlist { display: flex }" as inline style (setCssClass()).
   Desktop only: on small screens the bar "Benutzerliste" shows and hides the userlist */
@media screen and (min-width: 769px) {
  .chatroom-container.userlist-collapsed #chatroom_userlist {
    display: none !important;
  }
}

/* Folded away: only the button to show it again stays at the edge */
.chatroom-container.userlist-collapsed .userlist-swap-btn {
  display: none;
}

.chatroom-container.userlist-left.userlist-collapsed .userlist-rail-buttons {
  left: 0;
}

.chatroom-container.userlist-left.userlist-collapsed #userlist_collapse_btn {
  border-radius: 0 6px 6px 0;
}

.chatroom-container.userlist-right.userlist-collapsed .userlist-rail-buttons {
  left: -24px;
}

.chatroom-container.userlist-right.userlist-collapsed #userlist_collapse_btn {
  border-radius: 6px 0 0 6px;
}

#chatroom_userlist_contents {
  flex-grow: 1;
}

#chatroom_userlist_list {
  font-size: 13px;
  padding: 0px;
  padding-right: 4px;
  text-align: left;
  font-weight: normal;
  margin: 5px;
}

#chatroom_userlist_list a {
  text-decoration: none;
  font-weight: normal;
}

.chatroom-messages-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  max-height: 100svh;
  overflow-y: auto; /* Ermöglicht vertikales Scrollen */

}

#chatroom_messages {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background-size: cover;
  padding: 0px;
  margin: 0px;
}

#chatroom_messages {
  background-color: var(--lc-messages-bg) !important;
}

#chatroom_controls_contents {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background-color: var(--lc-surface);
  /* Space below the message input, so it does not stick to the bottom edge */
  padding: 0 5px 16px;
}

#chatroom_messages_contents {
  flex-grow: 1;
  overflow-y: auto;
  padding: 5px 10px 0 10px;
  border-bottom: 1px solid var(--lc-border);
}

#chatroom_controls {
  flex-shrink: 0;
}

#online_status_selection_box,
#exit_selection_box,
#help_box {
  position: fixed;
  z-index: 10;
}

/*TEXTAREA Styles*/
.input_textarea {
  display: flex;
  gap: 5px;
  border: 1px solid var(--lc-border);
}

#main_input_textarea {
  all: unset;
  color: var(--lc-input-text) !important;
  resize: none;
  box-sizing: border-box;
  background-color: var(--lc-input-bg);
  font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  font-size: 1rem;
  width: 100% !important;
  padding: 5px;
}

/* General button styles */
.row-btn-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 5px;
}

.button-group, .select-group {
  display: flex;
  gap: 10px;
}

.button {
  padding: 10px 20px;
  background-color: var(--lc-button-bg);
  border: none;
  color: var(--lc-button-text);
  font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  font-size: 0.775rem;
  cursor: pointer;
  margin-top: 5px;
  border-radius: 5px;
}

.icon-button {
  width: 32px;
  height: 40px;
  background-color: var(--lc-button-bg);
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.transparent-button {
  padding: 10px 10px;
  width: 32px;
  height: 40px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 5px;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.userlist-buttons {
  justify-content: center;
}

.userlist-button {
  padding: 10px 20px;
  background-color: var(--lc-hover);
  width: 32px;
  height: 40px;
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 5px;
  cursor: pointer;
}

.userlist-entry{
	font-size: 15px !important;
}

/* Online status icons (pic/status/*.svg, onlineStatusImage() in js/base/global.js) */
img[src*="pic/status/"] {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

/* Online status "OnAir": square animated icon (pic/onair.svg, onlineStatusImage() in js/base/global.js) */
img[src$="onair.svg"] {
  vertical-align: -3px;
}

.userlist-entry img[src$="onair.svg"] {
  width: 14px;
  height: 14px;
}

/* Userlist record (tpl/userlist_record_tpl.tpl): status, avatar, group icons and nickname with the same gap.
   Flex ignores the whitespace between the elements, empty parts (no avatar) take no space. */
.ul-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.ul-row > .ul-status,
.ul-row > .ul-avatar {
  display: inline-flex;
  align-items: center;
}

.ul-row > .ul-status:empty,
.ul-row > .ul-avatar:empty {
  display: none;
}

.ul-row img[src*="pic/status/"],
.ul-row img[src$="onair.svg"] {
  vertical-align: middle;
}

/* Group icons before the nickname (tpl/userlist_record_tpl.tpl): admin, chat moderator, VIP, Moderator/DJ */
.ul-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* The icons are cropped to their shape (viewBox): height fixed, width follows the shape, so the visible gaps are equal */
  height: 14px;
  cursor: help;
}

.ul-badge svg {
  width: auto;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ul-badge-admin {
  color: #e5484d;
}

.ul-badge-admin svg path:last-child {
  fill: currentColor;
}

.ul-badge-moderator {
  color: #30a46c;
}

.ul-badge-vip {
  color: var(--lc-accent);
}

.ul-badge-vip svg {
  fill: currentColor;
}

.ul-badge-dj {
  color: #8e4ec6;
}

.userlist-button:hover {
  background-color: var(--lc-button-bg);
}

.button:hover, .icon-button:hover {
  background-color: var(--lc-button-hover-bg);
}

.select {
  padding: 10px;
  background-color: var(--lc-input-bg);
  border: 1px solid var(--lc-border);
  color: var(--lc-input-text);
  font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
  font-size: 0.775rem;
  border-radius: 5px;
  margin-top: 5px;
}

.button:active, .icon-button:active {
  transform: scale(0.95);
}

/* Message send button styles */
#mainSendMessageButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  margin: 4px;
  padding: 0;
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#mainSendMessageButton:hover {
  background-color: var(--lc-button-hover-bg);
}

#mainSendMessageButton .lc-icon {
  width: 22px;
  height: 22px;
}

.select::-webkit-scrollbar {
  width: 10px;
}

.select::-webkit-scrollbar-track {
  background: var(--lc-scrollbar-track);
  border-radius: 5px;
}

.select::-webkit-scrollbar-thumb {
  background: var(--lc-scrollbar);
  border-radius: 5px;
}

.select::-webkit-scrollbar-thumb:hover {
  background: var(--lc-text-muted);
}

.controls-row {
  box-shadow: 0 -1px 2px var(--lc-shadow);
}



/*ONLINE Status Box*/
#online_status_selection_box {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  margin: 0;
  width: 300px;
  background-color: var(--lc-surface);
  border: 1px solid var(--lc-border);
  box-shadow: 0 4px 16px var(--lc-shadow);
  z-index: 10;
}

/*EXIT box & HELP box*/
#exit_selection_box, #help_box {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  margin: 0;
  width: 250px;
  background-color: var(--lc-surface);
  border: 1px solid var(--lc-border);
  box-shadow: 0 4px 16px var(--lc-shadow);
  z-index: 10;
}

.context_menu_header {
  background-color: var(--lc-accent);
  color: var(--lc-accent-text);
  font-size: 18px;
  font-weight: bold;
  padding: 10px;
  text-align: center;
}

.context_menu_list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.context_menu_item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--lc-surface);
  color: var(--lc-text);
  cursor: pointer;
  font-size: 16px;
  gap: 10px;
}

.context_menu_item span {
  flex-grow: 1;
}

.context_menu_item:hover {
  background-color: var(--lc-hover);
}

.context_menu_item_hover {
  background-color: var(--lc-hover);
}

.context_menu_table_header {
  background-color: var(--lc-accent);
  color: var(--lc-accent-text);
  font-size: 18px;
  font-weight: bold;
  padding: 10px;
  text-align: center;
}

.context_menu_table {
  list-style: none;
  padding: 0;
  margin: 0;
}

.context_menu_table_row {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--lc-surface);
  color: var(--lc-text);
  cursor: pointer;
  font-size: 16px;
  gap: 10px;
}

.context_menu_table_row:hover {
  background-color: var(--lc-hover);
}

.context_menu_table_hrow {
  background-color: var(--lc-hover);
}

/* Buttons of the chat toolbar (tpl/chat_room.tpl): same size, line icons (Feather, MIT) in the text color */
.lc-toolbar {
  justify-content: space-between;
  flex-wrap: nowrap;
  margin: 0;
  padding: 8px 0 6px;
}

.lc-toolbar-group {
  align-items: center;
  gap: 6px;
}

.lc-toolbar-end {
  margin-left: auto;
}

.lc-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  background-color: var(--lc-hover);
  background-repeat: no-repeat;
  background-position: center center;
  color: var(--lc-text);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  /* The status button has no content: without this it sits lower than the others */
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lc-tool-btn.lc-menu-trigger {
  padding: 0;
}

.lc-tool-btn:hover {
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
}

.lc-tool-btn:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

/* Online status: image from showOwnOnlineStatus() */
.lc-tool-status {
  background-size: 16px 16px;
}

/* Leave/log out: red on hover */
.lc-tool-exit:hover {
  background-color: var(--lc-error);
  color: #ffffff;
}

.lc-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dropdown menus of the chat toolbars (js/chat_menus.js) */
.lc-menu-wrap {
  position: relative;
}

.lc-menu-trigger {
  position: relative;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 1rem;
  line-height: 1;
}

.lc-menu-trigger[aria-expanded="true"] {
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
}

/* Active bold/italic/underline while the text menu is closed */
.lc-menu-trigger.has-format::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--lc-accent);
}

.lc-menu {
  /* Placed at the trigger by js/chat_menus.js, can lie over the chat like the help box */
  position: fixed;
  z-index: 10;
  /* Same look as the help box (#help_box) */
  width: 250px;
  max-width: calc(100vw - 16px);
  padding: 0;
  background-color: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  box-shadow: 0 4px 16px var(--lc-shadow);
}

.lc-menu[hidden] {
  display: none;
}

/* Long menus ("Einstellungen") scroll inside the window */
.lc-menu {
  max-height: calc(100vh - 10px);
  overflow-y: auto;
}

/* Section title inside a menu (e.g. "Ansicht", "Hilfe") */
.lc-menu-section {
  padding: 8px 10px 4px;
  border-top: 1px solid var(--lc-border);
  color: var(--lc-text-muted);
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lc-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 10px 10px 34px;
  position: relative;
  background-color: var(--lc-surface);
  border: none;
  border-radius: 0;
  color: var(--lc-text);
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.lc-menu-item:hover {
  background-color: var(--lc-hover);
}

.lc-menu-item:focus-visible,
.lc-menu-trigger:focus-visible,
.lc-menu .select:focus-visible,
.lc-menu-row .button:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: -2px;
}

/* Switches: a check mark shows the "on" state */
.lc-menu-item[role="menuitemcheckbox"]::before {
  content: "";
  position: absolute;
  left: 12px;
  width: 14px;
  text-align: center;
  color: var(--lc-accent);
  font-weight: bold;
}

.lc-menu-item.is-on::before {
  content: "\2713";
}

.lc-menu-icon {
  position: absolute;
  left: 12px;
  width: 14px;
  text-align: center;
}

.lc-menu-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.lc-menu-label {
  font-size: 16px;
  color: var(--lc-text);
}

.lc-menu-field .select {
  max-width: 160px;
}

.lc-menu-row {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.lc-menu-row .button {
  flex: 1 1 0;
  margin: 0;
  padding: 8px 0;
}

.lc-menu-divider {
  height: 1px;
  margin: 0;
  background-color: var(--lc-border);
}

/*Form buttons styles*/
.form-buttons button {
  background-color: var(--lc-button-bg);
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  color: var(--lc-button-text);
  padding: 10px 20px;
  border: none;
  cursor: pointer;
}

.form-buttons button:hover {
  background-color: var(--lc-button-hover-bg);
}

.div-buttons button {
  background-color: var(--lc-surface-2);
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  color: var(--lc-text);
  padding: 10px 20px;
  border: 1px solid var(--lc-border);
  cursor: pointer;
}

.div-buttons button:hover {
  border-color: var(--lc-accent);
}

.responsive-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-main input{
  width: 100%;
}

.profile-main textarea {
  width: 100%;
}

.profile-main select {
  width: 100%;
}

/* Profile window, page "Level": separate sections for level and user groups (tpl/profile_main.tpl) */
.profile-section + .profile-section {
  margin-top: 16px;
}

.profile-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 8px 4px;
}

.profile-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* ".profile-main input" is 100% wide: not for radio buttons and check boxes */
.profile-main .profile-options input {
  width: auto;
  margin: 0;
}

.profile-hint {
  padding: 0 4px 4px;
  font-size: 0.65rem;
  color: var(--lc-text-muted);
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px 4px;
  border-top: 1px solid var(--lc-border);
}

.profile-actions button {
  padding: 8px 18px;
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
  border: none;
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
}

.profile-actions button:hover {
  background-color: var(--lc-button-hover-bg);
}

.profile-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Bar "Benutzerliste" above the userlist: only on small screens (see the media query below) */
#toggleUserlistButton {
  display: none;
}


@media screen and (max-width: 768px) {
  .row-btn-container {
    flex-wrap: wrap;
    gap: 5px;
  }

  .icon-button {
    height: 28px;
  }

  .button, .icon-button, .transparent-button, .userlist-button, .select {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .button-group, .select-group {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  /* Chat toolbar: both groups stay in one row */
  .lc-toolbar .lc-toolbar-group {
    width: auto;
    gap: 4px;
  }

  .lc-tool-btn {
    width: 36px;
    height: 36px;
  }

  #mainSendMessageButton {
    font-size: 1rem;
  }

  .chatroom-container,
  .chatroom-container.userlist-left,
  .chatroom-container.userlist-right {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
  }

  #chatroom_userlist,
  .chatroom-container.userlist-right #chatroom_userlist {
    display: none;
    flex: 0 0 auto;
    width: 100% !important;
    min-width: 100%;
    max-width: 100%;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--lc-border);
  }

  /* Column layout: the bar "Benutzerliste" above shows and hides the userlist */
  #toggleUserlistButton {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    background: var(--lc-surface-2);
    color: var(--lc-text);
    border: 0;
    border-bottom: 1px solid var(--lc-border);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
  }

  .userlist-collapse-rail {
    display: none;
  }

  .chatroom-messages-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
  }

  #chatroom_messages {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #chatroom_controls {
    flex: 0 0 auto;
    width: 100%;
  }

  .textarea-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .input_textarea {
    width: 100%;
  }

  #exit_selection_box, #help_box {
    left: 75px !important;
  }

  .filter-container {
    display: flex;
    flex-direction: column;
    padding: 0 5px;
  }

  .header-filter {
    display: flex;
    flex-direction: column;
  }

  .profile-main select,
  .profile-main button {
    font-size: 0.7rem;
  }

  .profile-main button {
    padding: 5px 10px;
  }

  #color_selection_box {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 292px;
    height: 196px;
    background-color: var(--lc-surface-2);
    left: 69px !important;
  }
}
/* Room selection in the userlist: switches right after the choice */
.room-selection {
  position: relative;
  margin: 8px 10px 6px;
}

/* Arrow (the native one is hidden by appearance: none) */
.room-selection::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 2px solid var(--lc-text-muted);
  border-bottom: 2px solid var(--lc-text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

/* setAreas()/updateRoomList() set an inline width: the select always fills the userlist */
#chatroom_userlist_room_selection {
  width: 100% !important;
}

.room-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  height: 40px;
  margin: 0;
  padding: 0 36px 0 12px;
  background-color: var(--lc-input-bg);
  color: var(--lc-input-text);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.room-select:hover {
  border-color: var(--lc-accent);
}

.room-select:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 1px;
}

.room-select optgroup {
  background-color: var(--lc-surface);
  color: var(--lc-text-muted);
  font-style: normal;
}

.room-select option {
  background-color: var(--lc-surface);
  color: var(--lc-text);
}

/* Smilie window (inc=smilies, tpl/smilies.tpl, js/smilies.js) */
.sm-window {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: var(--lc-bg);
  color: var(--lc-text);
  user-select: none;
}

.sm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--lc-surface);
  border-bottom: 1px solid var(--lc-border);
}

.sm-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.sm-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  background-color: var(--lc-input-bg);
  color: var(--lc-input-text);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  user-select: text;
}

.sm-search:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 1px;
}

.sm-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.sm-categories {
  flex: 0 0 190px;
  overflow-y: auto;
  padding: 8px;
  background-color: var(--lc-surface-2);
  border-right: 1px solid var(--lc-border);
}

/* While searching the matches of all categories are shown */
.sm-categories.is-searching .sm-category.is-active {
  background-color: transparent;
  color: var(--lc-text);
}

.sm-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0 0 2px;
  padding: 7px 10px;
  background-color: transparent;
  color: var(--lc-text);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.sm-category:hover {
  background-color: var(--lc-hover);
}

.sm-category.is-active {
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
  font-weight: bold;
}

.sm-category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-category-count {
  flex: 0 0 auto;
  font-size: 0.75rem;
  opacity: 0.7;
}

.sm-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 10px;
}

.sm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.sm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  padding: 8px 4px;
  background-color: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.sm-item:hover {
  border-color: var(--lc-accent);
  transform: translateY(-1px);
}

.sm-item:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 1px;
}

.sm-item img {
  max-width: 64px;
  max-height: 48px;
  pointer-events: none;
}

.sm-code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--lc-text-muted);
}

.sm-empty {
  padding: 30px 10px;
  text-align: center;
  color: var(--lc-text-muted);
}

.sm-toast {
  position: fixed;
  left: 50%;
  bottom: 14px;
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  background-color: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-accent);
  border-radius: 6px;
  box-shadow: 0 4px 16px var(--lc-shadow);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sm-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sm-toast.is-error {
  border-color: var(--lc-error);
}

/* Narrow window: categories as a scrolling row above the smilies */
@media (max-width: 560px) {
  .sm-body {
    flex-direction: column;
  }

  .sm-categories {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid var(--lc-border);
  }

  .sm-category {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }
}

/* Own form around the search field (no pairing with the room password field, see tpl/password_field_box_tpl.tpl) */
.sm-search-form {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.sm-search-form .sm-search {
  width: 100%;
}

/* "Über LexyChat" window (js/about_box.js) */
.lc-about-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--lc-overlay);
}

.lc-about {
  position: relative;
  box-sizing: border-box;
  width: 460px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-top: 3px solid var(--lc-accent);
  border-radius: 10px;
  box-shadow: 0 12px 40px var(--lc-shadow);
  font-size: 0.9rem;
  line-height: 1.45;
}

.lc-about-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: var(--lc-text-muted);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.lc-about-close:hover,
.lc-about-close:focus-visible {
  background: var(--lc-hover);
  color: var(--lc-text);
}

.lc-about-head {
  padding: 28px 24px 18px;
  text-align: center;
  background: var(--lc-surface-2);
  border-bottom: 1px solid var(--lc-border);
}

.lc-about-logo {
  display: block;
  width: 240px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 14px;
}

.lc-about-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: bold;
}

.lc-about-version {
  display: inline-block;
  margin-left: 0;
  padding: 1px 8px;
  background: var(--lc-accent);
  color: var(--lc-accent-text);
  border-radius: 999px;
  font-size: 0.75rem;
  vertical-align: middle;
}

.lc-about-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--lc-link-hover);
  text-decoration: none;
}

.lc-about-link:hover {
  text-decoration: underline;
}

.lc-about-copyright {
  margin: 8px 0 0;
  color: var(--lc-text-muted);
}

.lc-about-body {
  padding: 16px 24px 20px;
}

.lc-about-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--lc-border);
}

.lc-about-row:last-of-type {
  border-bottom: none;
}

.lc-about-label {
  white-space: nowrap;
  color: var(--lc-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 1px;
}

.lc-about-muted {
  color: var(--lc-text-muted);
  font-size: 0.85rem;
}

.lc-about-body a {
  color: var(--lc-link-hover);
}

.lc-about-note {
  margin: 12px 0 0;
  color: var(--lc-text-muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Only for screen readers (the logo already shows the name) */
.lc-about-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Image upload with preview: background of the login page (js/admin/settings.js "<image>"), background image of rooms
   (tpl/admin/rooms.tpl, "Create a room" in tpl/room_selection.tpl) */
.lc-setting-image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.lc-setting-image-preview {
  max-width: 320px;
  max-height: 180px;
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  object-fit: cover;
}

.lc-setting-image-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lc-setting-image-upload {
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 2px;
  padding: 0 14px;
  background: var(--lc-button-bg);
  color: var(--lc-button-text);
  border: 1px solid var(--lc-button-bg);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
}

.lc-setting-image-upload:hover {
  background: var(--lc-button-hover-bg);
  border-color: var(--lc-button-hover-bg);
}

.lc-setting-image-upload:focus-within {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

/* The file input stays reachable with the keyboard, but is not shown */
.lc-setting-image-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lc-setting-image .lc-setting-hint {
  display: block;
  color: var(--lc-text-muted);
  font-size: 0.78rem;
  font-weight: normal;
}

/* ------------------------------------------------------------------ Login page and room selection: shared parts */

/* Logo above the card (tpl/login.tpl, tpl/room_selection.tpl) */
.login-logo {
  display: flex;
  justify-content: center;
  margin: 24px 0 20px;
}

.login-logo img {
  max-width: 60vw;
  height: auto;
}

/* Light/dark design at the top right of the card */
.lc-theme-toggle.card-theme-toggle {
  position: absolute;
  top: 16px;
  right: 18px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 5px 11px;
  background-color: var(--lc-surface-2);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-radius: 15px;
  text-transform: none;
  font-weight: normal;
  font-size: 0.6rem;
}

.lc-theme-toggle.card-theme-toggle:hover {
  background-color: var(--lc-hover);
  border-color: var(--lc-accent);
  color: var(--lc-text);
}

/* The title stays clear of the toggle */
.login-form .title-container,
.register-form .title-container,
.reset-form .title-container,
.rs-card .title-container {
  padding-right: 90px;
}

/* Footer bar: legal pages, copyright */
.footer {
  display: flex;
  align-items: center;
  padding: 5px 0;
  background-color: var(--lc-accent);
  border-top: 1px solid var(--lc-border);
}

.footer-left {
  flex: auto;
  margin-left: 20px;
  text-align: left;
  font-size: 0.7rem;
}

.footer-right {
  flex: auto;
  margin-right: 20px;
  text-align: right;
  font-size: 0.7rem;
}

.footer-text,
.footer-text:hover {
  color: var(--lc-accent-text);
  font-size: 0.7rem;
}

.footer-text:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ Room selection (tpl/room_selection.tpl), like the login page */

.rs-main {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px 24px;
  font-size: 1rem;
  color: var(--lc-text);
}

/* Card like .login-form (css/testLogin.css) */
.rs-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 40px;
  background-color: var(--lc-surface);
  border: 1px solid var(--lc-border);
  border-top: 4px solid var(--lc-accent);
  border-radius: 20px;
  box-shadow: 0 0 10px var(--lc-shadow);
}

.rs-card .title-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.rs-title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.rs-subtitle {
  margin: 0;
  color: var(--lc-text-muted);
  font-size: 0.6rem;
  font-weight: normal;
}

.rs-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 55vh;
  overflow: auto;
}

/* Category: name, counters, "Create a room" */
.rs-category-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.rs-category-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.rs-category-name {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.rs-category-count,
.rs-category-desc,
.rs-empty {
  color: var(--lc-text-muted);
  font-size: 0.6rem;
}

.rs-category-desc {
  margin: -2px 0 6px;
}

.rs-empty {
  margin: 0;
}

/* Buttons like the login buttons (css/testLogin.css "button", ".guest-button") */
.rs-new-room,
.rs-secondary,
.rs-primary,
.rs-enter,
.rs-logout {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  background-color: var(--lc-surface-2);
  color: var(--lc-text);
  border: 2px solid var(--lc-accent);
  border-radius: 15px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.rs-new-room:hover,
.rs-secondary:hover,
.rs-primary:hover,
.rs-enter:hover,
.rs-logout:hover {
  background-color: var(--lc-accent);
  color: var(--lc-accent-text);
}

.rs-new-room {
  height: 30px;
  padding: 0 12px;
  font-size: 0.55rem;
}

.rs-new-room:focus-visible,
.rs-secondary:focus-visible,
.rs-primary:focus-visible,
.rs-enter:focus-visible,
.rs-logout:focus-visible,
.rs-room-toggle:focus-visible,
.rs-room-main:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

/* Icons (js/room_structure.js RoomSelectionIcons) */
.rs-new-room svg,
.rs-room-icon svg,
.rs-room-users svg,
.rs-room-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Rooms */
.rs-rooms,
.rs-users {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rs-room {
  margin: 6px 0;
  background-color: var(--lc-surface-2);
  border: 2px solid transparent;
  border-radius: 15px;
  overflow: hidden;
}

.rs-room-active {
  border-color: var(--lc-accent);
}

.rs-room-row {
  display: flex;
  align-items: stretch;
}

.rs-room-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
}

.rs-room-main:hover {
  background-color: var(--lc-hover);
}

.rs-room-icon {
  display: inline-flex;
  color: var(--lc-text-muted);
}

.rs-room-icon.rs-room-locked,
.rs-room-active .rs-room-icon {
  color: var(--lc-accent);
}

.rs-room-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.rs-room-name {
  font-size: 0.75rem;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rs-room-desc {
  color: var(--lc-text-muted);
  font-size: 0.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rs-room-users {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lc-text-muted);
  font-size: 0.65rem;
  white-space: nowrap;
}

.rs-room-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 0;
  background: transparent;
  color: var(--lc-text-muted);
  border: 0;
  border-left: 1px solid var(--lc-border);
  cursor: pointer;
}

.rs-room-toggle:hover {
  background-color: var(--lc-hover);
  color: var(--lc-text);
}

.rs-room-toggle svg {
  transition: transform 0.15s ease;
}

.rs-room-toggle-open svg {
  transform: rotate(180deg);
}

.rs-users {
  padding: 4px 14px 10px 42px;
  border-top: 1px solid var(--lc-border);
  font-size: 0.65rem;
}

.rs-user {
  padding: 3px 0;
}

/* Enter, log out (stacked like the login buttons), stealth mode */
.rs-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.rs-actions .rs-enter,
.rs-actions .rs-logout {
  width: 100%;
}

.rs-stealth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
}

/* "Create a room" (js/create_user_room.js), card like the login */
.rs-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 1rem;
}

.rs-modal-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--lc-overlay);
}

.rs-modal-box {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  padding: 30px 40px;
  overflow: auto;
  background-color: var(--lc-surface);
  border: 1px solid var(--lc-border);
  border-top: 4px solid var(--lc-accent);
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--lc-shadow);
}

.rs-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rs-modal-title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.rs-modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: var(--lc-text-muted);
  border: 0;
  border-radius: 15px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.rs-modal-close:hover {
  background-color: var(--lc-hover);
  color: var(--lc-text);
}

.rs-modal-sub {
  margin: -10px 0 0;
  color: var(--lc-text-muted);
  font-size: 0.6rem;
}

.rs-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: default;
}

.rs-field-label {
  font-size: 0.7rem;
  font-weight: bold;
}

/* Fields like the login fields: line below, frame when focused */
.rs-field input[type="text"],
.rs-field input[type="password"],
.rs-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 35px;
  padding: 6px 8px;
  background: transparent;
  color: var(--lc-input-text);
  border: none;
  border-bottom: 2px solid var(--lc-accent);
  border-radius: 0;
  font-family: inherit;
  font-size: 0.7rem;
  outline: none;
}

.rs-field input:focus,
.rs-field textarea:focus {
  border: 2px solid var(--lc-accent);
  border-radius: 15px;
}

.rs-field textarea {
  resize: vertical;
}

.rs-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: bold;
}

.rs-check input {
  accent-color: var(--lc-accent);
}

.rs-password-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rs-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.rs-modal-actions .rs-primary {
  flex: 1;
}

/* Upload button in the modal like the other buttons */
.rs-modal .lc-setting-image-upload {
  height: 34px;
  background-color: var(--lc-surface-2);
  color: var(--lc-text);
  border: 2px solid var(--lc-accent);
  border-radius: 15px;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.rs-modal .lc-setting-image-upload:hover {
  background-color: var(--lc-accent);
  border-color: var(--lc-accent);
  color: var(--lc-accent-text);
}

.rs-modal .lc-setting-image-buttons .rs-secondary {
  height: 34px;
  font-size: 0.6rem;
}

.rs-modal .lc-setting-image .lc-setting-hint {
  font-size: 0.55rem;
}

@media (max-width: 768px) {
  .rs-card,
  .rs-modal-box {
    padding: 24px 20px;
  }

  .rs-users {
    padding-left: 14px;
  }

  /* No scroll area inside the scrolling page: the list grows, the page scrolls */
  .rs-list {
    max-height: none;
    overflow: visible;
  }

  .rs-main {
    padding: 0 12px 20px;
  }

  .login-logo {
    margin: 16px 0 14px;
  }
}

/* Footer of the login page and the room selection on phones: links above, copyright below */
@media (max-width: 560px) {
  .footer {
    flex-direction: column;
    gap: 2px;
    padding: 6px 12px;
  }

  .footer-left,
  .footer-right {
    margin: 0;
    text-align: center;
  }
}

/* ------------------------------------------------------------------ Player (js/player.js, admin.php?ainc=player) */

/* Desktop: floating window above the messages, below the menus (z-index 10) and dialogs */
.lc-player {
  position: fixed;
  z-index: 9;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 16px);
  background: var(--lc-surface);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-radius: 10px;
  box-shadow: 0 10px 30px var(--lc-shadow);
  overflow: hidden;
}

.lc-player[hidden] {
  display: none;
}

.lc-player-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 4px 0 10px;
  background: var(--lc-surface-2);
  border-bottom: 2px solid var(--lc-accent);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.lc-player-head:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: -2px;
}

.lc-player-icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--lc-accent);
}

.lc-player-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lc-player-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--lc-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.lc-player-btn:hover {
  background: var(--lc-hover);
}

.lc-player-btn:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: -2px;
}

.lc-player-btn .lc-icon {
  width: 16px;
  height: 16px;
}

/* The iframe keeps its own size and is scaled down into this box when the space is smaller */
.lc-player-frame {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.lc-player-frame iframe {
  display: block;
  border: 0;
  transform-origin: 0 0;
}

/* Minimized: only the title bar; the iframe stays loaded (keeps playing) */
.lc-player.is-minimized .lc-player-body {
  height: 0;
  padding: 0;
  overflow: hidden;
}

.lc-player.is-minimized .lc-player-head {
  border-bottom-width: 0;
}

.lc-player.is-dragging {
  opacity: 0.9;
}

/* While moving, the iframe must not take the pointer */
.lc-player.is-dragging iframe {
  pointer-events: none;
}

/* Toolbar button while the player is open */
.lc-tool-btn.is-active {
  background-color: var(--lc-button-bg);
  color: var(--lc-button-text);
}

/* Phones and small tablets: bar over the full width at the top of the chat */
@media (max-width: 768px) {
  .lc-player {
    top: 0;
    left: 0;
    right: 0;
    max-width: none;
    border-width: 0 0 1px;
    border-radius: 0 0 10px 10px;
  }

  .lc-player-head {
    min-height: 40px;
    cursor: default;
  }

  .lc-player-btn {
    width: 36px;
    height: 36px;
  }

  .lc-player-body {
    padding: 8px 0;
  }
}

/* ------------------------------------------------------------------ PM window (tpl/pm_box.tpl, js/pm_box.js)
   Same toolbar and input as the chat room; head with the partner, notice if he does not accept private messages. */
.lc-pm-box {
  /* Fills the window (the wrapper #body_contents of tpl/main.tpl has no height) */
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--lc-surface);
}

.lc-pm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 10px;
  background: var(--lc-surface-2);
  border-bottom: 1px solid var(--lc-border);
}

.lc-pm-partner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 4px;
  background: transparent;
  color: var(--lc-text);
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.lc-pm-partner:hover {
  background: var(--lc-hover);
}

.lc-pm-partner:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

.lc-pm-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--lc-hover);
}

.lc-pm-partner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lc-pm-nickname {
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lc-pm-subtitle {
  font-size: 0.65rem;
  color: var(--lc-text-muted);
}

.lc-pm-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px;
  background: var(--lc-surface-2);
  color: var(--lc-error);
  border-bottom: 1px solid var(--lc-border);
  font-size: 0.75rem;
}

.lc-pm-notice[hidden] {
  display: none;
}

/* One reply possible / own setting: information, not an error */
.lc-pm-notice[data-state="reply"],
.lc-pm-notice-info {
  color: var(--lc-text);
}

.lc-pm-notice[data-state="reply"] .lc-icon,
.lc-pm-notice-info .lc-icon {
  color: var(--lc-accent);
}

/* Chat room: "Neue Privatnachricht von …" (js/chat_room.js showPMToast()) */
.lc-pm-toasts {
  position: fixed;
  right: 16px;
  bottom: 120px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.lc-pm-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--lc-surface-2);
  color: var(--lc-text);
  border: 1px solid var(--lc-accent);
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--lc-shadow);
  font-family: inherit;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  animation: lc-pm-toast-in 0.2s ease-out;
}

.lc-pm-toast:hover {
  background: var(--lc-hover);
}

.lc-pm-toast:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

.lc-pm-toast .lc-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--lc-accent);
}

@keyframes lc-pm-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-pm-toast {
    animation: none;
  }
}

@media (max-width: 480px) {
  .lc-pm-toasts {
    right: 8px;
    left: 8px;
    bottom: 110px;
    align-items: stretch;
  }
}

.lc-pm-notice .lc-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.lc-pm-box #chatroom_messages {
  flex: 1 1 auto;
  min-height: 0;
}

.lc-pm-box #chatroom_messages_contents {
  font-size: 0.8rem;
}

/* "Privatnachrichten werden nach 24 Stunden automatisch gelöscht." above the history */
.lc-pm-retention {
  margin: 4px 0 8px;
  color: var(--lc-text-muted);
  font-size: 0.65rem;
  text-align: center;
}

.lc-pm-box #chatroom_controls_contents {
  padding: 0 8px 8px;
}

.lc-pm-box .lc-toolbar .lc-toolbar-group {
  width: auto;
}

.lc-pm-box #main_input_textarea {
  min-height: 44px;
  max-height: 120px;
}

.lc-pm-box #main_input_textarea:disabled,
.lc-pm-box #mainSendMessageButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Auto-scroll on/off: on = accent color */
.lc-pm-box #scroll_ctl_btn.is-on {
  color: var(--lc-accent);
}

@media (max-width: 480px) {
  .lc-pm-head {
    padding: 6px 8px;
  }

  .lc-pm-box .lc-tool-btn {
    width: 36px;
    height: 36px;
  }
}

/* ------------------------------------------------------------------ LexyCast player (js/lexycast.js) in the player window */
.lc-player[data-kind="lexycast"] .lc-player-frame {
  overflow: hidden;
}

.lc-lexycast {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* As high as the content, at most the height of the window (max-height of .lc-player-frame, js/player.js) */
  box-sizing: border-box;
  max-height: inherit;
  padding: 10px;
  overflow: hidden;
  font-size: 0.8rem;
}

.lc-lc-now {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-lc-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px;
  height: 64px;
  overflow: hidden;
  background: var(--lc-surface-2);
  color: var(--lc-text-muted);
  border-radius: 8px;
}

.lc-lc-cover img,
.lc-lc-dj img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Picture of the moderator or the AutoDJ, left of the info (same size and shape as the cover) */
.lc-lc-dj {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px;
  height: 64px;
  overflow: hidden;
  background: var(--lc-surface-2);
  color: var(--lc-text-muted);
  /* Square like the cover */
  border-radius: 8px;
}

.lc-lc-dj .lc-icon {
  width: 26px;
  height: 26px;
}

.lc-lc-cover .lc-icon {
  width: 28px;
  height: 28px;
}

.lc-lc-meta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Info as ticker: moves only if it does not fit (js/lexycast.js setTicker()) */
.lc-lc-ticker {
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.lc-lc-ticker-track {
  display: inline-flex;
}

.lc-lc-ticker-text {
  flex: none;
}

.lc-lc-ticker.is-moving .lc-lc-ticker-text {
  padding-right: 48px;
}

.lc-lc-ticker.is-moving .lc-lc-ticker-track {
  animation: lc-lc-ticker var(--lc-ticker-duration, 12s) linear infinite;
}

.lc-lc-ticker:hover .lc-lc-ticker-track {
  animation-play-state: paused;
}

@keyframes lc-lc-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .lc-lc-ticker.is-moving .lc-lc-ticker-track {
    animation: none;
  }

  .lc-lc-ticker {
    text-overflow: ellipsis;
  }
}

/* Ticker in the title bar of the window */
.lc-player-title .lc-lc-head-ticker {
  display: block;
  font-size: inherit;
  font-weight: inherit;
}

/* Only for screen readers */
.lc-lc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lc-lc-badge {
  align-self: flex-start;
  padding: 1px 8px;
  background: var(--lc-surface-2);
  color: var(--lc-text-muted);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
}

.lc-lc-badge.is-live {
  background: var(--lc-error);
  color: #fff;
}


.lc-lc-controls,
.lc-lc-votes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-lc-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--lc-button-bg);
  color: var(--lc-button-text);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.lc-lc-play:hover {
  background: var(--lc-button-hover-bg);
}

.lc-lc-play:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lc-lc-volume {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--lc-text-muted);
}

.lc-lc-volume input {
  flex: 1 1 auto;
  min-width: 60px;
  accent-color: var(--lc-accent);
}

.lc-lc-channel {
  max-width: 120px;
  padding: 4px;
  background: var(--lc-input-bg);
  color: var(--lc-input-text);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  font-size: 0.7rem;
}

.lc-lc-listeners {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  color: var(--lc-text-muted);
}

.lc-lexycast .lc-icon {
  width: 16px;
  height: 16px;
}

.lc-lc-play .lc-icon {
  width: 18px;
  height: 18px;
}

.lc-lc-vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--lc-surface-2);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-radius: 999px;
  cursor: pointer;
}

.lc-lc-vote:hover:not(:disabled) {
  border-color: var(--lc-accent);
}

/* Playlist files (ASX, M3U, PLS, RAM) after the vote buttons */
.lc-lc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.lc-lc-link {
  padding: 3px 7px;
  background: var(--lc-surface-2);
  color: var(--lc-text);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
}

.lc-lc-link:hover {
  border-color: var(--lc-accent);
  color: var(--lc-accent);
}

.lc-lc-link:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

.lc-lc-vote:disabled {
  cursor: default;
  opacity: 0.6;
}

.lc-lc-vote.is-chosen {
  opacity: 1;
  border-color: var(--lc-accent);
  color: var(--lc-accent);
}

.lc-lc-notice {
  margin: 0;
  padding: 6px 8px;
  background: var(--lc-surface-2);
  border-left: 3px solid var(--lc-accent);
  border-radius: 4px;
}

.lc-lc-notice[hidden],
.lc-lexycast [hidden] {
  display: none !important;
}

.lc-lc-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--lc-border);
}

.lc-lc-tab {
  flex: 1 1 0;
  padding: 6px 4px;
  background: transparent;
  color: var(--lc-text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* "Sendeplan": opens a page, looks like the tabs */
.lc-lc-tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  text-decoration: none;
}

.lc-lc-tab-link:hover {
  color: var(--lc-text);
}

.lc-lc-tab-link .lc-icon {
  width: 12px;
  height: 12px;
}

.lc-lc-tab[aria-selected="true"] {
  color: var(--lc-text);
  border-bottom-color: var(--lc-accent);
}

.lc-lc-play:focus-visible,
.lc-lc-vote:focus-visible,
.lc-lc-tab:focus-visible,
.lc-lc-wish:focus-visible,
.lc-lc-page:focus-visible {
  outline: 2px solid var(--lc-accent);
  outline-offset: 2px;
}

.lc-lc-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.lc-lc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lc-lc-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 5px 2px;
  border-bottom: 1px solid var(--lc-border);
}

.lc-lc-time {
  flex: none;
  color: var(--lc-text-muted);
  font-variant-numeric: tabular-nums;
}

.lc-lc-text {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lc-lc-empty,
.lc-lc-hint {
  margin: 6px 0;
  padding: 0;
  color: var(--lc-text-muted);
  list-style: none;
}

.lc-lc-search {
  box-sizing: border-box;
  width: 100%;
  padding: 6px 8px;
  background: var(--lc-input-bg);
  color: var(--lc-input-text);
  border: 1px solid var(--lc-border);
  border-radius: 6px;
  font: inherit;
}

.lc-lc-wish,
.lc-lc-page {
  padding: 3px 10px;
  background: var(--lc-button-bg);
  color: var(--lc-button-text);
  border: none;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.lc-lc-wish:disabled,
.lc-lc-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lc-lc-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
}

.lc-lc-page-info {
  color: var(--lc-text-muted);
}

.lc-lc-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--lc-link);
}

.lc-lc-external:hover {
  color: var(--lc-link-hover);
}

@media (prefers-reduced-motion: reduce) {
  .lc-lc-vote,
  .lc-lc-play {
    transition: none;
  }
}
