/*
 * Copyright (C) 2000 - 2026 Silverpeas
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * As a special exception to the terms and conditions of version 3.0 of
 * the GPL, you may redistribute this Program in connection with Free/Libre
 * Open Source Software ("FLOSS") applications as described in Silverpeas's
 * FLOSS exception.  You should have received a copy of the text describing
 * the FLOSS exception, and it is also available here:
 * "https://www.silverpeas.org/legal/floss_exception.html"
 *
 * This program 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#jsxc_windowList {
  z-index: 8000;
}

#jsxc_windowList, #jsxc_windowList.jsxc_roster_hidden {
  right: 280px;
}

#silverchat_roster, #jsxc_windowList {
  font-family: Calibri, "PT Sans", "Trebuchet MS", 'Helvetica Neue', Arial;
  font-size: 13px;
}

.jsxc_bar {
  background-color: #1c94d4;
}

#silverchat_roster {
  z-index: 8000;
  position: fixed;
  bottom: 0px;
  right: 20px;
  overflow: hidden;
  width: 250px;
  height: 70%;
  background-color: #f5f5f5;
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3);
}

#silverchat_roster_header {
  color: #FFF;
  background-color: #1c94d4;
  position: relative;
  height: 2.5em;
  line-height: 2.5em;
  cursor: pointer;
}

#silverchat_roster_header #silverchat_notice span {
  background: #1c94d4 url(../img/packIconsChat.png) right -199px no-repeat;
  width: 34px;
  line-height: 27px;
  height: 30px;
  position: absolute;
  right: 0;
  top: 0;
  text-align: center;
  font-weight: bold;
  -webkit-animation: bounce 2s 1s infinite;
  animation: bounce 2s 1s infinite;
}

#silverchat_roster_header #silverchat_notice span:empty {
  display: none;
}

#silverchat_roster_menu #jsxc_notice {
  height: auto;
  width: auto;
  float: none;
  text-align: left;
  line-height: 30px;
}

#silverchat_roster_menu #jsxc_notice .silverchat_menu_item {
  padding: 0em;
  margin: 0em 0.5em 0em 0.3em;
  border-bottom: 1px solid #f9e98e;
}

#silverchat_roster_menu #jsxc_notice .silverchat_menu_item li {
  background: #fbf7aa;
  border-top: 1px solid #f9e98e;
}

#silverchat_roster_menu #jsxc_notice span {
  display: inline-block;
  background: #FFF url(../img/packIconsChat.png) right -199px no-repeat;
  border-radius: 0;
  color: #FFF;
  width: 34px;
  line-height: 27px;
  height: 30px;
  font-size: 100%;
  padding: 0;
  position: relative;
  text-align: center;
  font-weight: bold;
  -webkit-animation: bounce 2s 1s infinite;
  animation: bounce 2s 1s infinite;
}

#silverchat_roster_menu #jsxc_notice span:empty {
  display: none;
}

#silverchat_roster_body {
  overflow: hidden;
  width: 100%;
}

#silverchat_roster_content {
  overflow-x: hidden;
  overflow-y: scroll;
  border-bottom: 1px solid #ddd;
  background: #FFF;
  margin-bottom: 34px;
  clear: both;
  bottom: 0;
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
}

.ui-tooltip {
  font-size: 11px;
  box-shadow: none;
  border: 1px solid #ddd;
}

#silverchat_roster_content .jsxc_rosteritem {
  line-height: 2.5em;
}

.jsxc_window .jsxc_tools > div {
  line-height: 30px;
}

.jsxc_menu a {
  opacity: 0.8;
}

.jsxc_menu.jsxc_open {
  -webkit-filter: none;
  filter: none;
  border: 1px solid #ddd;
  padding: 0;
}

.jsxc_menu.jsxc_open a {
  text-decoration: none;
  padding: 0 5px;
  text-align: left;
  display: block;
  border-bottom: 1px solid #ddd;
}

.jsxc_menu.jsxc_open ul li:last-child a {
  border-bottom: 0;
}

.jsxc_menu::after {
  -webkit-filter: drop-shadow(0px -1px 0px rgba(150, 150, 150, 0.50));
  filter: drop-shadow(0px -1px 0px rgba(150, 150, 150, 0.50));
}

#silverchat_roster_content #jsxc_buddylist,
#silverchat_roster_content .slimScrollDiv {
  width: 100% !important;
  height: auto !important;
}

#silverchat_buddies_filter,
#silverchat_groupchats_filter {
  color: #212121;
  cursor: pointer;
  display: block;
  float: right;
  line-height: 3em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  width: 50%;
  background: #f5f5f5 url(../img/packIconsChat.png) bottom right no-repeat;
}

#silverchat_buddies_filter {
  width: 40%;
  padding-right: 10%
}

#silverchat_groupchats_filter.selected,
#silverchat_buddies_filter.selected {
  color: #1c94d4;
  background-position: bottom left;
}

#silverchat_roster_tabs {
  position: relative;
}

#silverchat_roster_menu > #jsxc_menu {
  height: auto;
  width: 100%;
  text-align: inherit;
}

#silverchat_roster_menu_toggle {
  content: ' ';
  background: transparent url('../img/packIconsChat.png') right -550px no-repeat;
  display: block;
  height: 20px;
  vertical-align: middle;
  cursor: pointer;
  opacity: 0.4;
  position: absolute;
  top: 1em;
  right: 0.25em;
  width: 20px;
}

#silverchat_roster_menu_toggle:hover {
  opacity: 1;
}

#search_user:before {
  background: url('../img/packIconsChat.png') 0 -221px no-repeat;
}

#new_talk:before {
  background: url('../img/packIconsChat.png') 0 -295px no-repeat;
}

#invite_talk:before {
  background: url('../img/packIconsChat.png') 0 -295px no-repeat;
}

#silverchat_roster .silverchat_logo {
  background: url('../img/packIconsChat.png') 0 -400px no-repeat;
  content: ' ';
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  float: left;
  margin: 0.7em;
}

#silverchat_roster.jsxc_state_hidden {
  display: block;
  bottom: -65%;
  -webkit-transition: bottom 0.5s;
  transition: bottom 0.5s;
}

#silverchat_roster.jsxc_state_shown {
  display: block;
  -webkit-transition: bottom 0.5s;
  transition: bottom 0.5s;
}

.silverchat_roster_content {
  width: 100%;
  background: white;
  margin-bottom: 2em;
}

.silverchat_roster_content.jsxc_state_hidden {
  display: none;
  -webkit-transition: display 0.5s;
  transition: display 0.5s;
}

.silverchat_roster_content.jsxc_state_shown {
  display: block;
  -webkit-transition: display 0.5s;
  transition: display 0.5s;
}

.silverchat_roster_content .silverchat_menu_item {
  display: block;
  padding: 0.5em 0.5em 0.5em 0.3em;
  text-decoration: none;
  cursor: pointer;
  color: #3F3F3F;
  border-bottom: 1px solid #ededed;
}

.silverchat_roster_content .silverchat_menu_item:hover {
  text-decoration: none;
  color: black;
}

.silverchat_roster_content .silverchat_menu_item:before {
  content: " ";
  width: 1.5em;
  display: inline-block;
  background-size: 100%;
  background-repeat: no-repeat;
  margin: 0 6px 0 6px;
  display: block;
  float: left;
  height: 2em;
}

.silverchat_roster_content .silverchat_menu_item.jsxc_disabled,
#silverchat_roster_new_group_chat .silverchat_menu_item.jsxc_disabled {
  opacity: 0.3;
  cursor: default !important;
}

.silverchat_roster_content .silverchat_title {
  margin: 0.5em;
  margin-top: 0.7em;
  font-size: 1.1em;
  font-weight: bolder;
  color: darkgray;
}

.silverchat_content_separator {
  content: ' ';
  height: 0.9em;
  width: 70%;
  border-bottom: solid 1px silver;
  margin-bottom: 10px;
  margin-left: 5px;
}

#silverchat_roster_footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  line-height: 34px;
  height: 34px;
  z-index: 100;
  padding: 0;
}

#silverchat_roster_new_group_chat {
  position: absolute;
  bottom: 35px;
  width: 100%;
  line-height: 34px;
  height: 34px;
  z-index: 100;
  padding: 0;
  text-align: center;
}

#silverchat_roster_new_group_chat span {
  cursor: pointer;
}

#silverchat_roster_footer .jsxc_list {
  background: transparent url(../img/packIconsChat.png) right -438px no-repeat;
  padding-left: 2em;
}

#silverchat_roster_footer::before {
  position: absolute;
  left: 0.8em;
  bottom: 0.7em;
}

#silverchat_roster_footer .jsxc_inner {
  width: 100%;
}

#jsxc_buddylist li .jsxc_more {
  display: none;
  width: 38px;
  margin: 0;
}

#jsxc_buddylist li:hover .jsxc_more {
  display: block;
}

#jsxc_buddylist li:hover,
.silverchat_roster_content a:hover,
.jsxc_menu.jsxc_open a:hover {
  background-color: #ededed;
}

#silverchat_roster_footer ul {
  padding: 0;
  margin: 0;
  width: 100%;
  border-top: 1px solid transparent;
  background-color: #eeeeee;
  margin: 0;
}

#silverchat_roster_footer ul li:last-child {
  border-bottom: 1px solid transparent;
}

#silverchat_roster_footer li {
  height: 30px;
  background-color: #eeeeee;
  color: #000;
  cursor: pointer;
  width: 100%;
  padding-left: 44px;
  line-height: 30px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-repeat: no-repeat;
  background-position: 15px center;
  background-size: 16px 16px;
  opacity: 0.8;
}

#silverchat_roster_footer li.jsxc_disabled {
  color: #333333;
  cursor: default;
}

#silverchat_roster_footer li:hover:not(.jsxc_disabled) {
  color: #000;
  background-color: #ddd;
}

#silverchat_roster_footer > div > span {
  cursor: pointer;
}

#jsxc_buddylist .jsxc_rosteritem.selected {
  background: silver;
  background: #d1deff;
}

.jsxc_windowItem .silverchat_composing {
  text-align: center;
  font-size: 0.9em;
  font-style: italic;
}

.jsxc_windowItem .silverchat_composing:before {
  content: " ";
  width: 1.5em;
  height: 1em;
  display: inline-block;
  margin: 0 3px 0 0;
  background: url('../img/packIconsChat.png') 0 -650px no-repeat;
}

.jsxc_windowItem .jsxc_window .jsxc_menu .jsxc_verification {
  display: none !important;
}

.jsxc_bar {
  color: #eee;
}

.jsxc_rosteritem .jsxc_caption input {
  width: 130px;
}

.jsxc_min .jsxc_caption .jsxc_name {
  height: auto;
  line-height: 40px;
}

/* buddy menu */
.jsxc_rosteritem .jsxc_menu {
  position: fixed;
  right: 38px;
}

