/* Canlı destek widget */
.chatw-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chatw-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.55);
}
.chatw-panel {
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 9997;
  width: min(100vw - 24px, 380px);
  max-height: min(560px, calc(100vh - 120px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.chatw-panel.open {
  display: flex;
}
.chatw-head {
  padding: 12px 14px;
  background: #0f172a;
  color: #f8fafc;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chatw-head button {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  line-height: 1;
}
.chatw-head button:hover {
  color: #fff;
}
.chatw-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 200px;
  max-height: 340px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chatw-msg {
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.chatw-msg-v {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.chatw-msg-a {
  align-self: flex-end;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}
.chatw-msg .t {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}
.chatw-msg img {
  max-width: 200px;
  max-height: 140px;
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
}
.chatw-msg a.chatw-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 13px;
  color: #1e40af;
}
.chatw-pre {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chatw-pre label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: block;
  margin-bottom: 4px;
}
.chatw-pre input,
.chatw-pre select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}
.chatw-pre .chatw-btn {
  margin-top: 4px;
}
.chatw-foot {
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chatw-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.chatw-foot input[type="text"] {
  flex: 1;
  padding: 9px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}
.chatw-foot input[type="file"] {
  font-size: 12px;
  max-width: 100%;
}
.chatw-btn {
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.chatw-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.chatw-btn-sec {
  background: #e2e8f0;
  color: #334155;
}
.chatw-note {
  font-size: 12px;
  color: #64748b;
  padding: 8px 12px;
  text-align: center;
}
.chatw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.chatw-backdrop.on {
  display: flex;
}
.chatw-zoom {
  max-width: min(96vw, 1000px);
  max-height: 90vh;
}
.chatw-zoom img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}
.chatw-zoom iframe {
  width: min(92vw, 900px);
  height: min(80vh, 700px);
  border: 0;
  background: #fff;
  border-radius: 8px;
}
.chatw-zoom-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}
.chatw-zoom-bar a,
.chatw-zoom-bar button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  color: #0f172a;
}
