/* ====== BASE STYLE (from style1.css, unchanged) ====== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.header-right {
  flex-direction: column;
  align-items: flex-end;
}

.logo {
  max-height: 40px;
  max-width: 100%;
  height: auto;
  width: auto;
}

.title-line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex: 1;
  min-width: 0;
}

.title {
  font-size: 22px;
  font-weight: normal;
}

.model-cost-line {
  font-size: 12px;
  color: #4caf50;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0px;
  justify-content: flex-end;
  padding-right: 0;
  margin-top: 4px;
  word-break: break-word;
}

.model-highlight {
  background-color: #f5f5f5;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: bold;
}

.session-cost,
.model-label {
  display: inline;
  margin: 0;
  padding: 0;
}

main {
  flex: 1;
  margin-top: 90px;
  overflow-y: auto;
  padding: 20px 20px 80px;
  scroll-behavior: smooth;
}

.info-text {
  color: #666;
  margin-bottom: 20px;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 70%;
  padding: 10px;
  border-radius: 10px;
  position: relative;
}

.bubble.user {
  background: #eee;
  align-self: flex-end;
  text-align: right;
}

.bubble.bot {
  background: none;
  align-self: flex-start;
  text-align: left;
}

.bubble.user, .bubble.bot {
  box-shadow: 0 1px 4px rgba(150,150,180,0.07);
}


.cost {
  font-size: 12px;
  color: green;
  margin-bottom: 5px;
  text-align: right;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 0 7px 10px 5px;
  display: flex;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

form {
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0px;  /* or 0 if you want NO gap */
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  padding: 5px 10px;
}


textarea {
  flex: 1;
  padding: 14px 10px;
  font-size: 16px;
  line-height: 20px;
  resize: none;
  border: none;
  border-radius: 30px;
  outline: none;
  max-height: 150px;
}

textarea::placeholder {
  font-size: 16px;
  color: #aaa;
}

button,
.icon-button {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;   /* REMOVE extra padding */
  margin: 0;    /* REMOVE margin */
  cursor: pointer;
}


button img,
button svg,
.icon-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: 0.2s ease;
}

@media (max-width: 600px) {
  header {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  .header-left {
    flex-shrink: 0;
    max-width: 30%;
  }

  .header-right {
    flex: 1;
    align-items: flex-end;
  }

  .logo {
    height: 38px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain;
  }

  .title-line {
    align-items: flex-end;
    text-align: right;
  }

  .title {
    font-size: 18px;
  }

  .model-cost-line {
    flex-direction: column;
    align-items: flex-end;
  }
}

.model-name {
  font-weight: normal;
  color: #707070;
  margin-right: 8px;
}

.session-cost-value {
  font-weight: bold;
}

.session-cost-label {
  color: green;
  white-space: nowrap;
  text-align: right;
  margin-top: 4px;
  padding-right: 0;
}

/* === Loading Overlay === */
.loader-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.76);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.loader-overlay.active {
  display: flex;
}

.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.loader-text {
  margin-top: 12px;
  color: #444;
  font-size: 18px;
  font-weight: bold;
  font-style: italic;
}

#loaderImage {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.note-small {
  font-size: 14px;
  color: #444;
}

.model-comparison {
  font-size: 13px;
  margin-bottom: 12px;
  color: #555;
}

