/*
 * FurSync flutuante
 *
 * Esta camada só é aplicada ao iframe com ?embed=1. Ela mantém o painel
 * compacto separado do layout completo de /fursync.html e evita que as
 * regras móveis antigas mudem a ordem ou o tamanho das quatro abas.
 */

body.fc-embedded {
  --fc-widget-bg: #161719;
  --fc-widget-surface: #202124;
  --fc-widget-line: rgba(255, 255, 255, .12);
  --fc-widget-text: #f4f4f5;
  --fc-widget-muted: #a7a8ac;
  --fc-widget-blue: #2f8cff;
  min-width: 0;
  overflow: hidden;
  color: var(--fc-widget-text);
  background: var(--fc-widget-bg);
}

body.fc-embedded .furcord-shell,
body.fc-embedded .fc-left,
body.fc-embedded .fc-list-card {
  width: 100% !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.fc-embedded .furcord-shell {
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
}

body.fc-embedded .fc-left {
  position: relative;
  display: block !important;
}

body.fc-embedded .fc-profile-card,
body.fc-embedded .fc-widget-brand {
  display: none !important;
}

body.fc-embedded .fc-widget-titlebar {
  position: absolute !important;
  top: 0;
  right: 0;
  z-index: 40;
  width: 50px !important;
  min-width: 50px !important;
  height: 52px;
  min-height: 52px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  pointer-events: none;
}

body.fc-embedded .fc-widget-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center;
  border-radius: 8px;
  color: #bfc1c6;
  background: transparent;
  font-size: 25px;
  line-height: 1;
  pointer-events: auto;
}

body.fc-embedded .fc-widget-close:hover,
body.fc-embedded .fc-widget-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  outline: 2px solid var(--fc-widget-blue);
}

/* No Furiter o FurSync é uma coluna fixa, não uma janela descartável. */
body.fc-embedded.fc-feed-panel .fc-widget-titlebar,
body.fc-embedded.fc-feed-panel .fc-widget-close {
  display: none !important;
}

body.fc-embedded.fc-feed-panel .fc-tabs-primary {
  padding-right: 8px;
}

body.fc-embedded .fc-widget-message {
  position: absolute;
  top: 54px;
  left: 10px;
  right: 10px;
  z-index: 45;
  margin: 0;
  border: 1px solid rgba(47, 140, 255, .42);
  background: rgba(20, 72, 132, .96);
}

body.fc-embedded .fc-list-card {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #18191b, #141517) !important;
  box-shadow: none !important;
}

body.fc-embedded .fc-tabs-primary {
  order: 0 !important;
  flex: 0 0 52px !important;
  width: 100% !important;
  height: 52px;
  padding: 0 48px 0 8px;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  overflow: visible !important;
  border-bottom: 1px solid var(--fc-widget-line);
  background: rgba(20, 21, 23, .98);
}

body.fc-embedded .fc-tabs-primary .fc-tab {
  position: relative;
  width: auto !important;
  min-width: 0 !important;
  min-height: 52px !important;
  padding: 0 4px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #c4c5c8 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

body.fc-embedded .fc-tabs-primary .fc-tab::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

body.fc-embedded .fc-tabs-primary .fc-tab.active {
  color: var(--fc-widget-blue) !important;
}

body.fc-embedded .fc-tabs-primary .fc-tab.active::after {
  background: var(--fc-widget-blue) !important;
}

body.fc-embedded .fc-tabs-primary .fc-tab-badge {
  position: absolute;
  top: 4px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 9px;
  background: var(--fc-widget-blue);
}

body.fc-embedded .fc-mode-tools {
  order: 1 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 10px 12px 7px !important;
}

body.fc-embedded .fc-mode-tools.hidden {
  display: none !important;
}

body.fc-embedded .fc-search-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px !important;
  align-items: center;
  gap: 8px !important;
}

body.fc-embedded #recommendedTools {
  display: block !important;
}

body.fc-embedded #recommendedTools.hidden {
  display: none !important;
}

