/* =============================================
   EPIC CAREERING BRAND COMPASS™ — STYLES
   ============================================= */

:root {
  --shell-beige: #F2E4DC;
  --eggplant: #642F37;
  --warm-orange: #F28B50;
  --royal-orange: #F39048;
  --golden-yellow: #F2C36B;
  --pastel-purple: #B9A3BF;
  --cinnabar-red: #BF3415;
  --body-text: #2C1810;
  --white: #ffffff;
  --shadow-warm: 0 4px 20px rgba(44, 24, 16, 0.12);
  --shadow-card: 0 2px 12px rgba(44, 24, 16, 0.10);
  --radius: 18px;
  --radius-sm: 10px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--body-text);
  background: var(--shell-beige);
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

/* =============================================
   HEADER
   ============================================= */

#header {
  background: var(--eggplant);
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(100, 47, 55, 0.35);
  z-index: 10;
}

#header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

#header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

#header-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  background: var(--white);
  padding: 7px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

/* =============================================
   PROGRESS BAR
   ============================================= */

#progress-bar-wrap {
  flex-shrink: 0;
  background: var(--eggplant);
  padding: 0 24px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 16px rgba(100, 47, 55, 0.35);
  z-index: 9;
}

#progress-bar-wrap.hidden {
  display: none;
}

#progress-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--golden-yellow);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

#progress-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(242, 228, 220, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

#progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--warm-orange), var(--golden-yellow));
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

#header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#header-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

#header-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-style: italic;
  color: var(--golden-yellow);
  opacity: 0.88;
  line-height: 1.3;
}

#new-chat-btn {
  background: transparent;
  border: 1.5px solid rgba(242, 195, 107, 0.45);
  color: var(--golden-yellow);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

#new-chat-btn:hover {
  background: rgba(242, 195, 107, 0.12);
  border-color: var(--golden-yellow);
}

/* =============================================
   CHAT AREA
   ============================================= */

#chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px 12px;
  display: flex;
  flex-direction: column;
  background: var(--shell-beige);
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(242, 139, 80, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(185, 163, 191, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 10%, rgba(242, 195, 107, 0.05) 0%, transparent 50%);
  scroll-behavior: smooth;
}

#chat-area::-webkit-scrollbar {
  width: 5px;
}
#chat-area::-webkit-scrollbar-track {
  background: transparent;
}
#chat-area::-webkit-scrollbar-thumb {
  background: rgba(100, 47, 55, 0.18);
  border-radius: 10px;
}

/* =============================================
   WELCOME PANEL
   ============================================= */

#welcome-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.6s ease;
}

#welcome-inner {
  text-align: center;
  max-width: 520px;
  padding: 48px 40px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-warm);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(242, 195, 107, 0.2);
}

#welcome-logo {
  max-height: 80px;
  width: auto;
  margin-bottom: 24px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#welcome-logo-fallback {
  display: none;
  margin: 0 auto 24px;
  width: fit-content;
}

#welcome-heading {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--eggplant);
  line-height: 1.35;
  margin-bottom: 14px;
}

#welcome-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--body-text);
  line-height: 1.65;
  opacity: 0.8;
  margin-bottom: 32px;
}

#welcome-starters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.starter-btn {
  background: var(--white);
  border: 1.5px solid rgba(100, 47, 55, 0.18);
  color: var(--eggplant);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.4;
}

.starter-btn:hover {
  background: var(--eggplant);
  color: var(--white);
  border-color: var(--eggplant);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 47, 55, 0.25);
}

.starter-btn:active {
  transform: translateY(0);
}

#welcome-note {
  font-size: 12px;
  color: var(--body-text);
  opacity: 0.55;
  line-height: 1.5;
  font-style: italic;
}

#welcome-note a {
  color: var(--eggplant);
  opacity: 0.8;
  text-decoration: none;
}

#welcome-note a:hover {
  text-decoration: underline;
}

/* =============================================
   MESSAGES
   ============================================= */

#messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

.message {
  display: flex;
  animation: slideIn 0.35s ease;
}

.message.user {
  justify-content: flex-end;
}

.message.assistant {
  justify-content: flex-start;
}

.bubble {
  max-width: 72%;
  padding: 14px 18px;
  line-height: 1.7;
  font-size: 15.5px;
}

.message.user .bubble {
  background: var(--pastel-purple);
  color: var(--white);
  border-radius: var(--radius) var(--radius) 4px var(--radius);
  font-family: 'DM Sans', sans-serif;
}

.message.assistant .bubble {
  background: var(--white);
  color: var(--body-text);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  box-shadow: var(--shadow-card);
  font-family: 'DM Sans', sans-serif;
  border: 1px solid rgba(242, 195, 107, 0.15);
}

