/* Basic admin styles for HopeConnect */
:root{
  --sidebar-width: 200px !important;
}
.admin-shell{min-height:100vh}
.sidebar{width:var(--sidebar-width);min-height:100vh;position:sticky;top:0}
.sidebar .nav-link{color:rgba(255,255,255,0.9);}
.sidebar .nav-link.active, .sidebar .nav-link:hover{background:rgba(255,255,255,0.04);color:#fff}
.main{margin-left:0}
.topbar{height:56px}

@media (max-width: 767px){
  .sidebar{position:fixed;left:-100%;z-index:1040;transition:left .25s}
  .sidebar.open{left:0}
}

.active {
    background-color: #ffd500 !important;
}

/* Inbox specifics */
.inbox-threads{max-height:70vh;overflow:auto}
#messagesPane{max-height:60vh;overflow:auto}
.list-group-item{cursor:pointer}
.inbox-threads .list-group-item {
  border: none;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #f8fafc;
}
.inbox-threads .list-group-item.active,
.inbox-threads .list-group-item:hover {
  background: #e0f2fe;
  color: #0f172a;
}
.card-header h6{font-size:1rem}
.overflow-auto{overflow:auto}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffd500;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contact-list .list-group-item {
  border: none;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #f8fafc;
}

.contact-list .list-group-item.active,
.contact-list .list-group-item:hover {
  background: #e0f2fe;
  color: #0f172a;
}

.contact-detail-meta {
  font-size: 0.9rem;
  color: #475569;
}

.contact-detail-section + .contact-detail-section {
  margin-top: 1.25rem;
}

/* Account dropdown in topbar */
.topbar .account-container{position:relative;display:inline-block}
.account-menu{position:absolute;right:0;top:40px;z-index:1050;min-width:200px}
.account-menu .card-body{padding:.5rem}

/* small tweaks for login card */
.card-title{font-weight:600}

/* Chat bubble styles (scoped for inbox) */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
}

.message-row {
  display: flex;
  align-items: flex-end;
}
.message-row.user {
  justify-content: flex-end;
}
.message-row.assistant {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* ensure bubble is positioning context for the absolute dot */
.message-bubble { position: relative; }

.message-row.user .message-bubble {
  background: #0ea5e9;
  color: white;
  border-bottom-right-radius: 4px;
}

.message-row.assistant .message-bubble {
  background: #e2e8f0;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}

.meta {
  font-size: 11px;
  color: #64748b;
  margin-left: 8px;
}

/* column wrapper that stacks bubble and meta; alignment controlled by row side */
.message-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-row.assistant .message-col {
  align-items: flex-start;
}

.message-row.user .message-col {
  align-items: flex-end;
}

.message-row.user .meta {
  text-align: right;
  margin-left: 0;
}

.message-row.assistant .meta {
  text-align: left;
  margin-left: 0;
}

/* read/unread dot and check animation */

.read-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 12px;
  flex-shrink: 0;
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 5;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6);
  cursor: pointer;
}
.dot-unread {
  background: #0ea5e9; /* blue */
}
.dot-read {
  background: #94a3b8; /* gray */
}

.message-bubble.unread {
  font-weight: 700;
  padding-top: 12px; /* ensure text doesn't overlap dot */
}

.read-check {
  display: inline-block;
  color: white;
  font-size: 11px;
  transform: scale(0);
  opacity: 0;
  animation: check-pop 0.35s ease forwards;
}

.read-icon {
  display: inline-block;
  color: white;
  font-size: 11px;
  line-height: 12px;
}

@keyframes check-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* small responsive tweaks */
@media (max-width: 600px) {
  .message-bubble { max-width: 86%; }
}

/* quoted history and toggle */
.quoted-history {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  border-left: 2px solid rgba(15,23,42,0.06);
  padding-left: 10px;
  margin-left: 4px;
  white-space: pre-wrap;
}

.show-more-link {
  display: inline-block;
  margin-top: 6px;
  color: #374151;
  text-decoration: underline;
  cursor: pointer;
}

/* preview uses default bubble styling */