body.fc-embedded .fc-search {
  order: initial !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 13px !important;
  display: block !important;
  border: 1px solid var(--fc-widget-line) !important;
  border-radius: 7px !important;
  outline: 0;
  color: #ededee;
  background: var(--fc-widget-surface) !important;
  font-size: 13px;
  line-height: 44px !important;
}

body.fc-embedded .fc-search:focus {
  border-color: rgba(47, 140, 255, .72) !important;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, .16);
}

body.fc-embedded .fc-icon-action {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  display: grid !important;
  place-items: center;
  border: 1px solid var(--fc-widget-line) !important;
  border-radius: 7px !important;
  color: #f5f5f5;
  background: transparent !important;
  box-shadow: none !important;
}

body.fc-embedded .fc-icon-action:hover,
body.fc-embedded .fc-icon-action:focus-visible {
  border-color: rgba(47, 140, 255, .66) !important;
  background: rgba(47, 140, 255, .12) !important;
  outline: 0;
}

body.fc-embedded .fc-compose-shortcut > span,
body.fc-embedded .fc-create-group-shortcut > span {
  position: static !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
  opacity: 1 !important;
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  color: #f5f5f5 !important;
  background: transparent !important;
  font-size: 25px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

body.fc-embedded .fc-compose-shortcut > span {
  font-size: 21px !important;
}

body.fc-embedded .fc-list,
body.fc-embedded .fc-public-groups {
  order: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  padding: 0 10px 9px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #5b6068 transparent;
}

body.fc-embedded .fc-list:not(.hidden) {
  flex: 1 1 auto !important;
}

body.fc-embedded #groupsList:not(.hidden) {
  flex: 0 1 auto !important;
  max-height: 245px !important;
  padding-bottom: 0 !important;
}

body.fc-embedded #publicGroupsList:not(.hidden) {
  flex: 1 1 auto !important;
  max-height: none !important;
}

body.fc-embedded .fc-list::-webkit-scrollbar,
body.fc-embedded .fc-public-groups::-webkit-scrollbar {
  width: 7px;
}

body.fc-embedded .fc-list::-webkit-scrollbar-thumb,
body.fc-embedded .fc-public-groups::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  background: #5b6068;
  background-clip: padding-box;
}

body.fc-embedded .fc-conversation-row,
body.fc-embedded .fc-friend-row,
body.fc-embedded .fc-group-row,
body.fc-embedded .fc-public-row,
body.fc-embedded .fc-recommended-row {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 7px 5px !important;
  border: 0 !important;
  border-radius: 7px !important;
  color: inherit;
  background: transparent !important;
  box-shadow: none !important;
}

body.fc-embedded .fc-conversation-row:hover,
body.fc-embedded .fc-conversation-row.active,
body.fc-embedded .fc-friend-row:hover,
body.fc-embedded .fc-group-row:hover,
body.fc-embedded .fc-group-row.active,
body.fc-embedded .fc-public-row:hover,
body.fc-embedded .fc-recommended-row:hover {
  background: rgba(255, 255, 255, .055) !important;
}

body.fc-embedded .fc-conversation-row,
body.fc-embedded .fc-group-row {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 9px !important;
  text-align: left;
}

body.fc-embedded .fc-friend-row {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
}

body.fc-embedded .fc-recommended-row,
body.fc-embedded .fc-public-row {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 8px !important;
}

body.fc-embedded .fc-avatar,
body.fc-embedded .fc-conversation-row .fc-avatar,
body.fc-embedded .fc-friend-row .fc-avatar,
body.fc-embedded .fc-group-row .fc-avatar,
body.fc-embedded .fc-public-row .fc-avatar,
body.fc-embedded .fc-recommended-row .fc-avatar {
  width: 46px !important;
  height: 46px !important;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: none;
}

body.fc-embedded .fc-conversation-copy,
body.fc-embedded .fc-friend-main,
body.fc-embedded .fc-recommended-row > span:nth-child(2),
body.fc-embedded .fc-public-row > span:nth-child(2) {
  min-width: 0 !important;
  overflow: hidden !important;
}

