/* =========================================================
   LUFTHANSA-INSPIRED CHAT UI
   Samo CSS — nije potrebno mijenjati index.html ni app.js
   ========================================================= */

* {
  box-sizing: border-box;
}

:root {
  --navy: #05164d;
  --navy-2: #0b2c6f;
  --blue: #173e8f;
  --yellow: #f9c80e;
  --yellow-soft: #fff6c7;

  --bg: #eef3f9;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #182033;
  --muted: #6d778d;
  --line: #dce3ef;

  --shadow-sm: 0 8px 24px rgba(5, 22, 77, 0.08);
  --shadow-md: 0 20px 50px rgba(5, 22, 77, 0.13);

  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

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

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(249, 200, 14, 0.13), transparent 19rem),
    radial-gradient(circle at left 30%, rgba(23, 62, 143, 0.07), transparent 25rem),
    linear-gradient(180deg, #f7f9fd 0%, var(--bg) 100%);
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--yellow);
  color: var(--navy);
}

/* APP */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.app-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--navy) 0%, #08215f 52%, var(--blue) 100%);
  box-shadow: 0 12px 30px rgba(5, 22, 77, 0.22);
}

.app-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), rgba(249, 200, 14, 0.15));
}

.app-header::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -90px;
  top: -105px;
  border-radius: 50%;
  border: 26px solid rgba(249, 200, 14, 0.14);
}

.brand-mark {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.app-header > div:last-child {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(1.08rem, 4vw, 1.68rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* MAIN */
.chat-card {
  width: min(100%, 940px);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 18px;
}

/* INTRO */
.intro {
  position: relative;
  overflow: hidden;
  padding: 19px 18px 19px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--yellow);
}

.intro h2 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* QUICK QUESTIONS */
.quick-questions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin: 14px 0;
}

.quick-btn {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 12px 44px 12px 14px;
  text-align: left;

  color: var(--navy);
  font-weight: 700;
  line-height: 1.3;

  border: 1px solid #d4deef;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: var(--shadow-sm);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.quick-btn::after {
  content: "→";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);

  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;

  border-radius: 50%;
  color: var(--navy);
  background: var(--yellow);
  font-weight: 900;
}

.quick-btn:hover {
  transform: translateY(-2px);
  border-color: #afc1e7;
  box-shadow: 0 14px 30px rgba(5, 22, 77, 0.12);
}

.quick-btn:active {
  transform: translateY(0);
}

.quick-btn:focus-visible {
  outline: 3px solid rgba(249, 200, 14, 0.42);
  outline-offset: 2px;
}

.quick-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

/* CHAT MESSAGES */
.messages {
  flex: 1;
  min-height: 340px;
  max-height: 56vh;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 12px;

  padding: 15px;

  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
    radial-gradient(circle at 15% 15%, rgba(249, 200, 14, 0.08), transparent 15rem);

  box-shadow: var(--shadow-md);

  scrollbar-width: thin;
  scrollbar-color: #b9c4d7 transparent;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  background: #b9c4d7;
  border-radius: 999px;
}

.message {
  position: relative;
  max-width: 88%;
  padding: 12px 14px;

  border-radius: 18px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  box-shadow: 0 6px 16px rgba(5, 22, 77, 0.06);
  animation: messageIn 0.22s ease both;
}

.message.assistant {
  align-self: flex-start;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.message.assistant::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  width: 3px;
  height: calc(100% - 24px);
  border-radius: 999px;
  background: var(--yellow);
}

.message.user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, #0a2768, var(--blue));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom-right-radius: 6px;
}

/* TYPING */
.typing {
  align-self: flex-start;
  width: fit-content;
  margin: 10px 2px 0;
  padding: 9px 12px;

  color: var(--navy);
  background: var(--yellow-soft);
  border: 1px solid #f2dfa2;
  border-radius: 999px;

  font-size: 0.87rem;
  font-weight: 700;
  animation: pulse 1.15s ease-in-out infinite;
}

/* INPUT */
.chat-form {
  position: sticky;
  bottom: 0;
  z-index: 5;

  display: flex;
  align-items: end;
  gap: 9px;

  padding-top: 12px;

  background:
    linear-gradient(
      180deg,
      rgba(238, 243, 249, 0) 0%,
      rgba(238, 243, 249, 0.94) 38%,
      rgba(238, 243, 249, 1) 100%
    );
}

#message-input {
  width: 100%;
  min-height: 52px;
  max-height: 130px;

  resize: none;
  padding: 14px 15px;

  color: var(--text);
  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;

  box-shadow: var(--shadow-sm);

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

#message-input::placeholder {
  color: #98a1b4;
}

#message-input:focus {
  border-color: #9db2dd;
  box-shadow:
    0 0 0 4px rgba(249, 200, 14, 0.18),
    var(--shadow-sm);
}

#send-button {
  min-height: 52px;
  padding: 0 19px;

  border: 0;
  border-radius: 18px;

  color: var(--navy);
  background: var(--yellow);

  font-weight: 850;

  box-shadow: 0 10px 24px rgba(183, 143, 0, 0.23);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

#send-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 14px 28px rgba(183, 143, 0, 0.27);
}

#send-button:active {
  transform: translateY(0);
}

#send-button:focus-visible {
  outline: 3px solid rgba(249, 200, 14, 0.42);
  outline-offset: 2px;
}

#send-button:disabled,
#message-input:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

/* FOOTER */
.app-footer {
  margin-top: auto;
  padding: 14px 16px;

  text-align: center;
  color: #d9e3f6;
  background: var(--navy);

  border-top: 3px solid var(--yellow);

  font-size: 0.78rem;
  line-height: 1.5;
}

/* ACCESSIBILITY */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ANIMATIONS */
@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.72;
  }

  50% {
    opacity: 1;
  }
}

/* TABLET */
@media (min-width: 640px) {
  .app-header {
    padding: 20px 28px;
  }

  .chat-card {
    padding: 24px 20px 22px;
  }

  .quick-questions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .messages {
    min-height: 390px;
    padding: 18px;
  }

  .message {
    max-width: 74%;
  }
}

/* DESKTOP */
@media (min-width: 960px) {
  .chat-card {
    padding-top: 28px;
  }

  .intro {
    padding: 22px 24px 22px 27px;
  }

  .quick-btn {
    min-height: 58px;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
