/* PRODEXA destek sohbet widget (Luca tarzı) */
:root {
  --px-chat-green: #72c02c;
  --px-chat-green-dark: #5fa824;
  --px-chat-navy: #1f2937;
  --px-chat-panel: #243044;
  --px-chat-bubble: #2d3748;
}

.px-chat {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  font-family: "PT Sans", "Plus Jakarta Sans", system-ui, sans-serif;
}

.px-chat__fab {
  position: relative;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 0 0 3px rgba(126, 200, 255, 0.55),
    0 12px 28px rgba(15, 60, 120, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
  overflow: visible;
}

.px-chat__fab:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 0 4px rgba(126, 200, 255, 0.7),
    0 14px 32px rgba(15, 60, 120, 0.5);
}

.px-chat__fab-face {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  overflow: hidden;
}

.px-chat__fab-icon {
  width: 78px;
  height: 78px;
  display: block;
}

.px-chat__fab-close {
  display: none;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(160deg, #3aa0ea 0%, #1e78d1 45%, #0f5fb8 100%);
  border: 3px solid #7ec8ff;
  font-size: 2rem;
  line-height: 72px;
  font-weight: 300;
  color: #fff;
  text-align: center;
}

.px-chat.is-open .px-chat__fab-face { display: none; }
.px-chat.is-open .px-chat__fab-close { display: block; }

.px-chat__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.75);
  z-index: 2;
}

.px-chat.is-open .px-chat__badge,
.px-chat.is-seen .px-chat__badge {
  display: none;
}

.px-chat__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(360px, calc(100vw - 1.5rem));
  height: min(520px, calc(100dvh - 6rem));
  display: none;
  flex-direction: column;
  background: var(--px-chat-navy);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.px-chat.is-open .px-chat__panel {
  display: flex;
}

.px-chat__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  background: var(--px-chat-green);
  color: #fff;
}

.px-chat__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--px-chat-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.px-chat__avatar svg { width: 20px; height: 20px; }

.px-chat__title {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.px-chat__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.px-chat__body {
  flex: 1;
  overflow: auto;
  padding: 0.9rem;
  background: var(--px-chat-panel);
}

.px-chat__msg {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.px-chat__msg--user {
  flex-direction: row-reverse;
}

.px-chat__msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: var(--px-chat-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.px-chat__msg-avatar svg { width: 16px; height: 16px; }

.px-chat__bubble {
  max-width: 82%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: var(--px-chat-bubble);
  color: #e5e7eb;
  font-size: 0.875rem;
  line-height: 1.45;
}

.px-chat__msg--user .px-chat__bubble {
  background: #374151;
  color: #fff;
}

.px-chat__quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0.25rem 0 0.75rem;
}

.px-chat__quick button {
  border: 0;
  border-radius: 10px;
  background: var(--px-chat-green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.65rem 0.45rem;
  cursor: pointer;
  line-height: 1.25;
}

.px-chat__quick button:hover {
  background: var(--px-chat-green-dark);
}

.px-chat__foot {
  padding: 0.7rem 0.75rem 0.55rem;
  background: var(--px-chat-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.px-chat__form {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.px-chat__input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--px-chat-green);
  border-radius: 10px;
  background: #111827;
  color: #fff;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
}

.px-chat__input::placeholder { color: #9ca3af; }
.px-chat__input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(114, 192, 44, 0.35);
}

.px-chat__send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #1e3a5f;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.px-chat__send:hover { background: #254a78; }
.px-chat__send:disabled { opacity: 0.55; cursor: wait; }

.px-chat__disclaimer {
  margin: 0.45rem 0 0;
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .px-chat { right: 0.75rem; bottom: 0.75rem; }
  .px-chat__panel {
    width: calc(100vw - 1.5rem);
    height: min(70dvh, 540px);
  }
}
