/* Christopher — shared styles */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400&display=swap');

/* -------------------------------------------------------------------------
   Reset and base
   ------------------------------------------------------------------------- */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #f5f0e8;
  color: #2c2c2c;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------------------
   Layout — shared across both screens
   ------------------------------------------------------------------------- */

.screen {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 120px;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.app-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a7f72;
  margin-bottom: 48px;
}

/* -------------------------------------------------------------------------
   Journal prompts screen
   ------------------------------------------------------------------------- */

.prompts-loading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: #8a7f72;
  margin-top: 48px;
}

.prompts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.prompt-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-question {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.prompt-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  color: #2c2c2c;
  flex: 1;
}

.refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #b5a99a;
  font-size: 0.9rem;
  padding: 2px 4px;
  line-height: 1.5;
  flex-shrink: 0;
  margin-top: 3px;
  transition: color 0.15s;
}

.refresh-btn:hover {
  color: #2c2c2c;
}

.refresh-btn:disabled {
  color: #d8d0c8;
  cursor: default;
}

.prompt-response {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #d8d0c8;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  color: #2c2c2c;
  line-height: 1.6;
  padding: 8px 0;
  resize: none;
  outline: none;
  min-height: 40px;
  transition: border-color 0.15s;
}

.prompt-response:focus {
  border-bottom-color: #8a7f72;
}

.prompt-response::placeholder {
  color: #c2b9ae;
}

/* -------------------------------------------------------------------------
   Free text section
   ------------------------------------------------------------------------- */

.free-text-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e0d8ce;
}

.free-text-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.125rem;
  font-style: italic;
  color: #8a7f72;
  margin-bottom: 12px;
}

.free-text-area {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #d8d0c8;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  color: #2c2c2c;
  line-height: 1.7;
  padding: 8px 0;
  resize: none;
  outline: none;
  min-height: 80px;
  transition: border-color 0.15s;
}

.free-text-area:focus {
  border-bottom-color: #8a7f72;
}

.free-text-area::placeholder {
  color: #c2b9ae;
}

/* -------------------------------------------------------------------------
   Submit button
   ------------------------------------------------------------------------- */

.submit-section {
  margin-top: 48px;
}

.submit-btn {
  background: #2c2c2c;
  color: #f5f0e8;
  border: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.submit-btn:hover {
  background: #444;
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* -------------------------------------------------------------------------
   Conversation screen
   ------------------------------------------------------------------------- */

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.finish-btn {
  background: none;
  border: 1px solid #c2b9ae;
  color: #8a7f72;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.finish-btn:hover {
  border-color: #2c2c2c;
  color: #2c2c2c;
}

.finish-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Message thread */

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 32px;
}

/* Christopher's messages — foreground, full presence */

.message-christopher {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: #2c2c2c;
}

.message-christopher .speaker-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7f72;
  margin-bottom: 6px;
}

/* Toby's messages — present but recede */

.message-toby {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.6;
  color: #2c2c2c;
  opacity: 0.65;
}

.message-toby .speaker-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b5a99a;
  margin-bottom: 6px;
}

/* Typing indicator */

.message-typing {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: #b5a99a;
}

/* -------------------------------------------------------------------------
   Fixed input bar — conversation screen
   ------------------------------------------------------------------------- */

.input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f5f0e8;
  border-top: 1px solid #e0d8ce;
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.input-bar-inner {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid #d8d0c8;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  color: #2c2c2c;
  line-height: 1.6;
  padding: 6px 0;
  resize: none;
  outline: none;
  min-height: 36px;
  max-height: 120px;
  overflow-y: auto;
}

.message-input:focus {
  border-bottom-color: #8a7f72;
}

.message-input::placeholder {
  color: #c2b9ae;
}

.send-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #8a7f72;
  font-size: 1rem;
  padding: 6px 0 6px 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.send-btn:hover {
  color: #2c2c2c;
}

.send-btn:disabled {
  color: #d8d0c8;
  cursor: default;
}

/* -------------------------------------------------------------------------
   Error state
   ------------------------------------------------------------------------- */

.error-message {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  color: #9a6b5e;
  margin-top: 16px;
}
