/* ========== RESET (lekki) ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Marcellus, sans-serif;
  background: #151515;
  color: #f9fafb;
}
/* bąbelek z trzema kropkami */
.message-row.typing .message-bubble {
  background: #262626;
  border: 1px solid #3a3a3a;
  color: #fff;
  border-bottom-left-radius: 0;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #9ca3af;
  animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* ========== ZMIANA KOLORU NAGŁÓWKA WP ========== */

.edgtf-title-holder .edgtf-title-subtitle-holder h2,
.edgtf-title-holder .edgtf-page-title {
  color: #fff;
}

/* ========== ZMIENNE ========== */

:root {
  --bg-color: #050714;
  --panel-bg: #050815;
  --chat-bg: #020617;
  --user-msg-bg: #4f46e5;
  --ai-msg-bg: #111827;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

/* ========== LAYOUT GŁÓWNY ========== */

.adventure-shell {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
}

.adventure-shell.chat-only {
  display: block;
}

.adventure-shell.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .adventure-shell.two-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========== PANEL CZATU ========== */

.chat-panel {
  background: rgba(13, 13, 13, 0.92);
  border-radius: 0;
  padding: 32px 30px 24px;
  border: 1px solid #3a3a3a;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

/* nagłówek */

.chat-header {
  margin-bottom: 10px;
}

.chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

.chat-title {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 700;
}

.chat-title span {
  color: #f5f5f5;
  font-family: Marcellus, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== OKNO CZATU (lista wiadomości) ========== */

/* Używamy ID z HTML/JS: #chat-window */
#chat-window {
  margin-top: 24px;
  flex: 1;
  background: #1c1c1c;
  border-radius: 0;
  border: 1px solid #3a3a3a;
  padding: 18px 16px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* wiersz z wiadomością */

.message-row {
  display: flex;
  margin-bottom: 8px;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.gm {
  justify-content: flex-start;
}

.message-row.system {
  justify-content: center;
}

/* etykieta "Garret", "Game Master" */

.message-name {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 2px;
}

/* sam bąbelek */

.message-bubble {
  max-width: 80%;
  padding: 9px 11px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

/* kolory bąbelków */

.message-row.user .message-bubble {
  background-image: url(https://lightsalmon-hedgehog-870651.hostingersite.com/wp-content/uploads/2017/06/sidearea-background.jpg);
  color: #fff;
  border-bottom-right-radius: 0;
}

.message-row.gm .message-bubble {
  background: #262626;
  border: 1px solid #3a3a3a;
  color: #fff;
  border-bottom-left-radius: 0;
}

.message-row.system .message-bubble {
  background: transparent;
  color: var(--text-muted);
  font-style: italic;
}

/* ========== PASEK INPUTU ========== */

/* wrapper pod input i przycisk – dopasuj do struktury HTML; 
   jeśli masz <div class="chat-input-bar">, zostaw tak,
   jeśli tylko #chat-input-row, użyj tego niżej. */

.chat-input-bar,
#chat-input-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* input (id z HTML: #chat-input) */

#chat-input,
.chat-input {
  flex: 1;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
}

#chat-input::placeholder,
.chat-input::placeholder {
  color: var(--text-muted);
}

/* przycisk wysyłania (id + klasa) */

#send-btn,
.btn-send {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background-color: #3a3a3a;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: Marcellus, sans-serif;
  cursor: pointer;
  transition: background-color 0.18s ease-out;
}

#send-btn:hover,
.btn-send:hover {
  background-color: #9b7bb8;
}

/* ========== PANEL POSTACI (na przyszłość) ========== */

.sidebar-panel {
  background: var(--panel-bg);
  border-radius: 24px;
  padding: 18px 16px 16px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.character-name {
  font-size: 18px;
  font-weight: 700;
}

.character-class {
  font-size: 13px;
  color: var(--text-muted);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag-pill {
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}
/* === Wymuszenie styli tylko w sekcji Tale Weaver === */

/* całe pudełko czatu */
.wpb_wrapper .adventure-shell.chat-only .chat-panel {
  background: rgba(13, 13, 13, 0.92) !important;
  border: 1px solid #3a3a3a !important;
  padding: 32px 30px 24px !important;
}

/* okno z wiadomościami */
.wpb_wrapper .adventure-shell.chat-only #chat-window {
  margin-top: 24px !important;
  flex: 1 !important;
  background: #1c1c1c !important;
  border-radius: 0 !important;
  border: 1px solid #3a3a3a !important;
  padding: 18px 16px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* pasek inputu */
.wpb_wrapper .adventure-shell.chat-only .chat-input-bar {
  margin-top: 10px !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

/* input */
.wpb_wrapper .adventure-shell.chat-only #chat-input {
  flex: 1 !important;
  border-radius: var(--radius-pill) !important;
  border: 1px solid rgba(148, 163, 184, 0.6) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: var(--text-main) !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
  outline: none !important;
}

.wpb_wrapper .adventure-shell.chat-only #chat-input::placeholder {
  color: var(--text-muted) !important;
}

/* przycisk */
.wpb_wrapper .adventure-shell.chat-only #send-btn {
  padding: 8px 16px !important;
  border-radius: var(--radius-pill) !important;
  border: none !important;
  background-color: #3a3a3a !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-family: Marcellus, sans-serif !important;
  cursor: pointer !important;
}

.wpb_wrapper .adventure-shell.chat-only #send-btn:hover {
  background-color: #9b7bb8 !important;
}

/* bąbelki + etykiety */
.wpb_wrapper .adventure-shell.chat-only .message-row {
  display: flex !important;
  margin-bottom: 8px !important;
}

.wpb_wrapper .adventure-shell.chat-only .message-row.user {
  justify-content: flex-end !important;
}

.wpb_wrapper .adventure-shell.chat-only .message-row.gm {
  justify-content: flex-start !important;
}

.wpb_wrapper .adventure-shell.chat-only .message-name {
  font-size: 11px !important;
  color: #aaa !important;
  margin-bottom: 2px !important;
}

.wpb_wrapper .adventure-shell.chat-only .message-bubble {
  max-width: 80% !important;
  padding: 9px 11px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.wpb_wrapper .adventure-shell.chat-only .message-row.user .message-bubble {
  background-image: url(https://lightsalmon-hedgehog-870651.hostingersite.com/wp-content/uploads/2017/06/sidearea-background.jpg) !important;
  color: #fff !important;
  border-bottom-right-radius: 0 !important;
}

.wpb_wrapper .adventure-shell.chat-only .message-row.gm .message-bubble {
  background: #262626 !important;
  border: 1px solid #3a3a3a !important;
  color: #fff !important;
  border-bottom-left-radius: 0 !important;
}
/* FORCE: tylko sekcja /game, nadpisuje motyw Eldritch */
body.page-id-44 .adventure-shell.chat-only .chat-panel {
  background: rgba(13, 13, 13, 0.92) !important;
  border: 1px solid #3a3a3a !important;
  padding: 32px 30px 24px !important;
}

/* okno czatu */
body.page-id-44 .adventure-shell.chat-only #chat-window {
  margin-top: 24px !important;
  flex: 1 !important;
  background: #1c1c1c !important;
  border-radius: 0 !important;
  border: 1px solid #3a3a3a !important;
  padding: 18px 16px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* pasek inputu */
body.page-id-44 .adventure-shell.chat-only .chat-input-bar {
  margin-top: 10px !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

/* input */
body.page-id-44 .adventure-shell.chat-only #chat-input {
  flex: 1 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.6) !important;
  background: #020617 !important;
  color: #f9fafb !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
  outline: none !important;
}

body.page-id-44 .adventure-shell.chat-only #chat-input::placeholder {
  color: #9ca3af !important;
}

/* przycisk */
body.page-id-44 .adventure-shell.chat-only #send-btn {
  padding: 8px 16px !important;
  border-radius: 999px !important;
  border: none !important;
  background-color: #3a3a3a !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-family: Marcellus, sans-serif !important;
  cursor: pointer !important;
}

body.page-id-44 .adventure-shell.chat-only #send-btn:hover {
  background-color: #9b7bb8 !important;
}

/* bąbelki + imiona */
body.page-id-44 .adventure-shell.chat-only .message-row {
  display: flex !important;
  margin-bottom: 8px !important;
}

body.page-id-44 .adventure-shell.chat-only .message-row.user {
  justify-content: flex-end !important;
}

body.page-id-44 .adventure-shell.chat-only .message-row.gm {
  justify-content: flex-start !important;
}

body.page-id-44 .adventure-shell.chat-only .message-name {
  font-size: 11px !important;
  color: #aaa !important;
  margin-bottom: 2px !important;
}

body.page-id-44 .adventure-shell.chat-only .message-bubble {
  max-width: 80% !important;
  padding: 9px 11px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

body.page-id-44 .adventure-shell.chat-only .message-row.user .message-bubble {
  background-image: url(https://lightsalmon-hedgehog-870651.hostingersite.com/wp-content/uploads/2017/06/sidearea-background.jpg) !important;
  color: #fff !important;
  border-bottom-right-radius: 0 !important;
}

body.page-id-44 .adventure-shell.chat-only .message-row.gm .message-bubble {
  background: #262626 !important;
  border: 1px solid #3a3a3a !important;
  color: #fff !important;
  border-bottom-left-radius: 0 !important;
}
/* Schowaj stary call-to-action chat z motywu na stronie /game */
body.page-id-44 .edgtf-call-to-action-holder,
body.page-id-44 .edgtf-call-to-action {
  display: none !important;
}
/* 1. Ogranicz szerokość bąbelków i dociśnij je do środka */
body.page-id-44 .adventure-shell.chat-only #chat-window {
  align-items: flex-start;        /* domyślnie */
}

body.page-id-44 .adventure-shell.chat-only .message-row.user {
  justify-content: flex-end;
}

body.page-id-44 .adventure-shell.chat-only .message-bubble {
  max-width: 60%;                 /* było 80%, bąbelki będą krótsze */
}

/* 2. Delikatne odsunięcie podpisów od krawędzi */
body.page-id-44 .adventure-shell.chat-only .message-row.user {
  padding-right: 24px;
}

body.page-id-44 .adventure-shell.chat-only .message-row.gm {
  padding-left: 24px;
}

/* 3. Mniejsze odstępy w pionie */
body.page-id-44 .adventure-shell.chat-only .message-row {
  margin-bottom: 6px;
}
