/* Chat Widget Styles */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 2000;
  overflow: hidden;
}

.chat-widget.active {
  display: flex;
}

.chat-header {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-close,
.chat-logout {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.chat-close:hover,
.chat-logout:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chat-logout svg {
  width: 16px;
  height: 16px;
}

.chat-close svg {
  width: 16px;
  height: 16px;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f5f5f5;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
}

.chat-message.user {
  align-self: flex-end;
  background: #dcf8c6;
  color: #333;
}

.chat-message.admin {
  align-self: flex-start;
  background: #fff;
  color: #333;
  border: 1px solid #e0e0e0;
}

.chat-message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.chat-input-area {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.chat-input:focus {
  border-color: #25d366;
}

.chat-send {
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.chat-send:hover {
  background: #128c7e;
}

.chat-send:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.chat-send svg {
  width: 18px;
  height: 18px;
}

.name-form {
  padding: 40px 20px;
  text-align: center;
}

.name-form h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #333;
}

.name-form > div {
  margin-bottom: 16px;
}

.name-form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.name-form input:focus {
  border-color: #25d366;
}

.name-form input.error {
  border-color: #ea4335;
}

.error-message {
  display: none;
  font-size: 12px;
  color: #ea4335;
  margin-top: 4px;
  text-align: left;
}

.name-form button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.name-form button:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .chat-widget {
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .chat-header {
    border-radius: 0;
  }
}

