:root {
  --white: #fff;
  --bg: #f6fafc;
  --accent: #8DBF47;
  --accent-hover: #71933E;
  --text: #1f2937;
  --muted: #7b8694;
  --shadow: 0 8px 32px 0 rgba(80, 120, 100, 0.11);
}

body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  /* background: var(--bg);  <-- TOTO VYMAŽ! */
  font-family: 'Nunito Sans', Arial, sans-serif;
}

.chat-container {
  width: 100vw;
  height: calc(100vh - 140px); /* 70px footer + 70px horná medzera */
  display: flex;
  flex-direction: column;
  opacity: 0.80;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #000000;

  margin-top: 90px;   /* rovnako veľká medzera ako footer */
  margin-bottom: 90px;
}

.logo-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
  margin-top: 22px;      /* priestor od vrchu karty */
}

.company-logo {
  max-width: 240px;     /* väčšie logo */
  max-height: 62px;     /* môžeš zväčšiť podľa loga */
  object-fit: contain;
  display: block;
}

.chat-card {
  width: 90%; /* Use percentage so it scales on smaller screens */
  max-width: 920px; /* Keep your original max for large screens */
  min-width: min(480px, 90vw); /* Prevents going wider than the viewport */
  min-height: min(720px, 90vh); /* Avoids cutting off on small screens */

  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 32px;
  position: relative;
}

.chat-log {
  flex: 1 1 auto;
  max-height: calc(100vh - 200px); /* Adjust dynamically to viewport height */
  min-height: 180px; /* Allow smaller height on small devices */
  overflow-y: auto;
  padding: 40px 32px 16px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: transparent;
}

/* Additional mobile adjustments */
@media (max-width: 600px) {
  .chat-card {
    min-width: 90vw; /* Shrink for narrow devices */
    min-height: 80vh; /* Take most of screen height */
    border-radius: 12px;
  }

  .chat-log {
    padding: 20px 16px 12px 16px; /* Reduce padding for mobile */
    gap: 12px;
  }
}



.chat-bubble {
  max-width: 92%;
  padding: 15px 19px;
  border-radius: 16px;
  font-size: 1.13em;
  line-height: 1.48em;
  word-break: break-word;
  background: #f3f7ee;
  color: var(--text);
  box-shadow: 0 2px 9px 0 rgba(140,180,100,0.03);
  width: fit-content;
  opacity: 0.95;
  margin-bottom: 2px;
  transition: background .13s;
}
.chat-bubble.user {
  background: linear-gradient(98deg, #e8fbe2 60%, #c6efb4 100%);
  align-self: flex-end;
  color: #000000;
}
.chat-bubble.bot {
  background: #f7faf3;
  align-self: flex-start;
  color: #000000
}

#chatForm {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  margin-top: 8px;
  color: var(--text);
}

.chat-input {
  flex: 1;
  border: none;
  border-bottom: 2px solid #bcd8ae;
  outline: none;
  font-size: 1.15em;
  padding: 14px 4px 10px 0;
  color: var(--text);
  background: transparent;
  transition: border-color .14s;
  font-family: inherit;
}
.chat-input:focus {
  border-bottom: 2.5px solid var(--accent);
  background: transparent;
}

.chat-send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.35em;
  cursor: pointer;
  box-shadow: 0 4px 16px 0 rgba(141,191,71,0.07);
  transition: background .18s, transform .13s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.send-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);  /* ak chceš ikonku bielu */
}

.chat-send-btn:hover, .chat-send-btn:focus {
  background: var(--accent-hover);
  transform: scale(1.09);
  outline: none;
}

.footer {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100vw;
  text-align: right;
  font-size: 1.09em;
  color: #a3a7ac;
  padding: 16px 32px 14px 0;
  background: transparent;
  letter-spacing: .01em;
  z-index: 100;
  box-sizing: border-box;
}
.footer strong a {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.16s;
}
.footer strong a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}


@media (max-width: 600px) {
  .chat-card { max-width: 99vw; border-radius: 10px; }
  .chat-log { padding: 18px 7px 4px 7px; }
  #chatForm { padding: 0 6px; }
  .logo-bar { margin-bottom: 10px; }
}

.chat-container, .footer {
  position: relative;
  z-index: 1;
}

.bg-image {
  position: fixed;
  inset: 0;                 /* top/right/bottom/left: 0 */
  width: 100vw;
  height: 100vh;            /* or 100dvh for mobile address bars */
  object-fit: cover;        /* fill and crop as needed */
  object-position: 90%;  /* stred horizontálne aj vertikálne */
  z-index: 0;               /* keep other content above it */
  opacity: 0.2;
  filter: blur(1px);
  pointer-events: none;
  user-select: none;
  /* remove transform/scale — it can cause edges to peek through */
}

.typing-indicator {
  display: inline-block;
  height: 25px;
  margin-left: 8px;
  margin-bottom: 3px;
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background: var(--accent-hover);
  border-radius: 50%;
  opacity: 0.6;
  animation: bounce 1s infinite both;
}

.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
}