.jsxc_menu .jsxc_infoicon {
  background: url('../img/packIconsChat.png') 0 -147px no-repeat;
  opacity: 0.8;
}

.jsxc_menu .jsxc_deleteicon {
  background: url('../img/packIconsChat.png') -57px -590px no-repeat;
  opacity: 0.8;
}

.jsxc_menu .jsxc_editicon {
  background: url('../img/packIconsChat.png') -162px -590px no-repeat;
  opacity: 0.8;
}

.jsxc_menu a:hover .jsxc_icon {
  opacity: 1;
}

#jsxc_webrtc {
  z-index: 7999 !important;
  position: fixed;
  top: 0px;
  left: 0px;
  overflow: auto;
  width: 100%;
  background: rgba(0, 0, 0, 0.8) !important;
  height: 300px !important;
}

#jsxc_webrtc.jsxc_state_hidden {
  display: block;
  top: -250px;
  -webkit-transition: top 0.5s;
  transition: top 0.5s;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.3) !important;
}

#jsxc_webrtc.jsxc_state_hidden,
#jsxc_webrtc.jsxc_state_hidden .jsxc_videoContainer,
#jsxc_webrtc.jsxc_state_hidden .jsxc_localvideo,
#jsxc_webrtc.jsxc_state_hidden .jsxc_remotevideo,
#jsxc_webrtc.jsxc_state_hidden .jsxc_establishing:after,
#jsxc_webrtc.jsxc_state_hidden .jsxc_ringing:after {
  background: transparent !important;
  border: none;
}

