/* Sylo Site Asistanı — widget stilleri (Lara IDE'den bağımsız) */

#sylo-asistan-root {
  --sa-blue: #0066ff;
  --sa-violet: #7c3aed;
  --sa-bg: #ffffff;
  --sa-text: #0f172a;
  --sa-muted: #64748b;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  z-index: 99990;
}

#sylo-asistan-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--sa-blue), var(--sa-violet));
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 102, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 99991;
}

#sylo-asistan-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 102, 255, 0.45);
}

#sylo-asistan-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: min(400px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: var(--sa-bg);
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99992;
}

#sylo-asistan-panel.open {
  display: flex;
}

.sa-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #0066ff 0%, #5b21b6 100%);
  color: #fff;
  flex-shrink: 0;
}

.sa-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.sa-header p {
  margin: 4px 0 0;
  font-size: 11px;
  opacity: 0.85;
}

.sa-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  min-height: 0;
}

.sa-messages.sa-messages-compact {
  flex: 0 1 38%;
  max-height: 38%;
  border-bottom: 1px solid #e2e8f0;
}

.sa-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.sa-msg.user {
  align-self: flex-end;
  background: var(--sa-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.sa-msg.bot {
  align-self: flex-start;
  background: #fff;
  color: var(--sa-text);
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.sa-msg.bot a {
  color: var(--sa-blue);
  text-decoration: underline;
}

.sa-msg-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
  max-width: 95%;
  margin: -4px 0 4px 0;
}

.sa-cta-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0066ff, #5b21b6);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25);
}

.sa-cta-chip:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.sa-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fffbeb;
}

.sa-support-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b45309;
  margin-right: 4px;
}

.sa-support-btn {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #fcd34d;
  background: #fff;
  color: #92400e;
  text-decoration: none;
}

.sa-support-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.sa-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.sa-quick button {
  font-size: 10px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--sa-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.sa-quick button:hover {
  border-color: var(--sa-blue);
  color: var(--sa-blue);
  background: #eff6ff;
}

.sa-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.sa-input-row input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
}

.sa-input-row input:focus {
  border-color: var(--sa-blue);
}

.sa-input-row button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--sa-blue);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.sa-form {
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #f8fafc;
}

.sa-form.open {
  display: flex;
}

.sa-form label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sa-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sa-form input,
.sa-form textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  box-sizing: border-box;
}

.sa-form textarea {
  min-height: 80px;
  resize: vertical;
}

.sa-form-actions {
  display: flex;
  gap: 8px;
}

.sa-form-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.sa-btn-primary {
  background: var(--sa-blue);
  color: #fff;
}

.sa-btn-ghost {
  background: #fff;
  color: var(--sa-muted);
  border: 1px solid #e2e8f0 !important;
}

.sa-kvkk {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: var(--sa-muted);
  line-height: 1.4;
}

.sa-kvkk input {
  width: auto;
  margin-top: 2px;
}

.sa-typing {
  font-size: 12px;
  color: var(--sa-muted);
  padding: 4px 14px;
  display: none;
}

.sa-typing.show {
  display: block;
}

@media (max-width: 480px) {
  #sylo-asistan-panel {
    right: 12px;
    bottom: 88px;
    width: calc(100vw - 24px);
  }
  #sylo-asistan-toggle {
    right: 16px;
    bottom: 16px;
  }
}
