/* Shared live workspace chat UI for client and admin portals. */
.workspace-grid {
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) 310px;
  min-height: 600px;
  background: #fff;
}
.workspace-thread-panel,
.workspace-chat-panel,
.workspace-requirements-panel { min-width: 0; }
.workspace-chat-panel { display: flex; flex-direction: column; background: #efeae2; }
.workspace-thread-panel { border-right: 1px solid #e2e8f0; background: #f8fafc; display: flex; flex-direction: column; }
.workspace-requirements-panel { border-left: 1px solid #e2e8f0; background: #fff; padding: 1.2rem; overflow-y: auto; }

.wa-bubble {
  position: relative;
  width: fit-content;
  max-width: min(78%, 560px);
  padding: .55rem .72rem .35rem;
  border-radius: 8px;
  color: #111b21;
  font-size: .88rem;
  line-height: 1.42;
  overflow-wrap: anywhere;
  white-space: normal;
  box-shadow: 0 1px 2px rgba(11, 25, 46, .16);
}
.wa-bubble-in { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-bubble-out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.wa-bubble-meta { display: flex; justify-content: flex-end; align-items: center; gap: .3rem; margin-top: .2rem; color: #667781; font-size: .68rem; line-height: 1; }
.wa-tick { color: #8696a0; font-size: .7rem; }
.wa-tick.read { color: #53bdeb; }
.wa-media-img { display: block; width: 100%; max-width: 360px; max-height: 360px; object-fit: cover; border-radius: 6px; margin-bottom: .35rem; }
.wa-doc-attachment { display: flex; align-items: center; gap: .6rem; min-width: 210px; max-width: 100%; padding: .55rem .65rem; margin-bottom: .35rem; border-radius: 6px; background: rgba(0,0,0,.06); color: #0b192e; text-decoration: none; }
.wa-doc-attachment div { min-width: 0; }
.wa-doc-attachment strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-input { flex: 1; min-width: 0; border: 1px solid #d1d7db; border-radius: 20px; padding: .58rem .9rem; background: #fff; color: #111b21; font: inherit; outline: none; }
.wa-input:focus { border-color: #128c7e; box-shadow: 0 0 0 3px rgba(18,140,126,.1); }
.wa-attach-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; color: #54656f; cursor: pointer; }
.wa-attach-btn:hover { background: #e2e8f0; }
.wa-send-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%; background: #075e54; color: #fff; cursor: pointer; }
.wa-send-btn:hover { background: #128c7e; }

@media (max-width: 1450px) {
  .workspace-grid { grid-template-columns: 260px minmax(380px, 1fr); }
  .workspace-requirements-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #e2e8f0; }
  .workspace-requirements-panel form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
  .workspace-requirements-panel form > button { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) !important; min-height: 0; }
  .workspace-thread-panel { border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .workspace-thread-panel #adminThreadsList { max-height: 260px !important; }
  .workspace-chat-panel { min-height: 560px; }
  .workspace-requirements-panel { grid-column: auto; }
}

@media (max-width: 600px) {
  .workspace-chat-panel { min-height: 500px; }
  .workspace-requirements-panel form { grid-template-columns: 1fr; }
  .workspace-requirements-panel form > button { grid-column: auto; }
  .wa-bubble { max-width: 88%; font-size: .86rem; }
  .wa-doc-attachment { min-width: 0; }
}
