/* ================================ */
/*        TCHAT FULLSCREEN          */
/* ================================ */

.tchat-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    /*padding: 20px;*/
}

.tchat-header {
    margin-bottom: 20px;
}

.tchat-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tchat-subtitle {
    font-size: 15px;
    color: #666;
}

.tchat-room-tabs {
    margin-top: 15px;
    display: flex;
    gap: 12px;
}

.tchat-room-tab {
    padding: 7px 14px;
    border-radius: 7px;
    background: #f2f2f7;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.tchat-room-tab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ================================ */
/* CHAT BOX / FULLSCREEN ADAPTATION */
/* ================================ */

.tchat-box {
    background: white;
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    height: calc(90vh - 220px);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.wos-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar propre */
.wos-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.wos-chat-messages::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

/* ================================ */
/* MESSAGE                          */
/* ================================ */

.wo-chat-message {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer; /* pour montrer qu'on peut cliquer pour les réactions */
}

.wo-chat-headerline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wo-chat-headerleft {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.wo-chat-author {
    /* font-weight: 600; */
    cursor: pointer;
}

.wo-chat-time {
    font-size: 12px;
    color: #666;
}

.wo-chat-report {
    background: none;
    border: none;
    color: red;
    font-size: 12px;
    cursor: pointer;
}

/* Mentions */
.chat-mention { color: #007bff; font-weight: 600; }
.chat-mention-me { color: #ff3860; font-weight: 700; }

/* ================================ */
/* INPUT ZONE                        */
/* ================================ */

.tchat-input-row {
    display: flex;
    margin-top: 10px;
    gap: 10px;
}

.tchat-input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.tchat-send-btn {
    padding: 12px 18px;
    background: #007bff;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.tchat-send-btn:hover {
    background: #006de0;
}

.tchat-hint {
    margin-top: 7px;
    font-size: 13px;
    color: #666;
}

/* ================================ */
/* RESPONSIVE                       */
/* ================================ */

@media (max-width: 900px) {
    .tchat-box {
        height: calc(100vh - 260px);
    }
}

@media (max-width: 600px) {
    .tchat-input-row {
        flex-direction: column;
    }

    .tchat-send-btn {
        width: 100%;
    }
}

.wos-chat-info-notlogged {
    font-size: 14px;
    color: #666;
    margin-top: 6px;
    margin-bottom: 10px;
}

/* ===================================================== */
/*   RÉACTIONS SOUS LES MESSAGES                         */
/* ===================================================== */

.wo-chat-reactions {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.wo-chat-reaction-bubble {
    border: none;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    background: #f2f2f7;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wo-chat-reaction-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    background: #e6e6f0;
}

.wo-chat-reaction-bubble--me {
    background: #007bff;
    color: #fff;
}

/* ===================================================== */
/*   POPUP DE SÉLECTION D'ÉMOJIS (RÉACTIONS)             */
/* ===================================================== */

.wo-reaction-picker {
    position: absolute;
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    max-width: 260px;
}

.wo-reaction-picker__emoji {
    border: none;
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 18px;
    background: #f5f5fa;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
    min-width: 32px;
    text-align: center;
}

.wo-reaction-picker__emoji:hover {
    transform: translateY(-1px) scale(1.05);
    background: #e5e6ff;
}

.wo-reaction-picker__emoji--locked {
    opacity: 0.35;
    cursor: default;
}

.wo-reaction-picker__emoji--shake {
    animation: wo-shake 0.25s linear 1;
}

@keyframes wo-shake {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-2px); }
    50%  { transform: translateX(2px); }
    75%  { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* Sur mobile : le picker occupe toute la largeur */
@media (max-width: 600px) {
    .wo-reaction-picker {
        left: 8px !important;
        right: 8px;
        max-width: none;
        justify-content: center;
    }
}

/* ===================================================== */
/* MINI TCHAT : VERSION COMPACTE POUR LA PAGE INDEX      */
/* ===================================================== */

.mini-tchat-box {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 12px 15px !important;
}

/* La liste des messages doit scroller mais sans prendre 90% de l’écran */
.mini-tchat-box .wos-chat-messages {
    max-height: 350px !important;  /* hauteur idéale (comme ton screen) */
    min-height: 120px;
    overflow-y: auto !important;
}

/* Le champ d’écriture reste normal */
.mini-tchat-box .wos-chat-input-zone {
    margin-top: 10px;
}

/* ===================================================== */
/*        THEME NUIT – PREFERS-COLOR-SCHEME: DARK        */
/* ===================================================== */

@media (prefers-color-scheme: dark) {

    .tchat-title {
        color: #f5f5f5;
    }

    .tchat-subtitle,
    .tchat-hint,
    .wos-chat-info-notlogged,
    .wo-chat-time {
        color: #aaaaaa;
    }

    .tchat-room-tab {
        background: #1f1f24;
        border-color: #333333;
        color: #dddddd;
    }

    .tchat-room-tab:hover {
        background: #262630;
    }

    .tchat-room-tab.active {
        background: #007bff;
        color: #ffffff;
        border-color: #007bff;
    }

    .tchat-box {
        background: #141418;
        box-shadow: 0 4px 16px rgba(0,0,0,0.40);
        border: 1px solid #222222;
    }

    .wos-chat-messages::-webkit-scrollbar-thumb {
        background: #555555;
    }

    .wo-chat-message {
        border-bottom-color: #2a2a2f;
    }

    .wo-chat-author {
        color: #ffffff;
    }

    .wo-chat-report {
        color: #ff6565;
    }

    .chat-mention {
        color: #4da3ff;
    }

    .chat-mention-me {
        color: #ff5085;
    }

    .tchat-input {
        background: #0e0e11;
        border-color: #333333;
        color: #dddddd;
    }

    .tchat-input::placeholder {
        color: #666666;
    }

    .tchat-send-btn {
        background: #007bff;
        color: #ffffff;
    }

    .tchat-send-btn:hover {
        background: #006de0;
    }

    .wo-chat-reaction-bubble {
        background: #1f1f24;
        color: #cccccc;
    }

    .wo-chat-reaction-bubble:hover {
        background: #2c2c33;
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }

    .wo-chat-reaction-bubble--me {
        background: #007bff;
        color: #ffffff;
    }

    .wo-reaction-picker {
        background: #1b1b20;
        border: 1px solid #333333;
        box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    }

    .wo-reaction-picker__emoji {
        background: #24242a;
        color: #ffffff;
    }

    .wo-reaction-picker__emoji:hover {
        background: #33333d;
    }

    .mini-tchat-box {
        background: #141418 !important;
        border: 1px solid #222222;
    }
}

/* --------------------------------------------------------------
   SLASH COMMAND MENU — MODERNE & RESPONSIVE
-------------------------------------------------------------- */
.slash-menu {
  position: absolute;
  background: var(--card-bg, #1c1c1f);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  animation: slashFade 0.12s ease-out;
}

@keyframes slashFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.slash-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  gap: 10px;
  transition: 0.15s;
}
.slash-item:hover,
.slash-item.active {
  background: rgba(255,255,255,0.08);
}

.slash-icon {
  font-size: 20px;
}

.slash-cmd {
  font-weight: 600;
  color: #fff;
}

.slash-desc {
  color: #bbb;
  font-size: 13px;
  margin-left: auto;
}

/* Mobile adaptation */
@media (max-width: 600px) {
  .slash-menu {
    top: auto !important;
    bottom: 70px !important;
    border-radius: 10px;
  }
}

.loot-win {
  padding: 8px 12px;
  background: rgba(0,255,140,0.1);
  border-left: 3px solid #00ff8c;
  border-radius: 6px;
  color: #00ff8c;
}

.loot-fail {
  padding: 8px 12px;
  background: rgba(255,80,80,0.1);
  border-left: 3px solid #ff5050;
  border-radius: 6px;
  color: #ff5050;
}