.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}
.modal-content {
  margin: 5% auto;
  width: 90%;
  max-width: 500px;
  background: #1e1f22;
  border-radius: 4px;
  padding: 1.3em;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.3em;
}
.modal-header h2 {
  margin: 0;
}
.modal-header h2::after {
  display: none;
}
.modal-actions {
  display: flex;
  gap: 0.8em;
  margin-top: 1.3em;
}
.modal-actions button {
  flex: 1;
}

#chat-modal .modal-content {
  position: fixed;
  top: 20px;
  left: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  max-width: none;
  max-height: none;
  margin: 0;
  display: flex;
  flex-direction: column;
}
#chat-modal .modal-header {
  flex-shrink: 0;
}
#chat-modal #chat-messages {
  flex: 1;
  min-height: 0;
}
#chat-modal #chat-form {
  flex-shrink: 0;
}

#chat-messages {
  overflow-y: auto;
  padding: 1em;
  background: #313338;
  border-radius: 4px;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.7em;
}

.chat-message {
  display: flex;
}
.chat-message.you {
  justify-content: flex-end;
}
.chat-message.you .chat-bubble {
  flex-direction: row-reverse;
}
.chat-message.you .chat-bubble .chat-text {
  background: #3c4e69;
}
.chat-message.you .chat-bubble .chat-time {
  left: -30px;
}
.chat-message.other {
  justify-content: flex-start;
}
.chat-message.other .chat-bubble .chat-text {
  background: #2b2d31;
}
.chat-message.other .chat-bubble .chat-time {
  right: -30px;
  text-align: left;
}

.chat-bubble {
  display: flex;
  align-items: flex-end;
  gap: 0.3em;
}
.chat-bubble .chat-text {
  max-width: 85%;
  padding: 0.8em;
  border-radius: 12px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-bubble .chat-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
}

#chat-form {
  margin-top: 1em;
}
#chat-form .chat-input-wrapper {
  display: flex;
  gap: 0.6em;
  align-items: flex-end;
}
#chat-form .chat-input-wrapper #chat-message-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  font-size: 16px;
}
/* アイコン縦並びカラム（管理者用） */
#chat-form .chat-input-wrapper .chat-icon-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#chat-form .chat-input-wrapper .btn-icon-only {
  padding: 0;
  min-width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}
#chat-form .chat-input-wrapper .btn-icon-only .material-icons {
  font-size: 18px;
  color: #fff;
}
#chat-form .chat-input-wrapper .btn-icon-only:hover .material-icons {
  color: #b5bac1;
}
/* ユーザー用（カメラのみ） */
#chat-form .chat-input-wrapper .btn-image {
  padding: 0;
  min-width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}
#chat-form .chat-input-wrapper .btn-image .material-icons {
  font-size: 18px;
  color: #fff;
}
#chat-form .chat-input-wrapper .btn-image:hover .material-icons {
  color: #b5bac1;
}
#chat-form .chat-input-wrapper .btn-add-item {
  padding: 0.8em 1em;
}
/* ユーザー用発言状態インジケーター */
#chat-form .chat-input-wrapper .chat-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  cursor: default;
}
#chat-form .chat-input-wrapper .chat-status-indicator .material-icons {
  font-size: 18px;
  color: #fff;
}
#chat-form .chat-input-wrapper .chat-status-indicator.allowed .material-icons {
  color: #4CAF50;
}
#chat-form .chat-input-wrapper .chat-status-indicator.disabled .material-icons {
  color: #f44336;
}

.message-context-menu {
  position: fixed;
  background: #1e1f22;
  border: 1px solid #3f4147;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  min-width: 120px;
  overflow: hidden;
  display: none;
}
.message-context-menu.show {
  display: block;
}
.message-context-menu .menu-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}
.message-context-menu .menu-item:hover {
  background: #3f4147;
}
.message-context-menu .menu-item.delete {
  color: #ed4245;
}
.message-context-menu .menu-item.delete:hover {
  background: rgba(237, 66, 69, 0.1);
}

.chat-message.long-pressing .chat-text {
  opacity: 0.7;
  transform: scale(0.98);
  transition: all 0.15s;
}/*# sourceMappingURL=chat.css.map */