/* ============================================================
   Learnio Chat — variables del tema heredadas de style.css
   ============================================================ */

.lc-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #fc9a3f 0%, #d13379 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lc-status {
  font-size: 0.75rem;
  color: #4caf50;
}

.lc-login-notice {
  font-size: 0.875rem;
  color: #727272;
}

/* ══════════════════════════════════
   WIDGET
══════════════════════════════════ */

.lc-widget {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #e9e9e9;
  border-radius: 1.25rem;
  overflow: hidden;
  max-width: 520px;
  height: 520px;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.lc-widget__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fc9a3f 0%, #d13379 100%);
  color: #ffffff;
}

.lc-widget__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #ffffff;
  margin: 0;
}

.lc-widget .lc-status {
  color: rgba(255, 255, 255, 0.85);
}

.lc-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f9f9f9;
  scroll-behavior: smooth;
}

.lc-widget__footer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e9e9e9;
  background: #ffffff;
}

/* ══════════════════════════════════
   INBOX
══════════════════════════════════ */

.lc-inbox {
  display: grid;
  grid-template-columns: 300px 1fr;
  border: 1.5px solid #e9e9e9;
  border-radius: 1.25rem;
  overflow: hidden;
  height: 620px;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.lc-inbox__sidebar {
  border-right: 1px solid #e9e9e9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lc-inbox__sidebar-head {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e9e9e9;
}

.lc-inbox__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #333333;
}

.lc-conversations {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.lc-conversations__loading,
.lc-conversations__empty {
  padding: 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: #727272;
  text-align: center;
}

.lc-conv-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f0f0f0;
}

.lc-conv-item:hover {
  background: #f9f9f9;
}

.lc-conv-item--active {
  background: #feebc8;
}

.lc-conv-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lc-conv-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-conv-item__preview {
  font-size: 0.75rem;
  color: #727272;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 6.25rem;
  background: #d13379;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  flex-shrink: 0;
}

.lc-inbox__panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lc-inbox__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #d9d9d9;
}

.lc-inbox__empty p {
  font-size: 0.875rem;
  color: #727272;
}

.lc-panel__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fc9a3f 0%, #d13379 100%);
  color: #ffffff;
}

.lc-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f9f9f9;
  scroll-behavior: smooth;
}

/* ══════════════════════════════════
   BURBUJAS
══════════════════════════════════ */

.lc-bubble {
  display: flex;
  flex-direction: column;
  max-width: 72%;
}

.lc-bubble--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.lc-bubble--theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.lc-bubble__text {
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}

.lc-bubble--mine .lc-bubble__text {
  background: #4a148c;
  color: #ffffff;
  border-bottom-right-radius: 0.25rem;
}

.lc-bubble--theirs .lc-bubble__text {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e9e9e9;
  border-bottom-left-radius: 0.25rem;
}

.lc-bubble__time {
  font-size: 0.6875rem;
  color: #727272;
  margin-top: 0.2rem;
  padding: 0 0.25rem;
}

.lc-empty {
  font-size: 0.875rem;
  color: #727272;
  text-align: center;
  margin: auto;
}

/* ══════════════════════════════════
   INPUT + BOTÓN
══════════════════════════════════ */

.lc-input {
  flex: 1;
  border: 1px solid #e9e9e9;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  resize: none;
  outline: none;
  line-height: 1.5;
  background: #f9f9f9;
  transition: border-color 0.2s;
}

.lc-input:focus {
  border-color: #4a148c;
  background: #ffffff;
}

.lc-send-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #fc9a3f 0%, #d13379 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.lc-send-btn:hover {
  opacity: 0.85;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */

@media (max-width: 640px) {
  .lc-inbox {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 80vh;
  }

  .lc-inbox__sidebar {
    border-right: none;
    border-bottom: 1px solid #e9e9e9;
    max-height: 240px;
  }

  .lc-widget {
    height: 480px;
  }
}

/* ── Avatar con foto de perfil ─────────────────────────────────── */

.lc-avatar--img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}