#jsxc_webrtc.jsxc_state_hidden .jsxc_localvideo,
#jsxc_webrtc.jsxc_state_hidden .jsxc_remotevideo {
  opacity: 0;
}

#jsxc_webrtc.jsxc_state_hidden .jsxc_controlbar {
  opacity: 1;
}

#jsxc_webrtc.jsxc_state_shown .jsxc_controlbar.jsxc_visible .jsxc_toggleVideo,
#jsxc_webrtc.jsxc_state_shown .jsxc_controlbar.jsxc_visible .jsxc_fullscreen,
#jsxc_webrtc.jsxc_state_hidden .jsxc_controlbar .jsxc_toggleVideo,
#jsxc_webrtc.jsxc_state_shown .jsxc_controlbar .jsxc_fullscreen {
  display: inline-block;
}

#jsxc_webrtc.jsxc_state_hidden .jsxc_controlbar .jsxc_fullscreen {
  display: none;
}

#jsxc_webrtc.jsxc_state_shown .jsxc_controlbar .jsxc_toggleVideo {
  display: none;
}

#jsxc_webrtc.jsxc_state_shown {
  display: block;
  -webkit-transition: top 0.5s;
  transition: top 0.5s;
}

@media (min-width: 768px) {
  .jsxc_videoContainer {
    right: 0px !important;
  }

  .jsxc_controlbar {
    bottom: 5px;
  }
}

