/* ── Social Media Caption Maker Styles ───────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  height: auto;
  box-sizing: border-box;
  overflow-y: auto;
}

.form-control {
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 4px rgba(11, 47, 78, 0.06);
}

.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 0.5px rgba(27,145,248,0.25);
}

.form-control:hover {
  border-color: #BFD6FF;
  box-shadow: 0 0px 8px rgba(27,145,248,0.12);
}

.btn-copy{
    display:inline-flex!important;
    align-items:center!important;
    gap:7px!important;
    padding:4px 35px!important;
    background:0 0!important;
    color:#333!important;
    cursor:pointer!important;
    font-size:.8rem!important;
    user-select:none!important;
    border:none!important;
    box-shadow:none!important
}
.btn-copy:focus-visible{
    outline:2px solid rgba(68,167,225,.8)!important;
    outline-offset:2px!important
}
.btn-copy .copy-icon{
    width:20px!important;
    height:20px!important;
    object-fit:contain!important;
    flex-shrink:0!important;
    image-rendering:-moz-crisp-edges!important;
    image-rendering:crisp-edges!important;
    image-rendering:pixelated!important;
    pointer-events:none!important;
    user-select:none!important
}

/* ── Two-column flex layout ───────────────────────────────────────────────── */
.fullchat-page {
  display: flex;
  gap: 24px;
  padding: 52px;
  margin-top: -30px;
  align-items: stretch;
  height: auto !important;
}

/* LEFT panel: the form */
.ai-tool-container {
  flex: 0 0 50%;
  border-right: 1px solid rgba(0,0,0,0.1);
  box-sizing: border-box;
  padding-top: 11px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
}

/* RIGHT panel: chat wrapper */
.chat-panel-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding-top: 4px;
  box-sizing: border-box;
  min-height: 0; /* allow child to scroll */
}

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-title-container {
  position: relative;
  top: -8px;
  text-align: center;
  margin: 0;
  pointer-events: none;
  z-index: 1000;
}
.page-title-container .page-title {
  font-size: 2rem;
  font-weight: 500;
  margin: 0;
}

/* ── Live-Chat Indicator ──────────────────────────────────────────────────── */
.live-chat-label {
  display: flex;
  align-items: center;
  padding-bottom: 9px;
  font-weight: 500;
  font-size: 1rem;
}
.live-chat-icon {
  width: 25px;
  height: 25px;
  margin-right: 8px;
  border-radius: 50%;
}
.live-chat-text {
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
}

/* ── Form Fields ──────────────────────────────────────────────────────────── */
.ai-tool-container .form-label {
  font-weight: 500;
  margin-bottom: 4px;
}

/* ── Furobox / ChatGPT-style Custom Dropdowns ───────────────────────── */
.furobox-select {
  position: relative;
  width: 100%;
  font-family: "Inter", "Segoe UI", sans-serif;
}

/* Visible toggle */
.furobox-select button {
  width: 100%;
  background: #fff;
  color: #0B2F4E;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(11, 47, 78, 0.06);
  transition: all 0.2s ease;
}
.furobox-select button:hover {
  border-color: #BFD6FF;
  box-shadow: 0 3px 8px rgba(27,145,248,0.12);
}
.furobox-select button:focus {
  outline: none;
  box-shadow: 0 0 0 0.5px rgba(27,145,248,0.25);
}
.furobox-select .chevron {
  color: #0B2F4E;
  transition: transform 0.2s ease;
}
.furobox-select.open .chevron {
  transform: rotate(180deg);
}

