/* ============================================================
   GPS IMOBILIÁRIO — comunicacao.css
   Sino + Drawer + Thread + Inês float panel
   Extraído de components.css · 2026-04-21
   ============================================================ */

/* --- Inês Float Panel (popup mode) --- */
.ines-float-panel { position: fixed; inset: 0; z-index: 9998; display: none; }
.ines-float-panel[style*="display: flex"], .ines-float-panel.open { display: flex !important; }
.ines-float-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.25); }
.ines-float-drawer {
  position: fixed; bottom: 20px; right: 20px;
  width: 420px; max-height: 80vh;
  background: var(--cream); border-radius: var(--r-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 9999;
}
.ines-float-drawer .ines-header { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.ines-float-close {
  position: absolute; top: 10px; right: 10px; z-index: 10;
  width: 28px; height: 28px; border-radius: 50%;
  background: white; border: 1px solid var(--cream-border);
  cursor: pointer; color: var(--ink-muted); font-size: var(--font-base);
  display: none; align-items: center; justify-content: center;
  transition: all .15s; box-shadow: var(--shadow-sm);
}
.ines-float-close:hover { background: var(--red-bg); color: var(--red-soft); border-color: var(--red-soft); }
.ines-float-panel[style*="flex"] .ines-float-close { display: flex; }
.ines-float-drawer .ines-chat-area { min-height: 280px; max-height: 50vh; }
@media (max-width: 768px) {
  .ines-float-drawer {
    bottom: 0; right: 0; left: 0; width: 100%;
    max-height: 90vh; border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .ines-float-drawer .ines-chat-area { max-height: 60vh; }
  .ines-float-close { top: 8px; right: 8px; }
}

/* --- Botão float/dock toggle --- */
.ines-float-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ink-muted); padding: 4px; border-radius: 4px; transition: all .15s; }
.ines-float-toggle:hover { background: var(--cream); color: var(--accent); }
.ines-float-drawer .ines-float-toggle { display: flex; }

/* --- Botão Inês na topbar --- */
.ines-topbar-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: transparent; border: none; cursor: pointer; color: var(--accent); transition: background .15s; flex-shrink: 0; }
.ines-topbar-btn:hover { background: var(--accent-bg); }

/* --- Sino na topbar --- */
.notif-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: transparent; border: none; cursor: pointer; color: var(--ink-soft); transition: background .15s; flex-shrink: 0; }
.notif-btn:hover { background: var(--cream-dark); }
.notif-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; background: var(--accent); color: white; font-size: var(--font-xs); font-weight: 600; font-family: 'DM Sans', sans-serif; border-radius: 8px; display: none; align-items: center; justify-content: center; padding: 0 3px; line-height: 1; }

/* --- Overlay + Drawer --- */
.notif-overlay { position: fixed; inset: 0; z-index: 450; display: none; align-items: flex-start; justify-content: flex-end; }
.notif-overlay.open { display: flex; }
.notif-backdrop { position: absolute; inset: 0; background: rgba(26,24,20,0.3); backdrop-filter: blur(2px); }
.notif-drawer { position: relative; z-index: 1; width: 100%; max-width: 520px; height: 100dvh; background: var(--cream); display: flex; flex-direction: column; box-shadow: -4px 0 24px rgba(0,0,0,0.1); }
@media (max-width: 768px) { .notif-drawer { max-width: 100%; } }
.notif-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; border-bottom: 1px solid var(--cream-border); position: sticky; top: 0; background: var(--cream); z-index: 2; flex-shrink: 0; }
.notif-drawer-titulo { font-family: 'Cormorant Garamond', serif; font-size: var(--font-xl); font-weight: 600; color: var(--ink); }
.notif-drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }

/* --- Items no drawer --- */
.notif-section-titulo { font-size: var(--font-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); padding: 12px 20px 6px; }
.notif-item { padding: 12px 20px; cursor: pointer; transition: background .12s; border-bottom: 1px solid var(--cream-border); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--cream-dark); }
.notif-item.nao-lida { background: rgba(184,150,12,0.05); border-left: 3px solid var(--accent); padding-left: 17px; }
.notif-item.nao-lida:hover { background: rgba(184,150,12,0.1); }
.notif-item-label { font-size: var(--font-base); font-weight: 500; color: var(--ink); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.notif-dest-badge { font-size: var(--font-xs); font-weight: 500; padding: 1px 6px; border-radius: 8px; background: var(--blue-bg); color: var(--blue-soft); border: 1px solid rgba(26,58,92,0.12); white-space: nowrap; flex-shrink: 0; }
.notif-item-preview { font-size: var(--font-sm); color: var(--ink-muted); margin-bottom: 2px; }
.notif-item-data { font-size: var(--font-sm); color: var(--ink-muted); }
.notif-vazio { padding: 40px 20px; text-align: center; font-size: var(--font-base); color: var(--ink-muted); }
.notif-footer { padding: 12px 20px; border-top: 1px solid var(--cream-border); display: flex; gap: 8px; flex-wrap: wrap; }
.notif-footer .btn { flex: 1; min-width: 0; font-size: var(--font-sm); }

/* --- Toolbar (toggle arquivadas) --- */
.notif-toolbar { padding: 8px 20px; display: flex; align-items: center; justify-content: flex-end; border-bottom: 1px solid var(--cream-border); }
.notif-toggle-arq { display: flex; align-items: center; gap: 6px; font-size: var(--font-sm); color: var(--ink-muted); cursor: pointer; }
.notif-toggle-arq input { accent-color: var(--accent); }

/* --- Arquivar botão inline --- */
.notif-item-meta { display: flex; align-items: center; gap: 8px; }
.notif-arquivar-btn { background: none; border: none; color: var(--ink-muted); cursor: pointer; font-size: var(--font-sm); padding: 2px 4px; border-radius: 3px; transition: color .15s, background .15s; line-height: 1; }
.notif-arquivar-btn:hover { color: var(--red-soft); background: var(--red-bg); }
.notif-arquivada { opacity: 0.5; }

/* --- Load more --- */
.notif-load-more { padding: 12px 20px; text-align: center; }
.notif-load-more .btn { font-size: var(--font-sm); width: 100%; }

/* --- Comunicado aberto no drawer --- */
.notif-back { display: flex; align-items: center; gap: 6px; padding: 12px 20px; font-size: var(--font-sm); color: var(--ink-muted); cursor: pointer; border-bottom: 1px solid var(--cream-border); transition: color .15s; }
.notif-back:hover { color: var(--ink); }
.notif-comunicado-card { margin: 16px 12px; background: white; border: 1px solid var(--cream-border); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
.notif-comunicado-card-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--cream-border); }
.notif-comunicado-titulo { font-family: 'Cormorant Garamond', serif; font-size: var(--font-2xl); font-weight: 600; color: var(--ink); margin-bottom: 6px; line-height: 1.3; }
.notif-comunicado-meta { font-size: var(--font-sm); color: var(--ink-muted); letter-spacing: 0.04em; }
.notif-comunicado-corpo { font-size: var(--font-base); color: var(--ink-soft); line-height: 1.8; padding: 16px 20px 20px; }
.notif-comunicado-corpo p { margin: 0 0 14px; }
.notif-comunicado-corpo p:last-child { margin-bottom: 0; }
.notif-comunicado-corpo strong { color: var(--ink); font-weight: 600; }
.notif-comunicado-corpo em { font-style: italic; }