.jsxc_videoControl {
  pointer-events: auto;
}

.jsxc_remotevideo {
  min-width: 200px;
  min-height: 200px;
  z-index: 9000;
  background-color: #999999;
}

.jsxc_controlbar .jsxc_toggleVideo {
  background: transparent url('../img/packIconsChat.png') right -62px no-repeat;
  background-size: inherit
}

.jsxc_controlbar.jsxc_visible .jsxc_toggleVideo {
  background: transparent url('../img/packIconsChat.png') right -106px no-repeat;
  background-size: inherit
}

.jsxc_localvideo {
  border: 3px solid #efefef;
}

.jsxc_videoContainer {
  border-bottom: 1px solid #656565;
}

/*
Converse.js
 */

#conversejs .show-add-muc-modal {
  display: none;
}

#conversejs .show-add-muc-modal.authorized {
  display: block;
}

#conversejs #converse-roster .filter-by .fa-users {
  display: none;
}

#conversejs .chat-msg__actions .chat-msg__action-quote {
  display: none;
}

#conversejs .controlbox-section .show-profile {
  pointer-events: none;
}

#conversejs .muc-bookmark-form .form-group:nth-child(3) {
  display: none;
}

/*Overriding default theme*/
#conversejs, #conversejs-bg, .converse-overlayed {
  --subdued-color: #A8ABA1;
  --green: #1c94d4;
  --redder-orange: #E77051;
  --orange: #f07d19;
  --light-blue: #252525;
  --lighter-blue: #7bb49e;
  --brand-heading-color: #24549e;
  --completion-light-color: #FFB9A7;
  --completion-dark-color: #D24E2B;
  --chat-status-online: #1a9707;
  --chat-head-color-dark: #1c94d4;
  --chat-head-color-darker: #0E763B;
  --chat-head-color-lighten-50-percent: #e7f7ee;
  --chat-head-color: var(--green);
  --chat-head-text-color: white;
  --chat-toolbar-btn-color: var(--green);
  --chat-toolbar-btn-disabled-color: gray;
  --chat-content-background-color: white;
  --chat-info-color: var(--chatroom-head-bg-color);
  --highlight-color: #DCF9F6;
  --highlight-color-darker: #B0E8E2;
  --normal-font: "Helvetica", "Arial", sans-serif;
  --heading-font: 'Muli', normal;
  --branding-font: 'Baumans', cursive;
  --heading-display: block;
  --heading-color: white;
  --chatroom-badge-color: var(--chatroom-head-bg-color);
  --chatroom-badge-hover-color: var(--chatroom-head-bg-color-dark);
  --chatroom-correcting-color: #fadfd7;
  --chatroom-head-bg-color-dark: #D24E2B;
  --chatroom-head-bg-color: var(--redder-orange);
  --chatroom-head-border-bottom: 0px;
  --chatroom-head-button-color: var(--chatroom-head-bg-color);
  --chatroom-head-color: white;
  --chatroom-head-description-display: block;
  --chatroom-head-description-link-color: white;
  --chatroom-head-title-font-weight: normal;
  --chatroom-head-title-padding-right: 0px;
  --chatroom-width: 400px;
  --muc-toolbar-btn-color: var(--redder-orange);
  --muc-toolbar-btn-disabled-color: gray;
  --headline-head-color: var(--orange);
  --headline-message-color: #D2842B;
  --chatbox-button-size: 12px;
  --fullpage-chatbox-button-size: 14px;
  --font-size-tiny: 10px;
  --font-size-small: 12px;
  --font-size: 12px;
  --font-size-large: 14px;
  --font-size-huge: 18px;
  --message-font-size: var(--font-size);
  --chatbox-border-radius: 8px;
  --separator-text-color: var(--message-text-color);
  --chat-separator-border-bottom: 2px solid var(--chat-head-color);
  --chatroom-separator-border-bottom: 2px solid var(--chatroom-head-bg-color);
  --chatbox-message-input-border-top: 4px solid var(--chat-head-color);
  --chatroom-message-input-border-top: 4px solid var(--chatroom-head-bg-color);
  --line-height-small: 12px;
  --line-height: 14px;
  --line-height-large: 18px;
  --line-height-huge: 24px;
  --occupants-padding: 1em;
  --occupants-background-color: white;
  --occupants-border-left: 0.2143rem solid var(--panel-divider-color);
  --occupants-border-bottom: 1px solid lightgrey;
  --embedded-emoji-picker-height: 300px;
  --avatar-border-radius: 10%;
  --avatar-border: 0 solid #FFF;
  --avatar-background-color: white;
  --fullpage-chat-height: calc(var(--vh, 1vh) * 100);
  --fullpage-chat-width: 100%;
  --fullpage-emoji-picker-height: 300px;
  --fullpage-max-chat-textarea-height: 15em;
  --overlayed-chat-head-height: 40px;
  --overlayed-chat-height: 450px;
  --overlayed-chat-width: 300px;
  --overlayed-chatbox-hover-height: 1em;
  --overlayed-emoji-picker-height: 300px;
  --overlayed-max-chat-textarea-height: 200px;
  --overlayed-badge-color: #818479;
  --list-toggle-color: #818479;
  --list-toggle-hover-color: #585B51;
  --list-toggle-font-weight: normal;
  --list-item-hover-color: rgba(0, 0, 0, 0.035);
  --list-item-action-color: #e3eef3;
  --list-item-link-color: inherit;
  --list-item-link-hover-color: var(--dark-link-color);
  --list-item-open-color: var(--controlbox-head-color);
  --list-item-open-hover-color: var(--controlbox-head-color);
  --list-dot-circle-color: #f6dec1;
}