body.fc-embedded .fc-conversation-copy b,
body.fc-embedded .fc-friend-main b,
body.fc-embedded .fc-group-row b,
body.fc-embedded .fc-public-row b,
body.fc-embedded .fc-recommended-row b {
  display: block;
  overflow: hidden;
  color: #f2f2f3;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.fc-embedded .fc-conversation-copy small,
body.fc-embedded .fc-friend-main small,
body.fc-embedded .fc-group-row small,
body.fc-embedded .fc-public-row small,
body.fc-embedded .fc-recommended-row small {
  display: block !important;
  margin-top: 3px;
  overflow: hidden !important;
  color: var(--fc-widget-muted) !important;
  font-size: 11px;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.fc-embedded .fc-status-dot {
  width: 8px;
  height: 8px;
}

body.fc-embedded .fc-conversation-meta {
  min-width: 42px;
  color: var(--fc-widget-muted);
  font-size: 11px;
}

body.fc-embedded .fc-conversation-meta em {
  color: #c7c8ca;
  font-size: 21px;
  font-style: normal;
}

body.fc-embedded .fc-list-menu-toggle {
  width: 34px;
  height: 38px;
  font-size: 21px;
}

body.fc-embedded .fc-recommended-actions {
  display: flex !important;
  grid-column: auto !important;
  align-items: center;
  justify-content: flex-end !important;
  gap: 5px;
}

body.fc-embedded .fc-recommended-actions button,
body.fc-embedded .fc-recommended-actions a,
body.fc-embedded .fc-public-row button {
  min-height: 30px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 5px !important;
  color: #fff;
  background: transparent !important;
  font-size: 10px !important;
  font-weight: 700;
}

body.fc-embedded .fc-recommended-actions button,
body.fc-embedded .fc-public-row button {
  border-color: var(--fc-widget-blue) !important;
  background: var(--fc-widget-blue) !important;
}

body.fc-embedded .fc-public-groups h3 {
  margin: 8px 5px 7px;
  color: #eeeeef;
  font-size: 13px;
}

body.fc-embedded .fc-public-list {
  max-height: none;
  overflow: visible;
}

body.fc-embedded .fc-load-more {
  display: block;
  margin: 7px auto 5px;
  padding: 8px 12px;
  border: 0;
  color: var(--fc-widget-blue);
  background: transparent;
  box-shadow: none;
  font-size: 11px;
}

body.fc-embedded .fc-recommendations-state {
  margin: 8px 4px 12px;
  color: var(--fc-widget-muted);
  font-size: 11px;
  text-align: center;
}

body.fc-embedded #createGroupOpenBtn {
  display: none !important;
}

body.fc-embedded .muted {
  margin: 14px 5px;
  color: var(--fc-widget-muted);
  font-size: 12px;
}

body.fc-embedded.fc-chat-open .fc-main {
  background: var(--fc-widget-bg) !important;
}

body.fc-embedded.fc-chat-open .fc-chat-head {
  min-height: 62px !important;
  padding: 8px 10px !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  border-bottom: 1px solid var(--fc-widget-line) !important;
  background: #18191b !important;
}

body.fc-embedded.fc-chat-open .fc-mobile-back {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
}

body.fc-embedded.fc-chat-open .fc-current {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.fc-embedded.fc-chat-open .fc-current .fc-avatar {
  width: 42px !important;
  height: 42px !important;
}

body.fc-embedded.fc-chat-open .fc-current h1 {
  font-size: 15px;
}

body.fc-embedded.fc-chat-open .fc-chat-panel {
  border: 0 !important;
  border-radius: 0 !important;
}

@media (max-width: 370px) {
  body.fc-embedded .fc-tabs-primary {
    padding-left: 3px;
    padding-right: 43px;
  }

  body.fc-embedded .fc-tabs-primary .fc-tab {
    padding: 0 1px !important;
    font-size: 10px !important;
  }

  body.fc-embedded .fc-tabs-primary .fc-tab::after {
    left: 4px;
    right: 4px;
  }

  body.fc-embedded .fc-mode-tools {
    margin-inline: 8px !important;
  }

  body.fc-embedded .fc-recommended-row {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }

  body.fc-embedded .fc-recommended-actions {
    grid-column: 2 !important;
    justify-content: flex-start !important;
  }
}
