/* =========================================================================
   CHAT WITH SERENA DEDICATED LAYOUT & STYLES (Full Width Expanded)
   ========================================================================= */

:root {
  --sara-bg-page: #FAF6F0;
  --sara-bg-card: #FFFFFF;
  --sara-text-dark: #232D28;
  --sara-text-muted: #8E9890;
  --sara-accent-green: #F3621B;
  --sara-accent-gold: #F3621B;
  --sara-border: #EFE8DE;
}

body.sara-page {
  background-color: var(--sara-bg-page);
  color: var(--sara-text-dark);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
}

/* Master 3-Column Grid - Expanded to Full Width */
.sara-master-grid {
  display: grid;
  grid-template-columns: 250px 1fr 340px;
  gap: 1.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1.5rem auto;
  padding: 0 2.5rem;
  align-items: start;
}

/* Left Column */
.sara-left-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sara-nav-card {
  background: #FFF3EA;
  border: 1px solid #FFE5D4;
  border-radius: 20px;
  padding: 1.15rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sara-nav-header {
  padding: 0 0.5rem 0.5rem 0.5rem;
  margin-bottom: 0.25rem;
}

.sara-nav-header h4 {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1E2522;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sara-nav-header p {
  font-size: 0.72rem;
  color: #8E9890;
}

.sara-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  color: #38463D;
  transition: background 0.15s;
}

.sara-nav-item:hover {
  background: rgba(239, 228, 214, 0.6);
}

.sara-nav-item.active {
  background: #FFE5D4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sara-nav-icon {
  font-size: 1.1rem;
  color: #F3621B;
  width: 20px;
  text-align: center;
}

.sara-nav-text {
  display: flex;
  flex-direction: column;
}

.sara-nav-title {
  font-weight: 600;
  font-size: 0.86rem;
  color: #1E2522;
}

.sara-nav-sub {
  font-size: 0.7rem;
  color: #9C8E7C;
}

.sara-ember-archive-card {
  background: #FFF3EA;
  border: 1px solid #FFE5D4;
  border-radius: 20px;
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sara-ember-seal-img {
  width: 54px;
  height: auto;
  object-fit: contain;
}

.sara-ember-desc {
  font-size: 0.78rem;
  color: #38463D;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.sara-ember-link {
  font-size: 0.76rem;
  font-weight: 700;
  color: #F3621B;
  text-decoration: none;
}

/* Center Column */
.sara-center-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sara-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.25rem;
}

.sara-title-box h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: #1E2522;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.sara-title-box h3 {
  font-size: 1.05rem;
  color: #38463D;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.sara-title-box p {
  font-size: 0.92rem;
  color: #6E7C72;
}

.sara-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sara-btn-new-chat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid #E0D6C8;
  border-radius: 24px;
  background: #FAF7F2;
  font-size: 0.84rem;
  font-weight: 600;
  color: #38463D;
  cursor: pointer;
  transition: all 0.15s;
}

.sara-btn-new-chat:hover {
  background: #EAE0D2;
}

.sara-btn-dots {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #6E7C72;
  cursor: pointer;
}

/* Master Chat Canvas */
.sara-chat-master-canvas {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--sara-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  display: flex;
  min-height: 720px;
  height: 720px;
}

/* Seated Serena on Left Side - Positioned higher at the top border */
.sara-canvas-art-left {
  width: 450px;
  height: 100%;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: none;
  position: relative;
  background: transparent;
  padding: 0 0 0 1rem;
}

.sara-canvas-art-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: top left;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.04));
}

/* Conversation Flow on Right Side */
.sara-conversation-area {
  flex: 1;
  padding: 2rem 2.5rem 8rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  max-height: 600px;
}

/* Message Bubbles */
.sara-msg-box {
  background: #FAF7F2;
  border: 1px solid #EFE6DA;
  border-radius: 20px;
  padding: 1.25rem 1.6rem;
  max-width: 90%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sara-msg-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1E2522;
  margin-bottom: 0.5rem;
}

.sara-msg-time {
  font-size: 0.72rem;
  color: #8E9890;
  font-weight: normal;
}

.sara-msg-body {
  font-size: 0.94rem;
  color: #232D28;
  line-height: 1.65;
}

/* User Message */
.sara-user-msg-box {
  align-self: flex-end;
  background: #EBF2EC;
  border: 1px solid #D7E5DA;
  border-radius: 20px;
  padding: 1rem 1.5rem;
  max-width: 82%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sara-user-msg-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #5E6C62;
  margin-bottom: 0.35rem;
}

.sara-user-msg-body {
  font-size: 0.94rem;
  color: #1C2B22;
  line-height: 1.6;
}

