/*Write your custom css in this file.*/

/* Filtro de Status (multiSelect): limitar altura e permitir rolagem */
.filter-multi-select button.status-filter + .dropdown-menu .list-group,
.filter-multi-select .status-filter + .dropdown-menu .list-group {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Notificações: painel lateral (desliza da direita, começa abaixo da topbar) */
:root {
  --web-notification-top: 66px;
}

.web-notification-nav {
  position: relative;
}

.web-notification-backdrop {
  position: fixed;
  inset: var(--web-notification-top, 66px) 0 env(safe-area-inset-bottom, 0px) 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1038;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.web-notification-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.web-notification-drawer {
  position: fixed;
  top: var(--web-notification-top, 66px);
  right: 0;
  /* Incluir barra de gestos / notch na base (Safari iOS, etc.) */
  bottom: env(safe-area-inset-bottom, 0px);
  width: min(440px, 100vw);
  max-width: 100%;
  z-index: 1039;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-sizing: border-box;
  pointer-events: none;
  /* Evita swipe horizontal estranho no corpo atrás durante scroll da lista */
  touch-action: pan-y;
}

.web-notification-drawer.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.web-notification-drawer-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0 !important;
  background: #fff;
}

.web-notification-drawer .dropdown-details {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.web-notification-drawer .dropdown-details > .mb0 {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.web-notification-drawer #notificaion-popup-list {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  height: auto !important;
}

.web-notification-drawer .notificatio-plate-title-area {
  flex-shrink: 0;
}

.web-notification-drawer .card-footer {
  flex-shrink: 0;
}

/* Telas estreitas: painel usa toda a largura útil */
@media (max-width: 576px) {
  .web-notification-drawer {
    width: 100%;
    max-width: 100vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .web-notification-drawer,
  .web-notification-backdrop {
    transition-duration: 0.01ms;
  }
}

[dir="rtl"] .web-notification-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

[dir="rtl"] .web-notification-drawer.is-open {
  transform: translateX(0);
}

/* Cabeçalho do painel: ícones alinhados (evita quebras tipo float) */
.web-notification-list-header .web-notification-header-toolbar {
  max-width: 100%;
}

.web-notification-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 4px;
  border-radius: 8px;
  color: #4b5563;
  text-decoration: none !important;
  line-height: 1;
  position: relative;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

.web-notification-toolbar-icon:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #111827;
}

body[data-color="1E202D"] .web-notification-toolbar-icon,
body[data-color="1e202d"] .web-notification-toolbar-icon {
  color: #aeb6d4;
}

body[data-color="1E202D"] .web-notification-toolbar-icon:hover,
body[data-color="1e202d"] .web-notification-toolbar-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Abas dentro do painel de notificações */
.web-notification-tab-row {
  padding: 8px 12px 4px;
}

.web-notification-tab-row .web-notification-tab-btn {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.web-notification-tab-row .web-notification-tab-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.web-notification-tab-row .web-notification-tab-btn.web-notification-tab-mentions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  vertical-align: middle;
}

.web-notification-tab-row .web-notification-tab-btn .web-notification-mentions-badge {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2em 0.45em;
}

.web-notification-tab-row .web-notification-tab-btn.active .web-notification-mentions-badge {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

body[data-color="1E202D"] .web-notification-tab-row .web-notification-tab-btn,
body[data-color="1e202d"] .web-notification-tab-row .web-notification-tab-btn {
  color: #c9d0e8;
  background: #2a303c;
  border-color: #3d4452;
}

body[data-color="1E202D"] .web-notification-tab-row .web-notification-tab-btn.active,
body[data-color="1e202d"] .web-notification-tab-row .web-notification-tab-btn.active {
  color: #fff;
  background: #5b73e8;
  border-color: #5b73e8;
}

[dir="rtl"] .web-notification-tab-row .web-notification-tab-btn {
  margin-right: 0;
  margin-left: 6px;
}

/* Toast menção em comentário de tarefa (canto superior direito)
 * Tema claro: painel claro. Tema escuro (preset 1E202D): segue cores do color/1E202D.css, um degrau acima do body.
 * Sem classe .card (evita sobrescritas indesejadas). */
.task-mention-toast-stack {
  position: fixed;
  top: calc(var(--web-notification-top, 66px) + 10px);
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 1046;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.task-mention-toast-stack .task-mention-toast {
  pointer-events: auto;
  position: relative;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 14px 40px rgba(15, 23, 42, 0.18) !important;
}

.task-mention-toast-stack .task-mention-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.task-mention-toast-inner {
  position: relative;
  z-index: 1;
}

.task-mention-toast-stack .task-mention-toast-avatar-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid rgba(15, 23, 42, 0.12) !important;
  background: #ffffff !important;
}

.task-mention-toast-stack .task-mention-toast-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(15, 23, 42, 0.12) !important;
  background: #e2e8f0 !important;
  color: #475569 !important;
}

.task-mention-toast-stack .task-mention-toast-mentioner {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: #0f172a !important;
}

.task-mention-toast-stack .task-mention-toast-subtitle {
  font-size: 11px;
  line-height: 1.35;
  color: #475569 !important;
  margin-top: 2px;
}

/* Título da tarefa: várias linhas (evita cortar cedo como text-truncate) */
.task-mention-toast-stack .task-mention-toast-task {
  font-weight: 600;
  font-size: 12px;
  line-height: 1.35;
  color: #1d4ed8 !important;
  margin-top: 6px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.task-mention-toast-stack .task-mention-toast-preview {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
  max-height: 4.2em;
  overflow: hidden;
  color: #475569 !important;
  opacity: 1 !important;
}

/* ── Tema escuro “Noturno” (assets/css/color/1E202D.css): body ~#1C1F26, cards ~#252932, realces ~#2f3541 */
body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast {
  border: 1px solid #434a5d !important;
  background-color: #363e4f !important;
  color: #eef0f6 !important;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.06) inset !important;
}

body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast-avatar-img,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast-avatar-img {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: #2a303c !important;
}

body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast-avatar-ph,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast-avatar-ph {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: #323948 !important;
  color: #aeb6ce !important;
}

body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast-mentioner,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast-mentioner {
  color: #ffffff !important;
}

body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast-subtitle,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast-subtitle {
  color: #b8bfd4 !important;
}

body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast-task,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast-task {
  color: #93a8ff !important;
}

body[data-color="1E202D"] .task-mention-toast-stack .task-mention-toast-preview,
body[data-color="1e202d"] .task-mention-toast-stack .task-mention-toast-preview {
  color: #c4cbdd !important;
}

[dir="rtl"] .task-mention-toast-stack {
  right: auto;
  left: max(12px, env(safe-area-inset-left, 0px));
}

[dir="rtl"] .task-mention-toast-stack .task-mention-toast {
  transform: translateX(-120%);
}

[dir="rtl"] .task-mention-toast-stack .task-mention-toast.is-visible {
  transform: translateX(0);
}