/* ====== 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;
}

.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;
}


.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;
}

/* --- AI Demo Info Card (home page) --- */
.info-card {
  max-width: 720px;
  margin: 10px auto 24px auto;
  box-shadow: 0 2px 14px #0001;
  border-radius: 16px;
  background: #fff;
  padding: 34px 36px 24px 36px;
}
.info-card .prototype-ribbon {
  display: inline-block;
  background: #fae2e2;
  color: #c00;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 3px 16px 2px 16px;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.info-card .info-title {
  font-size: 1.6em;
  font-weight: 700;
  color: #444;
  margin-bottom: 7px;
}
.info-card .info-intro {
  font-size: 1.12em;
  color: #444;
  margin-bottom: 12px;
}
.info-card .model-cost-block {
  background: #f5f8ff;
  border-radius: 8px;
  padding: 12px 24px 8px 24px;   /* perfect edge alignment */
  margin-bottom: 7px;
  font-size: 1em;
  color: #215ee6;
}
.info-card .model-cost-block .model-highlight {
  background: #e3eefd;
  color: #2050a5;
  padding: 2px 7px;
  border-radius: 7px;
}
.info-card .model-cost-small {
  font-size: 13px;
  color: #666; /* darker for better readability */
  margin-top: 8px;
  line-height: 1.35;
}
.info-card .demo-warning {
  background: #fff4f4;
  border: 1.5px solid #ffbdbd;
  border-radius: 8px;
  color: #b00000;
  padding: 10px 24px 10px 24px;
  margin-bottom: 16px;
  font-size: 14.4px;
}
.info-card .demo-warning strong {
  font-weight: 600;
  font-size: 15px;
  display: block;
  margin-bottom: 8px;
  color: #a00000;
}
.info-card .demo-warning ul {
  padding-left: 20px;
  margin: 0;
}
.info-card .demo-warning li {
  margin-bottom: 4px;
  line-height: 1.5;
}
.info-card .keyboard-hint {
  font-size: 15px;
  color: #444;
  margin-bottom: 11px;
  text-align: right;
}
.info-card .keyboard-hint span[style*="font-size:1.1em;"] {
  vertical-align: middle;

}
.info-card .privacy-note {
  font-size: 12.7px;
  color: #888;
  margin-bottom: 5px;
  margin-top: 20px;
  text-align: left;
}
.info-card .cta-button {
  text-align: center;
  margin-top: 2px;
}

/* Modern blue call-to-action button */
.ai-demo-btn {
  display: inline-block;
  margin-top: 6px;
  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;
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
  .info-card {
    padding: 18px 6vw 10px 6vw;
  }
  .info-card .model-cost-block,
  .info-card .demo-warning {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.info-card .keyboard-hint kbd {
  display: inline-block;
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 1em;
  padding: 2px 8px;
  background: #f5f5f7;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #222;
  margin: 0 2px;
  font-weight: 500;
  box-shadow: 0 1px 2px #0001;
}