.bubble p {
  margin-bottom: 10px;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.bubble strong {
  font-weight: 600;
  color: var(--eggplant);
}

.message.user .bubble strong {
  color: var(--white);
}

.bubble em {
  font-style: italic;
}

.bubble ul, .bubble ol {
  margin: 8px 0 10px 18px;
}

.bubble li {
  margin-bottom: 5px;
  line-height: 1.6;
}

/* Branding point styling — section headers in Playfair */
.bubble .branding-point-label {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--eggplant);
  margin-bottom: 4px;
  margin-top: 14px;
  letter-spacing: 0.02em;
}

/* =============================================
   INTRO NOTICE
   ============================================= */

#intro-notice {
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(242, 195, 107, 0.18), rgba(242, 195, 107, 0.06));
  border-bottom: 1px solid rgba(100, 47, 55, 0.10);
  padding: 12px 24px;
  text-align: center;
}

.intro-notice-lead {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--eggplant);
  margin-bottom: 2px;
}

.intro-notice-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(44, 24, 16, 0.78);
  max-width: 620px;
  margin: 0 auto;
}

/* =============================================
   SESSION COMPLETION CONTROLS
   ============================================= */

.completion-controls {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: 80%;
  margin-top: -4px;
  animation: fadeIn 0.5s ease;
}

.save-points-btn {
  background: var(--golden-yellow);
  color: var(--eggplant);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(242, 195, 107, 0.45);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.save-points-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 4px 14px rgba(242, 195, 107, 0.6);
}

.save-points-btn:active {
  transform: translateY(0);
}

.email-results {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(242, 195, 107, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  width: 320px;
  max-width: 100%;
  box-shadow: var(--shadow-card);
}

.email-heading {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--eggplant);
}

.email-subnote {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(44, 24, 16, 0.65);
  margin: -2px 0 2px;
}

.email-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.email-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid rgba(100, 47, 55, 0.18);
  border-radius: 50px;
  padding: 9px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: var(--body-text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease;
}

.email-input:focus {
  border-color: rgba(100, 47, 55, 0.4);
}

.email-input::placeholder {
  color: rgba(44, 24, 16, 0.4);
  font-style: italic;
}

.email-send-btn {
  background: var(--warm-orange);
  color: var(--white);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(242, 139, 80, 0.4);
  transition: background 0.2s ease, transform 0.15s ease;
}

.email-send-btn:hover:not(:disabled) {
  background: var(--royal-orange);
  transform: translateY(-1px);
}

.email-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.email-status {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
}

.email-status.hidden {
  display: none;
}

.email-status.success {
  color: var(--eggplant);
  font-weight: 500;
}

.email-status.error {
  color: var(--cinnabar-red);
}

/* =============================================
   TYPING INDICATOR
   ============================================= */

#typing-indicator {
  padding: 0 24px 8px;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

#typing-indicator.hidden {
  display: none;
}

#typing-bubble {
  background: var(--white);
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(242, 195, 107, 0.15);
}

.dot {
  width: 7px;
  height: 7px;
  background: var(--pastel-purple);
  border-radius: 50%;
  animation: pulse 1.4s infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

/* =============================================
   INPUT AREA
   ============================================= */

#input-area {
  flex-shrink: 0;
  background: var(--shell-beige);
  padding: 12px 20px 20px;
  border-top: 1px solid rgba(100, 47, 55, 0.08);
}

#input-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--white);
  border-radius: 24px;
  padding: 10px 10px 10px 18px;
  box-shadow: 0 2px 16px rgba(44, 24, 16, 0.08);
  border: 1.5px solid rgba(100, 47, 55, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#input-inner:focus-within {
  border-color: rgba(100, 47, 55, 0.3);
  box-shadow: 0 2px 20px rgba(44, 24, 16, 0.12);
}

#message-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--body-text);
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}

#message-input::placeholder {
  color: rgba(44, 24, 16, 0.38);
  font-style: italic;
}

#message-input::-webkit-scrollbar {
  width: 3px;
}

#send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--warm-orange);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(242, 139, 80, 0.4);
}

#send-btn:hover:not(:disabled) {
  background: var(--royal-orange);
  transform: scale(1.05);
}

#send-btn:active:not(:disabled) {
  transform: scale(0.96);
}

#send-btn:disabled {
  background: rgba(44, 24, 16, 0.12);
  cursor: not-allowed;
  box-shadow: none;
}

#send-btn:disabled svg {
  opacity: 0.4;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 600px) {
  #header {
    padding: 0 16px;
  }

  #progress-bar-wrap {
    padding: 0 16px 10px;
    gap: 10px;
  }

  #progress-label {
    font-size: 10.5px;
  }

  #header-inner {
    height: 64px;
  }

  #header-title {
    font-size: 18px;
  }

  #chat-area {
    padding: 20px 16px 8px;
  }

  #welcome-inner {
    padding: 32px 24px;
  }

  #welcome-heading {
    font-size: 21px;
  }

  .bubble {
    max-width: 88%;
  }

  #input-area {
    padding: 10px 14px 16px;
  }
}