/* Floating dropdown panel */
.furobox-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(11,47,78,0.1);
  overflow: hidden;
  display: none;
  z-index: 1000;
  animation: dropdownFade 0.15s ease;
}
.furobox-select.open .furobox-menu {
  display: block;
}
@keyframes dropdownFade {
  from {opacity: 0; transform: translateY(-4px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Individual options */
.furobox-option {
  padding: 8px 12px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* transition: background-color 0.2s ease; */
  /* outline: 0.5px solid transparent; */
  border: 0.5px solid transparent;
  border-radius: 8px;
  margin: 5px;
  font-weight: 400;
}
.furobox-option:hover {
  /* background-color: #f3f7fc; */
  margin: 5px;
  border-radius: 8px;
  /* outline: 0.5px solid rgba(27, 145, 248, 0.4); */
  border: 0.5px solid rgba(27, 145, 248, 0.4);

}
.furobox-option.selected {
  /* background-color: #F4F7FB; */
  color: #334EAC;
  font-weight: 500;
}
.furobox-option .tick {
  color: #0B2F4E;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Hide the original select element */
.furobox-original {
  display: none !important;
}


/* ── Generate Button ──────────────────────────────────────────────────────── */
.btn-submit-glow {
  display: block;
  width: 100%;
  height: 34px;
  line-height: 34px;
  background-color: #0b2f4e;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-submit-glow:hover {
  opacity: .9;
}

/* ── Advanced-Options Toggle ───────────────────────────────────────────────── */
.form-check.form-switch {
  display: flex;
  align-items: center;
  margin-bottom: 20px !important;
  margin-top: 20px !important;
}

.form-check-input:checked {
  box-shadow: none !important;
}

/* ── Chat Container ───────────────────────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
  position: relative;
  min-width: 0 !important;
  max-width: 100%;
  resize: horizontal;
  flex: 1 1 auto;      /* fill the wrapper height */
  min-height: 432px;       /* allow scrolling child */
  overflow: auto;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 4px rgba(11, 47, 78, 0.06);
}
.chat-conversation {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  padding: 0;
}
/* scrollbar */
.chat-conversation::-webkit-scrollbar {
  width: 6px;
}
.chat-conversation::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

/* ── Message Bubbles ──────────────────────────────────────────────────────── */
.bubble {
  max-width: 95%;
  padding: 13px 11px;
  border-radius: 12px;
  line-height: 1.5;
}
.bubble.user {
  align-self: flex-end;
  background: #e8f4fc;
  margin-bottom: 13px;
}
.bubble.user .sender {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  margin-bottom: 4px;
  color: #333;
}
.bubble.user .message {
  padding-left: 24px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bubble.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #dde7ef;
}

/* ── Stub Bubble Override (when only one assistant bubble) ────────────────── */
.chat-conversation > .bubble.assistant:only-child {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
}
.chat-conversation > .bubble.assistant:only-child .message {
  width: 123%;
  margin-left: 68px;
  padding: 46px;
}

/* ── Scroll-to-bottom Button ───────────────────────────────────────────────── */
.scroll-btn {
  position: absolute;
  bottom: 16px;  /* move this up into the chat box */
  right: 16px;   /* ditto */
  background: none;
  border: none;
  color: rgba(68,167,225,0.6);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color .2s, transform .2s;
  z-index: 100;
}
.scroll-btn:hover {
  color: #44a7e1;
  transform: scale(1.2);
}

/* ── Follow-Up Prompt Bar ─────────────────────────────────────────────────── */
.followup-prompt {
  width: 100%;
  margin: 6px 0 40px 0;
  display: none;
}
.followup-prompt label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: .9rem;
  color: #0f172a;
}
.followup-input-wrapper {
  position: relative;
  width: 100%;
}
.followup-input-wrapper input {
  width: 100%;
  padding: 10px 56px 10px 14px;
  border: 1px solid rgba(68,167,225,0.8);
  border-radius: 999px;
  font-size: 1rem;
  box-sizing: border-box;
}
.followup-input-wrapper .send-button {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ── Responsive Tweaks ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .fullchat-page {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .ai-tool-container,
  .chat-container {
    width: 100%;
    min-width: auto;
    height: auto !important;
    resize: none;
    margin: 0;
  }
  .chat-container {
    height: 50vh !important;
  }
  .scroll-btn {
    bottom: 16px !important;
    right: 16px !important;
  }
}
@media (max-width: 576px) {
  .ai-tool-container {
    padding: 12px;
  }
  .ai-tool-container .form-control,
  .ai-tool-container .form-select {
    font-size: .9rem;
    padding: 6px 10px;
  }
  .ai-tool-container .form-label {
    font-size: .9rem;
  }
  .btn-submit-glow {
    font-size: .9rem;
    height: 32px;
  }
  /* Demo banner adjustments */
  #demoBannerBox {
    padding: 16px !important;
  }
  #demoBannerBox h5 {
    font-size: 1rem;
  }
  #demoBannerBox .btn {
    width: 48%;
    font-size: .9rem;
    padding: .5rem 0;
  }
}


