/* SKYPK staff chat v1 */
#skypk-staff-chat {
  --chat-bg: #111116;
  --chat-panel: #17171f;
  --chat-border: rgba(255,255,255,.1);
  --chat-muted: #9999a8;
  color: #f3f3f7;
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  position: fixed;
  z-index: 1000;
  right: 24px;
  bottom: 22px;
}
#skypk-staff-chat[hidden],
#skypk-staff-chat [hidden] { display: none !important; }
#skypk-staff-chat button,
#skypk-staff-chat textarea { font: inherit; }
#skypk-staff-chat button { cursor: pointer; }
.skypk-chat-launcher {
  align-items: center;
  background: #e11d2e;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  color: white;
  display: flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  min-width: 104px;
  padding: 0 16px;
  transition: transform .16s ease, background .16s ease;
}
.skypk-chat-launcher:hover { background: #c91627; transform: translateY(-2px); }
.skypk-chat-launcher svg {
  fill: none; height: 20px; stroke: currentColor; stroke-linecap: round;
  stroke-linejoin: round; stroke-width: 1.8; width: 20px;
}
.skypk-chat-unread {
  background: white; border-radius: 50%; height: 8px; width: 8px;
}
.skypk-chat-panel {
  background: var(--chat-panel);
  border: 1px solid var(--chat-border);
  border-radius: 16px;
  bottom: 60px;
  box-shadow: 0 20px 70px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  height: min(540px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(370px, calc(100vw - 28px));
}
.skypk-chat-header {
  align-items: center; background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--chat-border); display: flex;
  justify-content: space-between; min-height: 60px; padding: 10px 14px;
}
.skypk-chat-header strong { display: block; font-size: 14px; }
.skypk-chat-header small { color: var(--chat-muted); font-size: 11px; }
.skypk-chat-close {
  background: transparent; border: 0; border-radius: 8px; color: var(--chat-muted);
  font-size: 25px !important; line-height: 1; padding: 4px 9px;
}
.skypk-chat-close:hover { background: rgba(255,255,255,.07); color: white; }
.skypk-chat-messages {
  display: flex; flex: 1; flex-direction: column; gap: 11px;
  overflow-y: auto; overscroll-behavior: contain; padding: 14px;
}
.skypk-chat-message { min-width: 0; }
.skypk-chat-meta {
  align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px;
}
.skypk-chat-meta strong { color: #fff; font-size: 12px; }
.skypk-chat-role { color: #e87986; font-size: 10px; }
.skypk-chat-meta time { color: #777785; font-size: 10px; margin-left: auto; }
.skypk-chat-body {
  background: rgba(255,255,255,.045); border-radius: 4px 11px 11px 11px;
  color: #e2e2e9; margin-top: 4px; overflow-wrap: anywhere;
  padding: 8px 10px; white-space: pre-wrap;
}
.skypk-chat-error {
  background: rgba(225,29,46,.12); color: #ff929d;
  margin: 0 12px 8px; padding: 7px 9px; border-radius: 8px;
}
.skypk-chat-form {
  align-items: flex-end; border-top: 1px solid var(--chat-border);
  display: flex; gap: 8px; padding: 10px;
}
.skypk-chat-form textarea {
  background: var(--chat-bg); border: 1px solid var(--chat-border);
  border-radius: 10px; color: white; flex: 1; min-height: 38px;
  max-height: 112px; outline: none; padding: 9px 10px; resize: vertical;
}
.skypk-chat-form textarea:focus { border-color: rgba(225,29,46,.65); }
.skypk-chat-form button {
  background: #e11d2e; border: 0; border-radius: 9px; color: white;
  font-size: 11px; font-weight: 700; min-height: 36px; padding: 0 10px;
}
.skypk-chat-form button:disabled { cursor: wait; opacity: .55; }
.skypk-chat-hint { color: #777785; font-size: 10px; padding: 0 12px 9px; }
@media (max-width: 560px) {
  #skypk-staff-chat { bottom: 12px; right: 12px; }
  .skypk-chat-panel { bottom: 58px; height: min(68vh, 540px); }
}
@media (prefers-reduced-motion: reduce) {
  .skypk-chat-launcher { transition: none; }
}
