.ka12-bot-container,
.ka12-bot-main-row,
.ka12-bot-hero-section,
.ka12-bot-chat-section {
  max-width: 100vw;
  width: 100vw;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.ka12-bot-main-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  width: 100vw;
  min-height: 100vh;
}

.ka12-bot-hero-section {
  flex: 1 1 40%;
  min-width: 280px;
  max-width: 400px;
  margin-bottom: 0;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: 0;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(33,125,187,0.07);
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.ka12-bot-hero-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  height: 90vh; 
}

.ka12-bot-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.ka12-bot-image picture,
.ka12-bot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: bottom;  
  display: block;
  border-radius: inherit;
}

.ka12-bot-links-wrapper.desktop {
  margin-top: 1.6rem; 
}

.ka12-bot-links{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ka12-bot-hero-content h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--green);
}

.ka12-bot-subtitle {
  font-size: 1rem;
  color: var(--fg);
  margin:  0.5rem 0rem 1rem 0rem;
}

.ka12-bot-links a {
  color: var(--link);
  margin: 0 8px;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1rem;
}

.ka12-bot-chat-section {
  flex: 2 1 60%;
  min-width: 320px;
  box-sizing: border-box;
  margin-bottom: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--card-bg);
}

.ka12-bot-chat-header {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  border-radius: 12px 12px 0 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ka12-bot-chat-header h2 {
  margin: 0;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 600;
}

.ka12-bot-chat-header p {
  margin: 4px 0 0 0;
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 300;
}

.ka12-bot-chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 20px 0 20px;
  min-height: 180px;
  max-height: none;
  padding-bottom: 80px;
}

.ka12-bot-message {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.ka12-bot-message.ka12-bot-bot {
  justify-content: flex-start;
}

/* .ka12-bot-bot-avatar {
  width: 32px;
  height: 32px;
  margin-right: 8px;
} */

.ka12-bot-message-content {
  background: var(--bg);
  padding: 10px 16px;
  border-radius: 18px;
  max-width: 100%;
  line-height: 1.4;
  color: var(--fg);
  word-break: break-word;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ka12-bot-message-content .location-arrow{
  color: var(--link);
  font-size: 1rem;
}

.ka12-bot-message-content b{
  font-weight: 600;
}

.ka12-bot-bottom-bar select{
  font-size: 0.775rem;
}

.ka12-bot-message.ka12-bot-user .ka12-bot-message-content {
  background: var(--user-msg-bg);
  color: var(--primary);
  margin-right: 0;
  margin-left: 8px;
  border-radius: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  max-width: 80%;
  font-size: 1rem;
  word-break: break-word;
  font-weight: 600;
}

.ka12-bot-message-content .category{
  font-weight: 600;
  margin-bottom: 1rem;
}

#ka12-bot-placeOptions .ka12-bot-quick-option {
  color: var(--black);
  border: none;
  border-radius: 18px;
  padding: 4px 1rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
  display: inline-block;
}

#ka12-bot-placeOptions .ka12-bot-quick-option.active {
  background: var(--bot-msg-bg);
  color: var(--fg);
}

#ka12-bot-placeOptions {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  max-height: 120px;
  overflow-y: auto;
}

/* Scrollbar for chat messages */
.ka12-bot-chat-messages {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg);
  background: var(--gray-df);
}

.ka12-bot-chat-messages::-webkit-scrollbar {
  width: 8px;
  background: var(--bg);
}

.ka12-bot-chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 6px;
}

.ka12-bot-chat-messages::-webkit-scrollbar-track {
  background: var(--bg);
}

/* -bottom-bar */
.ka12-bot-bottom-bar {
  padding: 0.6rem 1rem;
  background-color: var(--green);
}

.ka12-bot-bottom-bar label{
  font-weight: 500; 
  font-size: 1rem;
  color: #FFFFFF;
}

.ka12-bot-message-header{
    font-weight: 600;
    padding-top: 4rem;
    background: var(--yellow-dark);
    font-size: 0.9rem;
    color: #ffffff;
    padding: 0.3rem 0.5rem;
    display: block;
    margin-top: 1.4rem;
    border-radius: 4px;
}

.ka12-bot-message-header:first-child {
  margin-top: 0px;
}

#clear-history{
  background-color: var(--red-dark);
  padding: 0px 4px 4px 4px;
  border-radius: 10px;
}

