/* ===== Nickliste (rechte Seite) – komplettes Redesign ===== */

/* Right-Frame als Host fuer die Nickliste vorbereiten
   (Klasse wird von userlist.js gesetzt, damit kein :has() noetig ist) */
.right_frame.user-list-ready {
  padding: 0;
  overflow: hidden;
}

.user-list-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #ffffff;
  font-size: 0.9rem;
  color: #212529;
}

/* ---------- Raum-Header ---------- */
.user-list-room-info {
  padding: 0.7rem 0.85rem 0.6rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #eef1f5 100%);
  border-bottom: 1px solid #dee2e6;
  flex: 0 0 auto;
}

.user-list-room-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
}

.user-list-status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: 0 0 auto;
}

.user-list-status-dot.open {
  background: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.user-list-status-dot.locked {
  background: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.user-list-status-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}

.user-list-status-label.open { color: #28a745; }
.user-list-status-label.locked { color: #dc3545; }

.user-list-topic {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-style: italic;
  color: #495057;
  line-height: 1.3;
  word-break: break-word;
}

/* ---------- Suchfeld ---------- */
.user-list-search {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #dee2e6;
  background: #fafbfc;
  flex: 0 0 auto;
  position: relative;
}

.user-list-search input {
  width: 100%;
  border: 1px solid #ced4da;
  border-radius: 0.4rem;
  padding: 0.35rem 0.55rem 0.35rem 1.85rem;
  font-size: 0.85rem;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.user-list-search input:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.15);
}

.user-list-search::before {
  content: "\1F50D";
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
  pointer-events: none;
}

.user-list-search .clear-btn {
  position: absolute;
  right: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  display: none;
  line-height: 1;
}

.user-list-search.has-value .clear-btn {
  display: block;
}

/* ---------- Scroll-Container ---------- */
.user-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.3rem 0 0.5rem;
}

.user-list-scroll::-webkit-scrollbar {
  width: 6px;
}
.user-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
.user-list-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ---------- Gruppen ---------- */
.user-list-group {
  margin-bottom: 0.35rem;
}

.user-list-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.32rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #495057;
  background: #f1f3f5;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s;
}

.user-list-group-header:hover {
  background: #e6e9ec;
}

.user-list-group-header .group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.user-list-group-header .caret {
  display: inline-block;
  transition: transform 0.18s;
  font-size: 0.65rem;
  color: #6c757d;
}

.user-list-group.collapsed .caret {
  transform: rotate(-90deg);
}

.user-list-group.collapsed .user-list-group-body {
  display: none;
}

.user-list-group-count {
  background: #ffffff;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: 0.6rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.4rem;
  text-align: center;
}

.user-list-group-count.zero {
  opacity: 0.4;
}

.user-list-group-body {
  padding: 0.15rem 0;
}

/* ---------- Nick-Eintrag ---------- */
.user-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.55rem 0.32rem 0.85rem;
  position: relative;
  transition: background-color 0.15s, opacity 0.3s, transform 0.3s;
  border-left: 3px solid transparent;
}

.user-list-item:hover {
  background: #f1f5fa;
  border-left-color: #0a58ca;
}

.user-list-item.gag {
  opacity: 0.55;
}

.user-list-item.gag .user-list-nick-text {
  text-decoration: line-through;
}

.user-list-item.away .user-list-nick-text {
  font-style: italic;
}

.user-list-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  font-size: 0.85rem;
  border-radius: 0.3rem;
  background: #eef1f5;
  color: #495057;
  font-weight: 700;
}