#conversejs.theme-default .chat-head .avatar {
  width: 25px;
  height: 25px;
  background-color: transparent
}

#conversejs.theme-default .chat-head .avatar image {
  width: auto;
  height: 25px;
}

#conversejs.converse-overlayed .chatbox converse-emoji-picker .emoji-picker .insert-emoji a {
  font-size: 24px;
  line-height: calc(25px * 1.5);
  padding: 0;
  height: calc(25px * 1.5);
  width: calc(25px * 1.5);
}

#conversejs.converse-overlayed .chatbox .emoji-skintone-picker {
  display: none;
}

#conversejs.converse-overlayed .chatbox converse-emoji-picker .emoji-picker__lists {
  height: 11em;
}

#conversejs .chatbox .emoji-picker__header ul .emoji-category a {
  font-size: 15px;
}

#conversejs .chatbox .controlbox-heading__btn.show-client-info {
  display: none;
}

#conversejs converse-emoji-dropdown .dropdown-menu {
  min-width: 260px;
}

.conversejs .message.chat-msg .chat-msg__text span {
  font-size: 18px;
}

.conversejs .message.chat-msg .chat-msg__text--larger span {
  font-size: 28px;
  line-height: 28px;
}

.conversejs converse-chats.converse-overlayed #minimized-chats .minimized-chats-flyout {
  bottom: 37px;
}

.conversejs converse-chats.converse-overlayed #minimized-chats #toggle-minimized-chats {
  background-color: var(--link-color);
}

.conversejs svg {
  border-radius: 0;
}

.conversejs .chatbox .chat-head .chatbox-title__text {
  line-height: 25px;
}

.conversejs .message.chat-info {
  color: var(--chat-head-color);
}

.conversejs .suggestion-box > ul > li[aria-basket="true"] {
  background: var(--chatroom-head-bg-color-dark);
  color: var(--inverse-link-color);
  opacity: 0.5;
}

.conversejs .suggestion-box > ul > li[aria-basket="true"][aria-selected="true"] {
  opacity: 0.75;
}


.conversejs muc-invite-modal .modal-body {
  overflow: hidden !important;
}

.conversejs muc-invite-modal .single-line {
  display: inline-flex;
  width: 100%;
}

.conversejs muc-invite-modal .suggestion-box__input{
  width: calc(100% - 40px);
}

.conversejs muc-invite-modal .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px dashed;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.conversejs muc-invite-modal .suggestion-box__results--below{
  top: 50px;
  max-height: 140px;
  overflow-y: auto;
  background-color: white;
}

.conversejs muc-invite-modal .plus{
  margin-left: 5px;
}

.conversejs muc-invite-modal .selected-jids {
  width: 100%;
  display: inline-block;
}

.conversejs muc-invite-modal .selected-jids li {
  float: left;
  margin-right: 5px;
}

.conversejs muc-invite-modal .delete-button {
  vertical-align: -4px;
}