/**
 * Room Talk — composer, attachments, scroll-to-bottom
 */

.lms-room-talk-composer-wrap {
  flex-shrink: 0;
  position: relative;
  padding: 0.5rem 12.5% 1.25rem;
  background: inherit;
  z-index: 2;
}
.lms-warshah-composer-bar {
  display: block;
  width: 100%;
}
.lms-warshah-composer-bar .lms-warshah-composer {
  width: 100%;
}
.lms-warshah-composer__attach {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  aspect-ratio: 1;
  margin: 0 0.125rem 0 0.125rem;
  padding: 0;
  border-radius: 9999px;
  border: none;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
  overflow: hidden;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.lms-warshah-composer__attach i {
  font-size: 1rem;
  font-weight: 300;
}
.lms-warshah-composer__attach:hover:not(:disabled) {
  background: #e5e7eb;
  color: #111827;
}
.lms-warshah-composer__attach:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lms-warshah-composer-bar .lms-warshah-composer {
  flex: 1;
  min-width: 0;
}
.lms-warshah-attach-preview {
  display: block;
  margin: 0 0 0.5rem 0;
  padding: 0;
  border: none;
  background: transparent;
  width: auto;
  max-width: 100%;
}
.lms-warshah-attach-preview__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.375rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: fit-content;
  max-width: 100%;
}
.lms-warshah-attach-preview__item {
  position: relative;
  flex-shrink: 0;
}
.lms-warshah-attach-preview__item .lms-warshah-attach-preview__remove {
  position: absolute;
  top: -0.375rem;
  right: -0.375rem;
}
.lms-warshah-attach-preview__thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #374151;
}
.lms-warshah-attach-preview__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: #374151;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}
.lms-warshah-attach-preview__name {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lms-warshah-attach-preview__remove {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  cursor: pointer;
}
.lms-warshah-attach-preview__remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.lms-room-talk-bubble__attachment + .lms-room-talk-bubble__body {
  margin-top: 0.5rem;
}
.lms-room-talk-attach {
  display: block;
  text-decoration: none;
  color: inherit;
}
.lms-room-talk-attach--image {
  max-width: min(100%, 18rem);
}
.lms-room-talk-attach__img {
  display: block;
  width: 100%;
  max-height: 14rem;
  object-fit: cover;
  border-radius: 0.625rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.lms-room-talk-attach--video {
  max-width: min(100%, 20rem);
}
.lms-room-talk-attach__video {
  display: block;
  width: 100%;
  max-height: 14rem;
  border-radius: 0.625rem;
  background: #000;
}
.lms-room-talk-attach--file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  max-width: 16rem;
}
html[data-theme="dark"] .lms-room-talk-attach--file {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.lms-room-talk-msg-row--mine .lms-room-talk-attach--file {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}
.lms-room-talk-attach__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.lms-room-talk-msg-row--mine .lms-room-talk-attach__icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.lms-room-talk-attach__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.lms-room-talk-attach__name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lms-room-talk-attach__hint {
  font-size: 0.6875rem;
  opacity: 0.75;
}
.lms-warshah-composer {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 4rem;
  max-height: 18.75rem;
  padding: 0.375rem 0.5rem 0.375rem 0.375rem;
  border-radius: 2rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lms-warshah-composer.is-focused {
  border-color: var(--cui-accent);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
html[data-theme="dark"] .lms-warshah-composer.is-focused {
  border-color: var(--cui-accent);
  box-shadow: 0 2px 4px rgba(34, 113, 177, 0.35);
}
.lms-warshah-composer.is-expanded {
  align-items: flex-end;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.lms-warshah-composer.is-expanded .lms-warshah-composer__attach,
.lms-warshah-composer.is-expanded .lms-warshah-composer__send {
  margin-bottom: 0.125rem;
}
html[data-theme="dark"] .lms-warshah-composer {
  background: #ffffff;
  border-color: #d1d5db;
}
.lms-warshah-composer__input {
  flex: 1;
  min-height: 3.5rem;
  max-height: 13.75rem;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1.375rem;
  color: #1f2937;
  padding: 0.875rem 0.375rem 0.875rem 0.25rem;
  margin: 0;
  font-family: inherit;
}
.lms-warshah-composer__input::placeholder {
  color: #d1d5db;
}
.lms-warshah-composer__send {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  aspect-ratio: 1;
  margin: 0 0.125rem;
  padding: 0;
  border-radius: 9999px;
  border: none;
  background: #000000;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  overflow: hidden;
  box-shadow: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.lms-warshah-composer__send:hover:not(:disabled) {
  background: #1f2937;
}
.lms-warshah-composer__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lms-room-talk-scroll-btn {
  position: absolute;
  right: calc(12.5% + 0.5rem);
  bottom: calc(100% + 0.5rem);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.lms-room-talk-scroll-btn.is-visible {
  display: inline-flex;
}
.lms-room-talk-scroll-btn:hover {
  background: #f9fafb;
}