.user-list-symbol.admin { background: #fff3cd; color: #856404; }
.user-list-symbol.mod   { background: #cce5ff; color: #004085; }
.user-list-symbol.registered { background: #d1ecf1; color: #0c5460; }
.user-list-symbol.guest  { background: #f0f0f0; color: #6c757d; }

.user-list-nick {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  overflow: hidden;
}

.user-list-nick-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.user-list-nick.away .user-list-nick-text {
  opacity: 0.75;
}

.user-list-birthday {
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.user-list-toggle {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  color: #6c757d;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: all 0.15s;
}

.user-list-toggle:hover,
.user-list-toggle.active {
  background: #0a58ca;
  border-color: #0a58ca;
  color: #fff;
}

/* ---------- Dropdown ---------- */
.user-list-dropdown {
  position: absolute;
  right: 0.4rem;
  top: 100%;
  margin-top: 0.15rem;
  min-width: 230px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  padding: 0.3rem 0;
  z-index: 1050;
  display: none;
  font-size: 0.85rem;
  overflow: hidden;
}

.user-list-dropdown.open {
  display: block;
  animation: userListDropdownIn 0.15s ease;
}

@keyframes userListDropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-list-dropdown.flip-up {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 0.15rem;
}

.user-list-dropdown-header {
  padding: 0.45rem 0.8rem;
  font-weight: 600;
  color: #212529;
  border-bottom: 1px solid #eef0f3;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  word-break: break-all;
  background: #f8f9fa;
}

.user-list-dropdown-header .name {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-list-dropdown-header .badge {
  font-size: 0.62rem;
  padding: 0.12rem 0.4rem;
  background: #6c757d;
  color: #fff;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  flex: 0 0 auto;
}

.user-list-dropdown-header .badge.admin { background: #ffc107; color: #212529; }
.user-list-dropdown-header .badge.mod   { background: #0a58ca; }
.user-list-dropdown-header .badge.guest { background: #adb5bd; }

.user-list-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.85rem;
  text-decoration: none;
  color: #212529;
  transition: background-color 0.1s, color 0.1s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
}

.user-list-dropdown a:hover {
  background: #e7eef8;
  color: #0a58ca;
  text-decoration: none;
}

.user-list-dropdown a.danger:hover {
  background: #f8d7da;
  color: #842029;
}

.user-list-dropdown a .icon {
  width: 1.1rem;
  text-align: center;
  font-size: 0.95rem;
  flex: 0 0 1.1rem;
}

.user-list-dropdown .divider {
  height: 1px;
  background: #eef0f3;
  margin: 0.3rem 0;
}

.user-list-dropdown .group-label {
  padding: 0.3rem 0.85rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  background: #f8f9fa;
}

/* ---------- Counter ---------- */
.user-list-counter {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  color: #6c757d;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
  font-weight: 500;
}

/* ---------- Leerer Zustand ---------- */
.user-list-empty {
  text-align: center;
  padding: 1.8rem 0.5rem;
  color: #6c757d;
  font-size: 0.85rem;
  font-style: italic;
}

.user-list-empty .emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.4rem;
  opacity: 0.5;
}

/* ---------- Animationen fuer add/remove ---------- */
@keyframes userListFadeIn {
  0%   { opacity: 0; transform: translateX(10px); background-color: #fff3cd; }
  60%  { opacity: 1; transform: translateX(0); background-color: #fff8e1; }
  100% { opacity: 1; transform: translateX(0); background-color: transparent; }
}

.user-list-item.entering {
  animation: userListFadeIn 0.55s ease;
}

@keyframes userListFadeOut {
  from { opacity: 1; transform: translateX(0); max-height: 60px; }
  to   { opacity: 0; transform: translateX(10px); max-height: 0; padding-top: 0; padding-bottom: 0; }
}

.user-list-item.leaving {
  animation: userListFadeOut 0.3s ease forwards;
  pointer-events: none;
  overflow: hidden;
}

/* Highlight nach Aenderung */
.user-list-item.flash {
  animation: userListFlash 0.6s ease;
}

@keyframes userListFlash {
  0%   { background-color: #cfe2ff; }
  100% { background-color: transparent; }
}

/* responsive Anpassungen */
@media (max-width: 575.98px) {
  .user-list-dropdown {
    position: fixed;
    right: 0.5rem;
    left: 0.5rem;
    min-width: 0;
    max-width: none;
  }
  .user-list-room-info { padding: 0.55rem 0.7rem 0.5rem; }
  .user-list-search    { padding: 0.4rem 0.55rem; }
}

/* ---------- Unread-Messages-Box im Chat-Frame ---------- */
.chat-frame-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: #495057;
  background: linear-gradient(180deg, #f8f9fa 0%, #eef1f5 100%);
  border-bottom: 1px solid #dee2e6;
  flex: 0 0 auto;
  font-weight: 500;
  transition: background-color 0.25s, color 0.25s;
}

.chat-frame-info.has-unread {
  background: linear-gradient(180deg, #fff3cd 0%, #ffe69c 100%);
  color: #664d03;
  border-bottom-color: #ffe69c;
}

.chat-frame-info.zero {
  color: #6c757d;
  font-weight: 400;
  font-style: italic;
}

.chat-frame-info-icon {
  font-size: 1rem;
  flex: 0 0 auto;
}

.chat-frame-info-text {
  flex: 1 1 auto;
}

.chat-frame-info-link {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

.chat-frame-info.has-unread .chat-frame-info-link {
  color: #b02a37;
  animation: unreadPulse 1.6s ease-in-out infinite;
}

.chat-frame-info-link:hover {
  text-decoration: none;
}

@keyframes unreadPulse {
  0%   { text-shadow: 0 0 0 rgba(176, 42, 55, 0); }
  50%  { text-shadow: 0 0 6px rgba(176, 42, 55, 0.5); }
  100% { text-shadow: 0 0 0 rgba(176, 42, 55, 0); }
}

/* ---------- Nachrichten im Chat-Fenster ---------- */
.chat-messages-box {
  margin: 0.5rem 0;
  border: 1px solid #ffc107;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #fffdf5;
}

.chat-messages-box-header {
  padding: 0.4rem 0.7rem;
  font-weight: 700;
  color: #664d03;
  background: #ffe69c;
  border-bottom: 1px solid #ffc107;
}

.chat-messages-box-body table {
  width: 100%;
  border: none !important;
  margin: 0;
}

.chat-messages-box-body td {
  border: none !important;
  padding: 0.3rem 0.7rem;
}

/* ---------- Modernes Forum ---------- */
.forum-board-card,
.forum-thread-card,
.forum-category-card,
.forum-form-card,
.forum-reply-card {
  border: 1px solid #dee2e6;
  border-radius: 0.6rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}

.forum-board-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.forum-board-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #007bff, #0056b3);
  font-size: 1.25rem;
}

.forum-board-card .card-title a {
  color: #1f2937;
  font-weight: 600;
}

.forum-board-card .card-title a:hover {
  color: #007bff;
}

.forum-board-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.forum-category-card > .card-header {
  border-radius: 0.55rem 0.55rem 0 0;
  background: linear-gradient(135deg, #343a40, #212529) !important;
}

.forum-category-description {
  background: #f8f9fa;
}

.forum-thread-card .card-header {
  border-bottom: 1px solid #e9ecef;
}

.forum-thread-content {
  min-height: 5rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.forum-thread-content img {
  max-width: 100%;
  height: auto;
}

.forum-thread-signature {
  color: #6c757d;
  font-size: 0.85rem;
  border-top: 1px dashed #dee2e6;
}

.forum-thread-signature:empty {
  display: none;
}

.forum-thread-actions {
  gap: 0.2rem;
}

.forum-thread-actions:empty {
  display: none;
}

.forum-form-card .card-header,
.forum-reply-card .card-header {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.forum-form-card textarea,
.forum-reply-card textarea {
  resize: vertical;
  min-height: 10rem;
}

.pagination .page-link {
  min-width: 2.4rem;
  text-align: center;
  border-radius: 0.3rem;
  margin: 0 0.12rem;
}

@media (max-width: 575.98px) {
  .forum-board-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .forum-board-card .row > .col-auto:last-child {
    display: none;
  }

  .forum-thread-actions {
    width: 100%;
    margin-top: 0.75rem;
  }

  .forum-board-stats {
    gap: 0.65rem;
  }
}

/* ---------- Zusätzliche Forum-Verbesserungen ---------- */
.forum-category-card > .card-header {
  background: linear-gradient(135deg, #495057, #343a40) !important;
  border-bottom: none;
  color: #fff !important;
}

.forum-category-card > .card-header h3,
.forum-category-card > .card-header h3 i,
.forum-category-card > .card-header .h5,
.forum-category-card > .card-header .h5 i {
  color: #fff !important;
}

.forum-category-description {
  background: #f8f9fa;
  color: #343a40 !important;
  font-weight: 500;
  font-size: 0.95rem;
}

.forum-category-card .card-footer {
  border-radius: 0 0 0.55rem 0.55rem;
}

.forum-board-actions .btn {
  margin-left: 0.15rem;
}

.pagination {
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0;
}

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  border-radius: 0.4rem;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  box-shadow: 0 2px 5px rgba(13, 110, 253, 0.3);
}

.pagination .page-item.disabled .page-link {
  color: #adb5bd;
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

.pagination .page-link:hover:not(:disabled) {
  background-color: #e9ecef;
  border-color: #dee2e6;
  color: #0a58ca;
}

.forum-thread-card .forum-thread-actions {
  flex-wrap: wrap;
}

.forum-thread-card .forum-thread-actions .btn {
  margin: 0.1rem;
}

.alert h4.alert-heading {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}