/* ── Follow-up bar (from Smart Email Writer) ────────────────────────── */
.followup-prompt {
  width: 100%;
  margin: 6px 0 40px 0;
  display: none;              /* will be toggled on by JS */
}
.followup-form {
  width: 100%;
  position: relative;
}
.followup-input-wrapper {
  position: relative;
  width: 100%;
}
.followup-input-wrapper input {
  width: 100%;
  padding: 10px 56px 10px 14px;
  border: 1px solid rgba(68,167,225,0.8);
  border-radius: 999px;
  font-size: 1rem;
  box-sizing: border-box;
}
.send-button {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.send-icon {
  width: 24px;
  height: 24px;
  display: block;
}
.send-button:hover .send-icon {
  opacity: 0.8;
}


/* make user bubbles a positioning context */
.bubble.user {
  position: relative;
  padding: 13px 33px 8px 11px;  /* extra right‐padding to clear the icon */
}

/* absolutely position the ⧈ icon at top‐right */
.bubble.user .sender {
  position: absolute;
  top: 15px;
  right: 12px;
  display: block;     /* no more flex/gap */
  font-size: .85rem;
  color: #333;
  margin: 0;          /* reset the default bottom margin */
}

/* hide the empty label text (if any) */
.bubble.user .sender span {
  display: none;
}
/* ── Formatted content inside assistant bubbles ─────────────────────────── */
.bubble.assistant .message h1,
.bubble.assistant .message h2,
.bubble.assistant .message h3,
.bubble.assistant .message h4,
.bubble.assistant .message h5,
.bubble.assistant .message h6 {
  margin-top: 1.2em;
  margin-bottom: 0.6em;
  font-weight: 600;
  line-height: 1.3;
}

.bubble.assistant .message h1 { font-size: 1.8em; }
.bubble.assistant .message h2 { font-size: 1.5em; }
.bubble.assistant .message h3 { font-size: 1.3em; }
.bubble.assistant .message h4 { font-size: 1.1em; }

.bubble.assistant .message ul,
.bubble.assistant .message ol {
  margin: 0.8em 0;
  padding-left: 2em;
}

.bubble.assistant .message li {
  margin: 0.4em 0;
  line-height: 1.6;
}

.bubble.assistant .message p {
  margin: 0.8em 0;
  line-height: 1.6;
}

.bubble.assistant .message strong {
  font-weight: 600;
}

.bubble.assistant .message em {
  font-style: italic;
}

.bubble.assistant .message code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.bubble.assistant .message pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
}

.bubble.assistant .message pre code {
  background: none;
  padding: 0;
}

/* First heading shouldn't have top margin */
.bubble.assistant .message > h1:first-child,
.bubble.assistant .message > h2:first-child,
.bubble.assistant .message > h3:first-child {
  margin-top: 0;
}

/* Last element shouldn't have bottom margin */
.bubble.assistant .message > *:last-child {
  margin-bottom: 0;
}
.chat-panel-wrapper {
    height: calc(100vh - 180px);
    overflow: hidden;
}

.chat-window {
    height: 100%;
    overflow-y: auto !important;
}