/* --- Thread de mensagens --- */
.thread-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.thread-mensagens { flex: 1; overflow-y: auto; padding: 12px 0; display: flex; flex-direction: column; gap: 10px; min-height: 80px; max-height: 320px; }
.thread-loading, .thread-erro, .thread-vazio { padding: 16px; text-align: center; font-size: var(--font-sm); color: var(--ink-muted); }
.thread-input-row { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 0; border-top: 1px solid var(--cream-border); margin-top: 8px; }
.thread-input { flex: 1; padding: 8px 10px; border: 1px solid var(--cream-border); border-radius: var(--r); font-family: 'DM Sans', sans-serif; font-size: var(--font-sm); color: var(--ink); background: var(--cream); outline: none; resize: none; transition: border-color .15s; line-height: 1.5; }
.thread-input:focus { border-color: var(--accent); }
.thread-enviar { padding: 8px 12px; flex-shrink: 0; width: auto !important; margin-top: 0 !important; align-self: flex-end; }

/* --- Mensagem individual --- */
.thread-msg { display: flex; gap: 8px; align-items: flex-start; }
.thread-msg.minha { flex-direction: row-reverse; }
.thread-msg-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--cream); display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-size: var(--font-sm); font-weight: 600; flex-shrink: 0; overflow: hidden; border: none; cursor: default; }
.thread-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-msg-balao { max-width: 75%; }
.thread-msg.minha .thread-msg-balao { align-items: flex-end; }
.thread-msg-autor { font-size: var(--font-xs); color: var(--ink-muted); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.thread-msg.minha .thread-msg-autor { justify-content: flex-end; }
.thread-msg-role { font-size: var(--font-xs); background: var(--cream-dark); border: 1px solid var(--cream-border); border-radius: 3px; padding: 0 4px; color: var(--ink-muted); }
.thread-msg-corpo { font-size: var(--font-sm); color: var(--ink-soft); line-height: 1.5; background: white; border: 1px solid var(--cream-border); border-radius: 8px; padding: 7px 10px; word-break: break-word; }
.thread-msg.minha .thread-msg-corpo { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.thread-msg-corpo p { margin: 0 0 5px; }
.thread-msg-corpo p:last-child { margin-bottom: 0; }
.thread-msg-corpo strong { font-weight: 600; color: inherit; }
.thread-msg-corpo em { font-style: italic; }
.thread-msg-hora { font-size: var(--font-xs); color: var(--ink-muted); margin-top: 3px; }
.thread-msg.minha .thread-msg-hora { text-align: right; }

/* --- Secção no painel do negocio --- */
.negocio-thread-section { padding: 16px 20px; border-top: 1px solid var(--cream-border); }
.negocio-thread-titulo { font-size: var(--font-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }

/* Mobile */
@media (max-width: 768px) {
  .notif-overlay { align-items: flex-end; }
  .notif-drawer { max-width: 100%; height: 88dvh; border-radius: 16px 16px 0 0; }
  .notif-drawer-header::before { content: ''; display: block; width: 36px; height: 4px; background: var(--cream-border); border-radius: 2px; margin: 0 auto 12px; }
}

/* --- Modal checkbox label --- */
.modal-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: var(--font-base); color: var(--ink-soft); cursor: pointer; padding: 4px 0; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--cream-border); }
.modal-footer .btn-confirm { width: auto !important; margin-top: 0 !important; padding: 11px 20px; }

/* Thread expandir */
.thread-expandir { display: flex; align-items: center; gap: 6px; font-size: var(--font-sm); color: var(--accent); cursor: pointer; padding: 6px 0 10px; border-bottom: 1px solid var(--cream-border); margin-bottom: 8px; font-weight: 500; transition: opacity .15s; }
.thread-expandir:hover { opacity: 0.7; }