/* Responsive */
/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .ka12-bot-container { max-width: 100vw; width: 100vw; }
  .ka12-bot-main-row { flex-direction: column; }
  .ka12-bot-hero-section {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    width: 100vw;
    max-width: 100vw;
    height: 90px;
    background: var(--card-bg);
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(33,125,187,0.06);
    overflow: hidden;
    padding: 1rem;
  }
  .ka12-bot-chat-section {
    padding: 0;
    margin: 0;
    width: 100vw;
    min-width: 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 120px; /* below hero section */
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .ka12-bot-chat-header {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    z-index: 20;
    border-radius: 0;
    padding: 0.6rem 1rem;
    background: var(--bg);
    box-shadow: 0 2px 8px rgba(33,125,187,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ka12-bot-hero-content h1 {
    font-size: 1.6rem;
    margin-bottom: 0;
  }

  .ka12-bot-chat-header h2 {
    font-size: 1.2rem;
  }

  .ka12-bot-chat-header p {
    font-size: 1rem;
  }

  .ka12-bot-message-content, 
  .ka12-bot-message.ka12-bot-user .ka12-bot-message-content { 
    font-size: 1rem;
  }

  .ka12-bot-chat-messages {
    position: absolute;
    top: 50px; /* hero + header */
    left: 0;
    right: 0;
    bottom: 80px; /* height of bottom bar */
    padding: 10px 10px 0 10px;
    overflow-y: auto;
    min-height: 0;
    max-height: none;
    background: var(--card-bg);
    padding-bottom: 240px;
  }
  .ka12-bot-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    border-top: 1px solid var(--border);
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .ka12-bot-subtitle {
    font-size: 1rem;
    color: var(--fg);
    margin-bottom: 0.3rem;
  }
  #ka12-bot-placeOptions {
    margin-top: 1.2rem;
  }
  .ka12-bot-bottom-bar {
    padding: 1rem 1rem 1.2rem;
  }
  #ka12-bot-placeOptions .ka12-bot-quick-option {
    font-weight: 400;
    font-size: 1rem;
  }
  .ka12-bot-bottom-bar select {
    font-size: 1rem;
  }
  .ka12-bot-bottom-bar label {
    font-size: 1.2rem;
  }
}
/* Mobile */
@media (max-width: 767px) {
  .ka12-bot-container { max-width: 100vw; width: 100vw; }
  .ka12-bot-main-row { flex-direction: column; }
  .ka12-bot-hero-section {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    width: 100vw;
    max-width: 100vw;
    height: 70px;
    background: var(--card-bg);
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(33,125,187,0.06);
    overflow: hidden;
    padding: 0.4rem 0.750rem 0.6rem 0.750rem;
  }
  .ka12-bot-chat-section {
    padding: 0;
    margin: 0;
    width: 100vw;
    min-width: 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 65px; /* below hero section */
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .ka12-bot-chat-header {
    display: none;
  }

  .ka12-bot-hero-content h1 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .ka12-bot-chat-header h2 {
    font-size: 0.8rem;
  }

  .ka12-bot-message {
    align-items: flex-start;
  }

  .ka12-bot-message-content{
    max-width: 100%;
  }

  .ka12-bot-message-content, 
  .ka12-bot-message.ka12-bot-user .ka12-bot-message-content { 
    font-size: 0.8rem;
    line-height: unset;
  }

  .ka12-bot-message-content ul{
    padding-left: 1.1rem;
  }
  .ka12-bot-bottom-bar label{
    font-size: 0.775rem;
  }
  .ka12-bot-bottom-bar select{
    font-size: 0.775rem;
  }
  .ka12-bot-chat-messages {
    position: absolute;
    top: 2px; /* hero + header */
    left: 0;
    right: 0;
    bottom: 80px; /* height of bottom bar */
    padding: 10px 10px 0 10px;
    overflow-y: auto;
    min-height: 0;
    max-height: none;
    background: var(--card-bg);
    padding-bottom: 240px;
  }
  .ka12-bot-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--green);
    border-top: 1px solid var(--border);
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 300;
  }
  .ka12-bot-subtitle {
    font-size: 0.8rem;
    color: var(--fg);
    margin-bottom: 0.3rem;
  }
  #ka12-bot-placeOptions {
    margin-top: 0.6rem;
  }
  #ka12-bot-placeOptions .ka12-bot-quick-option {
    font-weight: 400;
  }
}

.ka12-bot-option-btn {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: 1px solid var(--gray-df);
  background: #ffffff;
  color: var(--black);
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.3s, color 0.3s;
}

.ka12-bot-option-btn:hover {
  background: var(--yellow-vintage);
  color: #000000;
}

.ka12-bot-option-btn.selected {
  background: var(--yellow-vintage);
  color:#000000;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 375px) {
  .ka12-bot-option-btn {
    padding: 0.25rem .375rem;
    font-size: 0.65rem;
  }

  #ka12-bot-placeOptions {
    gap: 0.3rem;
  }

  .ka12-bot-bottom-bar label {
    font-size: 0.675rem;
  }
}

/* Dark Mode */
body.dark-mode {
  #ka12-bot-placeOptions .ka12-bot-quick-option {
    color: var(--primary);
    font-weight: 400;
  }
  .ka12-bot-option-btn {
    color: #000000;
  }
  .ka12-bot-option-btn:hover {
    color: #ffffff;
  }
}



