/* ==========================================================================
   easyJet asistent — tema: light (default) + dark, preko [data-theme]
   Boje: 60% neutralna baza, 30% tamna/svijetla površina, 10% #FF6600 akcent
   Tipografija: Anton (jedini display font, samo hero naslov), Poppins (sve ostalo)
   Razmak: baza 8px
   ========================================================================== */

:root,
:root[data-theme="light"] {
  --bg: #F7F5F2;
  --surface: #FFFFFF;
  --surface-border: #EEEBE5;
  --text: #14181F;
  --text-muted: #8A8577;
  --accent: #FF6600;
  --accent-contrast: #FFFFFF;
  --bubble-bot-bg: #FFFFFF;
  --bubble-bot-text: #14181F;
  --bubble-user-bg: #FF6600;
  --bubble-user-text: #FFFFFF;
  --input-bg: #F7F5F2;
  --input-border: #D8D4CC;
  --footer-bg: #F1EEE8;
  --chip-bg: #FFFFFF;
  --chip-border: #FF6600;
  --chip-text: #FF6600;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.08);
  --ring-accent: rgba(255, 102, 0, 0.28);
}

:root[data-theme="dark"] {
  --bg: #10131A;
  --surface: #1B212C;
  --surface-border: #2A3140;
  --text: #F2F2F2;
  --text-muted: #8891A3;
  --accent: #FF6600;
  --accent-contrast: #FFFFFF;
  --bubble-bot-bg: #1B212C;
  --bubble-bot-text: #F2F2F2;
  --bubble-user-bg: #FF6600;
  --bubble-user-text: #FFFFFF;
  --input-bg: #1B212C;
  --input-border: #2A3140;
  --footer-bg: #14181F;
  --chip-bg: #1B212C;
  --chip-border: #2A3140;
  --chip-text: #E7E7E7;
  --shadow: none;
  --ring-accent: rgba(255, 102, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ---------- Header (namjerno van centra: tekst uz lijevu ivicu) ---------- */

.header {
  position: relative;
  flex-shrink: 0;
  padding: 28px 72px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  font-family: "Anton", "Poppins", sans-serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  max-width: 280px;
}

.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Prozor sa porukama ---------- */

.chat-window {
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 24px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  max-width: 82%;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.45;
}

.bubble-bot {
  align-self: flex-start;
  background: var(--bubble-bot-bg);
  color: var(--bubble-bot-text);
  border-radius: 18px 18px 18px 4px;
  box-shadow: var(--shadow);
}

.bubble-user {
  align-self: flex-end;
  background: var(--bubble-user-bg);
  color: var(--bubble-user-text);
  font-weight: 500;
  border-radius: 18px 18px 4px 18px;
}

.bubble-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 14px 18px;
  background: var(--bubble-bot-bg);
  border-radius: 18px 18px 18px 4px;
  box-shadow: var(--shadow);
}

.bubble-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: bounce 1.2s infinite ease-in-out;
}

.bubble-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.bubble-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ---------- Brza pitanja (traka koja "krvari" preko desne ivice) ---------- */

.quick-questions {
  flex-shrink: 0;
  padding: 8px 0 12px 28px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-questions::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.chip:last-child {
  margin-right: 28px;
}

.chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  transform: translateY(-1px);
}

.chip:focus-visible,
.theme-toggle:focus-visible,
.send-btn:focus-visible,
#chat-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Polje za unos ---------- */

.input-row {
  flex-shrink: 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-top: 1px solid var(--surface-border);
}

#chat-input {
  flex-grow: 1;
  height: 48px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 0 16px;
  border-radius: 24px;
  outline: none;
}

#chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---------- Podnožje ---------- */

.disclaimer {
  flex-shrink: 0;
  background: var(--footer-bg);
  padding: 10px 24px 18px 24px;
}

.disclaimer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (min-width: 481px) {
  body {
    background: var(--footer-bg);
  }

  .app {
    margin: 24px auto;
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(20, 24, 31, 0.18);
  }
}