.model-comparison ul {
  padding-left: 20px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.warning-note {
  color: #8b0000;
  font-size: 14px;
  margin: 8px 0 14px;
}

.prompt-ideas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.prompt-ideas .pill {
  background-color: #f1f1f1;
  color: #333;
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 14px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-text .smaller-text {
  font-size: 14px;
  color: #555;
  margin-top: 10px;
  margin-bottom: 16px;
}

.price-block ul {
  padding-left: 18px;
  margin: 0 0 12px;
  font-size: 14px;
  color: #444;
}

.price-block li {
  margin-bottom: 6px;
}

.demo-warning {
  background: #fff4f4;
  border: 1px solid #f5c2c2;
  padding: 18px 24px;
  margin: 24px 0 16px 0;
  border-radius: 8px;
  color: #b00000;
  max-width: 820px;
  font-size: 14.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.demo-warning strong {
  font-weight: 600;
  font-size: 15px;
  display: block;
  margin-bottom: 12px;
  color: #a00000;
}

.demo-warning ul {
  padding-left: 20px;
  margin: 0;
}

.demo-warning li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.keyboard-hint {
  font-size: 15px;
  color: #444;
  margin-bottom: 20px;
}

.suggestions p {
  font-weight: bold;
  margin-bottom: 10px;
}

.suggestion-bubble {
  display: inline-block;
  background: #f3f3f3;
  padding: 10px 14px;
  border-radius: 18px;
  margin: 4px 0;
  font-size: 14px;
  text-align: right;
  max-width: 90%;
  float: right;
  clear: both;
}

.suggestions {
  margin-top: 20px;
}

.suggestion-bubble-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 4px;
  padding-left: 20px;     
  max-width: 500px;     
  margin-left: 0;   
}
.suggestion-bubble {
  background: #f3f3f3;
  color: #222;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14px;
  display: inline-block;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  white-space: normal;
}

.suggestion-bubble.off-topic {
  background-color: #ffecec;
  color: #b00000;
  border: 1px dashed #d33;
  font-style: italic;
}

/* ========== PREDEFINED PROMPTS POPUP (from style2.css, ONLY what’s needed) ========== */
.predefined-popup {
  position: absolute;
  z-index: 999;
  background: #fff;
  padding: 18px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
  max-width: 420px;
  width: 90vw;
  font-size: 15px;
  max-height: 70vh;
  overflow-y: auto;
  line-height: 1.55;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: flex-start;
}

.predefined-popup.visible {
  opacity: 1;
  transform: scale(1);
}

.predefined-line {
  display: inline-block;
  background: #f7f9fa;            /* very light, almost-white gray/blue */
  color: #23272f;                 /* deep neutral gray */
  padding: 9px 20px;
  border-radius: 22px;
  margin: 6px 6px 6px 0;
  font-size: 15px;
  cursor: pointer;
  transition: 
    background 0.14s, 
    color 0.14s, 
    border 0.14s, 
    box-shadow 0.14s;
  outline: none;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(30, 34, 40, 0.03);
  border: 1px solid #e2e5ea;
  white-space: pre-line;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.predefined-line:hover,
.predefined-line:focus {
  background: #e9ecef;            /* gentle, just a shade darker */
  color: #181c22;
  border-color: #d2d7df;
  box-shadow: 0 3px 12px rgba(40, 44, 52, 0.06);
}


/* MOBILE tweak for popup */
@media (max-width: 600px) {
  .predefined-popup {
    max-width: 98vw;
    padding: 12px 8px;
    font-size: 14px;
  }
  .predefined-line {
    padding: 8px 10px;
    font-size: 14px;
  }
}

.tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #444;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.icon-button:hover .tooltip {
  opacity: 1;
}
.tooltip-bubble {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 10px 10px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tooltip-bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 80%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-bubble.show {
  opacity: 1;
}

.step-title {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 10px 0;
  color: #21427d;
}

.note {
  font-size: 13px;
  font-weight: 400;
  color: #888;
}

.ai-query-wrap {
  margin-bottom: 6px;
  position: relative;
}

.smaller-text {
  font-size: 14px;
  color: #444;
}

.ai-query-toggle {
  font-size: 12px;
  color: #2459a3;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 10px;
}

.ai-query-toggle:hover {
  color: #11346b;
}

.product-list {
  background: #f5f8fc;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(180,200,255,0.09);
}

.product-list ol {
  margin: 0 0 0 22px;
  padding: 0;
}
.product-list li {
  margin-bottom: 7px;
  color: #596280;
}
.product-list .sku, .product-list .price {
  color: #254074;
}

.product-list b {
  color: #224489;
}

.explanation {
  font-size: 14px;
}




.ai-demo-intro {
  background: #fcfdff;
  border: 1.5px solid #e3e8f0;
  border-radius: 18px;
  max-width: 900px;
  margin: 0px auto 40px auto;
  padding: 24px 44px 24px 44px;
  box-shadow: 0 6px 28px 0 rgba(40,52,80,0.10);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #202634;
  font-size: 1.07rem;
  line-height: 1.55;
}

.ai-demo-badge {
  display: inline-block;
  background: #fde6ea;
  color: #d8395c;
  font-size: 1.03rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 2px 14px 2px 14px;
  margin-bottom: 13px;
  letter-spacing: 0.01em;
}

.ai-demo-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #1b2237;
  letter-spacing: -0.01em;
}

.ai-demo-desc {
  margin: 0 0 18px 0;
  font-size: 1.12rem;
  color: #3a4259;
}

.ai-demo-highlight {
  background: #f1f6fe;
  color: #13347d;
  border-radius: 12px;
  margin: 18px 0 18px 0;
  padding: 16px 24px;
  font-size: 1.06rem;
  font-weight: 500;
  box-shadow: 0 1px 8px 0 rgba(28,76,220,0.07);
}

.ai-demo-highlight ul {
  margin: 10px 0 0 25px;
  padding: 0;
  list-style: disc inside;
}
.ai-demo-highlight li { margin-bottom: 5px; }
.ai-cost { color: #1a7f36; font-weight: 700; }

.ai-demo-details {
  margin: 0 0 10px 0;
  font-size: 1.08rem;
  color: #3b4257;
}
.ai-demo-products { color: #1a7f36; font-weight: 600; }
.ai-demo-categories a {
  color: #2563eb;
  text-decoration: underline dotted;
  margin: 0 1px;
  font-weight: 500;
}

.ai-demo-key {
  background: #e7f8ec;
  color: #218950;
  border-radius: 11px;
  margin: 18px 0 12px 0;
  padding: 13px 24px;
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: 0 1px 8px 0 rgba(32,128,80,0.08);
}
.ai-demo-key-label { color: #18944e; font-weight: 700; margin-right: 7px; }

.ai-demo-tuning {
  background: #f8fafb;
  color: #374263;
  border-radius: 11px;
  margin: 20px 0 14px 0;
  padding: 13px 24px;
  font-size: 1rem;
  box-shadow: 0 1px 6px 0 rgba(80,88,110,0.06);
}
.ai-demo-tuning-label { font-weight: 600; color: #2a375e; }
.ai-demo-faded-note {
  color: #b6bcc7;
  font-size: 0.98rem;
  margin-left: 13px;
  font-style: italic;
}

.ai-demo-steps {
  margin: 32px 0 12px 0;
  padding: 0;
  border-top: 1px solid #e3e8f0;
  padding-top: 18px;
}
.ai-demo-steps-title {
  color: #194bc3;
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 1.13rem;
  letter-spacing: -0.01em;
}
.ai-demo-steps ol {
  margin: 0;
  padding: 0;
  list-style:none;
}
.ai-demo-steps li {
  position: relative;
  margin: 0 0 14px 0;
  padding-left: 42px;
  font-size: 1.06rem;
}
.ai-step-number {
  position: absolute;
  left: 0; top: 1px;
  background: #eaf1ff;
  color: #2563eb;
  font-weight: 700;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.06rem;
  border: 1.5px solid #c8d6fa;
  box-shadow: 0 1px 2px 0 rgba(28,76,220,0.07);
}

.ai-demo-actions {
  margin-top: 28px;
  color: #535a66;
  font-size: 1.06rem;
  text-align: right;
}
.icon-speech {
  font-size: 1.17em;
  vertical-align: middle;
  line-height: 1.3;
}

.ai-demo-actions kbd {
  background: #f2f2f4;
  border-radius: 4px;
  font-size: 0.99em;
  padding: 1.5px 8px;
  margin: 0 2px;
  font-family: inherit;
  font-weight: 500;
  color: #282b30;
  border: 1px solid #e4e6ea;
}

.ai-demo-btn {
  display: inline-block;
  margin-top: 8px;
  background: #2563eb;
  color: #fff !important;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1.04rem;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 1px 6px 0 rgba(28,76,220,0.09);
  transition: background 0.18s;
}
.ai-demo-btn:hover {
  background: #194bc3;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .ai-demo-intro {
    padding: 22px 7vw 20px 7vw;
    font-size: 0.98rem;
  }
  .ai-demo-title {
    font-size: 1.28rem;
  }
  .ai-demo-steps li { padding-left: 34px; }
  .ai-step-number { width: 22px; height: 22px; font-size: 0.97rem; }
}

.bubble.off-topic {
  background: #ffecec;
  color: #b00000;
  border: 1px dashed #d33;
  text-align: left;        /* changed from center to left */
  font-style: italic;
  font-size: 15px;
  max-width: 70%;          /* match the normal AI (bot) bubble */
  margin: 24px 0 10px 0;   /* remove 'auto' for left alignment */
  align-self: flex-start;  /* left-align the bubble in the flex column */
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(150,150,180,0.07);
}