/* Prompt Chips */
.sara-chips-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.sara-prompt-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  background: #FFF;
  border: 1px solid #E0D6C8;
  font-size: 0.82rem;
  font-weight: 600;
  color: #38463D;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.15s;
}

.sara-prompt-chip:hover {
  background: #F3621B;
  color: #FFF;
  border-color: #F3621B;
}

/* Bottom Floating Input Bar */
.sara-chat-input-wrapper {
  position: absolute;
  bottom: 1.25rem;
  left: 2rem;
  right: 2rem;
  background: #FFFFFF;
  border: 1px solid #E5DCD2;
  border-radius: 20px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  z-index: 5;
}

.sara-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sara-text-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.92rem;
  background: transparent;
  color: #1E2522;
}

.sara-input-actions-left {
  display: flex;
  gap: 0.85rem;
  font-size: 1.1rem;
  color: #7E8981;
  margin-top: 0.35rem;
}

.sara-icon-btn {
  cursor: pointer;
  transition: color 0.15s;
}

.sara-icon-btn:hover {
  color: #F3621B;
}

.sara-send-btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F3621B;
  color: #FFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(43, 66, 55, 0.25);
  transition: transform 0.15s;
}

.sara-send-btn-circle:hover {
  transform: scale(1.06);
}

.sara-context-notice {
  text-align: center;
  font-size: 0.72rem;
  color: #8E9890;
  margin-top: 0.35rem;
}

/* Right Column */
.sara-right-col {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sara-card {
  background: #FFFFFF;
  border: 1px solid var(--sara-border);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

/* About Serena Card */
.sara-about-card {
  background: #FFF3EA;
  border: 1px solid #FFE5D4;
  position: relative;
  overflow: hidden;
}

.sara-about-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1E2522;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0.6rem;
}

.sara-about-desc {
  font-size: 0.84rem;
  color: #38463D;
  line-height: 1.5;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.sara-about-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: #232D28;
  position: relative;
  z-index: 1;
}

.sara-check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sara-check-icon {
  color: #F3621B;
  font-size: 0.9rem;
}

.sara-about-leaf-art {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 90px;
  opacity: 0.7;
  pointer-events: none;
}

/* Things You Can Ask */
.sara-ask-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1E2522;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.sara-ask-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sara-ask-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  font-size: 0.84rem;
  color: #38463D;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}

.sara-ask-item:hover {
  background: #FAF7F2;
}

.sara-ask-icon {
  font-size: 0.95rem;
}

.sara-ask-more-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #F3621B;
  text-decoration: none;
  margin-top: 0.65rem;
  display: inline-block;
}

/* Past Conversations */
.sara-convos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.sara-convos-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1E2522;
}

.sara-convos-view-all {
  font-size: 0.75rem;
  color: #8E9890;
  text-decoration: none;
}

.sara-convos-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sara-convo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.sara-convo-item:hover {
  background: #FAF7F2;
}

.sara-convo-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sara-convo-icon {
  font-size: 1rem;
  color: #F3621B;
}

.sara-convo-info {
  display: flex;
  flex-direction: column;
}

.sara-convo-name {
  font-weight: 600;
  font-size: 0.86rem;
  color: #232D28;
}

.sara-convo-time {
  font-size: 0.7rem;
  color: #9C8E7C;
}

.sara-convo-arrow {
  font-size: 0.8rem;
  color: #8E9890;
}

/* Bottom Banner */
.sara-bottom-banner {
  width: calc(100% - 5rem);
  box-sizing: border-box;
  margin: 1.5rem 2.5rem 3rem 2.5rem;
  padding: 1.1rem 2.5rem;
  background: #FFF3EA;
  border: 1px solid #EDE1D0;
  border-radius: 20px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #38463D;
}

/* Responsive */
@media (max-width: 1200px) {
  .sara-master-grid {
    grid-template-columns: 200px 1fr;
    padding: 0 1.5rem;
  }
  .sara-right-col {
    display: none;
  }
}

@media (max-width: 850px) {
  .sara-master-grid {
    grid-template-columns: 1fr;
    padding: 0 0.75rem;
    margin: 0.75rem auto;
    gap: 1rem;
  }
  .sara-left-col {
    display: none;
  }
  .sara-canvas-art-left {
    display: none;
  }
  .sara-chat-card {
    min-height: calc(100vh - 160px);
    border-radius: 18px;
  }
  .sara-prompts-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
  }
  .sara-prompts-bar::-webkit-scrollbar {
    display: none;
  }
  .sara-prompt-chip {
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }
  .sara-input-box {
    font-size: 16px !important;
  }
}

