/* ===== COACHING SESSION STYLES ===== */

/* --- Topic Select --- */
.topic-select {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.topic-select__inner {
  max-width: 680px;
  width: 100%;
}

.topic-select__header {
  text-align: center;
  margin-bottom: 48px;
}

.topic-select__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--fg);
  margin-bottom: 16px;
  line-height: 1.2;
}

.topic-select__sub {
  font-size: 1rem;
  color: var(--fg-light);
  font-weight: 300;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.65;
}

.topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.topic-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: var(--font-body);
}

.topic-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(42,40,37,0.08);
  transform: translateY(-1px);
}

.topic-card:active {
  transform: translateY(0);
}

.topic-card__icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.topic-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topic-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg);
}

.topic-card__desc {
  font-size: 0.8rem;
  color: var(--fg-light);
  font-weight: 300;
  line-height: 1.5;
}

.topic-select__note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--fg-light);
  font-weight: 300;
  font-style: italic;
  font-family: var(--font-display);
}

/* --- Active Session --- */
.active-session {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

.session-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.session-header__left {
  display: flex;
  align-items: center;
}

.session-header__back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--fg-light);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s;
}

.session-header__back:hover {
  color: var(--fg);
}

.session-header__topic {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.04em;
}

.session-header__right {
  display: flex;
  justify-content: flex-end;
}

.session-turn-count {
  font-size: 0.75rem;
  color: var(--fg-light);
  font-weight: 300;
}

/* --- Conversation --- */
.conversation {
  flex: 1;
  overflow-y: auto;
  padding: 40px 32px;
}

.conversation__messages {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.message {
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 300;
  padding: 16px 20px;
  border-radius: 16px;
  animation: message-in 0.3s ease-out;
}

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

.message--assistant {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: var(--fg);
  border-radius: 20px;
  border-bottom-left-radius: 4px;
  padding: 18px 22px;
}

.message--user {
  background: var(--accent);
  color: var(--white);
  border-bottom-right-radius: 4px;
  text-align: right;
  margin-left: 48px;
  border-radius: 20px;
  padding: 14px 18px;
}

.message--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.85rem;
}

/* --- Input --- */
.session-input {
  padding: 20px 32px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.message-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.message-form__textarea {
  flex: 1;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  resize: none;
  line-height: 1.6;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-weight: 300;
}

.message-form__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,105,20,0.1);
}

.message-form__textarea::placeholder {
  color: var(--sand-dark);
}

.message-form__submit {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.15s, transform 0.1s;
}

.message-form__submit:hover:not(:disabled) {
  background: var(--accent-light);
  transform: scale(1.04);
}

.message-form__submit:active:not(:disabled) {
  transform: scale(0.98);
}

.message-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.session-input__hint {
  max-width: 600px;
  margin: 10px auto 0;
  font-size: 0.75rem;
  color: var(--fg-light);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 300;
}

/* --- Loading State --- */
.loading-state {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-state__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--sand);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state__text {
  font-size: 0.85rem;
  color: var(--fg-light);
  font-weight: 300;
  font-family: var(--font-display);
  font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .message--user {
    margin-left: 32px;
  }

  .session-header {
    padding: 12px 20px;
  }

  .conversation {
    padding: 24px 20px;
  }

  .session-input {
    padding: 16px 20px 24px;
  }
}

/* --- Session Stage Progress --- */
.session-stage-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: 1.5px solid var(--border);
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.stage-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

.stage-dot.passed {
  background: var(--accent);
  border-color: var(--accent);
}

/* --- Session Intro --- */
.session-intro {
  background: var(--bg-warm, #f9f6f1);
  border-top: 1px solid rgba(139, 105, 20, 0.15);
  border-bottom: 1px solid rgba(139, 105, 20, 0.15);
  padding: 16px 24px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--fg-light);
  line-height: 1.6;
  margin-bottom: 8px;
}

.scan-insight {
  font-style: italic;
  font-size: 0.9rem;
  color: #7a726a;
  text-align: center;
  margin: 0.25rem auto 0.75rem;
  opacity: 0.85;
}

/* Framework beat label rendered on top of each post-opening coach turn:
   Awareness / Reason / Need / Aligned Action. Small, spaced, muted — quiet
   signal that says which beat of the four the user is in, not noise that
   fights the question below it. */
.message__stage-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a726a;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--fg-light);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-warm);
  color: var(--fg);
  border-color: var(--sand-dark);
}

/* --- Reflection Panel --- */
.reflection-panel {
  max-width: 560px;
  margin: 32px auto 0;
  padding: 36px 40px;
  background: var(--bg-warm, #F0EAE0);
  border: 1px solid rgba(139, 105, 20, 0.15);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reflection-panel__prompt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.6;
  text-align: center;
}

.reflection-panel__textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  resize: none;
  line-height: 1.6;
  font-weight: 300;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reflection-panel__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.reflection-panel__textarea::placeholder {
  color: var(--sand-dark);
}

.reflection-panel__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* --- Pro Upsell Card (Free-tier session-complete) --- */
.upsell-card {
  max-width: 560px;
  margin: 20px auto 0;
  padding: 28px 32px;
  background: var(--bg-warm, #F0EAE0);
  border: 1px solid rgba(139, 105, 20, 0.15);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upsell-card__heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  text-align: center;
}

.upsell-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upsell-card__item {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg-light);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
  font-weight: 300;
}

.upsell-card__item::before {
  content: '·';
  position: absolute;
  left: 6px;
  top: -1px;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.upsell-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.upsell-card__cta {
  min-width: 200px;
  text-align: center;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-block;
}

.upsell-card__dismiss {
  background: transparent;
  border: none;
  color: var(--fg-light);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}

.upsell-card__dismiss:hover {
  color: var(--fg);
}

/* --- Session-Wrap Useful Rating Card (graduated users) --- */
/* Same family as .upsell-card and .reflection-panel — same border-radius,
   padding scale, warm bg, muted palette — so the check-in card visually
   belongs on the session-complete view regardless of which tier surfaces
   which card stack. */
.useful-card {
  max-width: 560px;
  margin: 20px auto 0;
  padding: 24px 28px;
  background: var(--bg-warm, #F0EAE0);
  border: 1px solid rgba(139, 105, 20, 0.15);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.useful-card__prompt {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.useful-card__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 4px;
}

.useful-card__thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--fg-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s, color 0.15s, transform 0.1s, background 0.15s;
}

.useful-card__thumb:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.useful-card__thumb:active:not(:disabled) {
  transform: translateY(0);
}

.useful-card__thumb:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.useful-card__thumb.is-pressed {
  border-color: var(--accent);
  background: rgba(139, 105, 20, 0.08);
  color: var(--accent);
}

.useful-card__thanks {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--fg-light);
  text-align: center;
  margin: 0;
  padding: 4px 0;
}

/* --- Coaching Main (wraps the coaching page) --- */
.coaching-main {
  padding-top: 64px;
}

/* --- Pre-Session Check-In Panel --- */
.checkin-panel {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.checkin-panel__inner {
  max-width: 700px;
  width: 100%;
  text-align: center;
}

.checkin-panel__intro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--fg-light);
  margin: 0 0 12px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.checkin-panel__prompt {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 300;
  color: var(--fg);
  margin: 0 auto 32px;
  line-height: 1.3;
  max-width: 520px;
}

.checkin-panel .topic-grid {
  text-align: left;
  grid-template-columns: 1fr 1fr;
}

.checkin-panel .topic-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  font-weight: 400;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s, background 0.15s;
}

.checkin-panel .topic-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(42,40,37,0.08);
  transform: translateY(-1px);
}

.checkin-panel .topic-card:active {
  transform: translateY(0);
}

.checkin-panel .topic-card.is-selected {
  border-color: var(--accent);
  background: var(--bg-warm, #f9f6f1);
  box-shadow: 0 0 0 2px rgba(139,105,20,0.18);
}

.checkin-panel__progress {
  margin: 24px 0 0;
  font-size: 0.75rem;
  color: var(--fg-light);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 300;
}

@media (max-width: 640px) {
  .checkin-panel .topic-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Session Orientation Panel --- */
.orientation-panel {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.orientation-panel__inner {
  max-width: 640px;
  width: 100%;
  background: var(--bg-warm, #F0EAE0);
  border: 1px solid rgba(139, 105, 20, 0.15);
  border-radius: 20px;
  padding: 40px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.orientation-panel__intro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--fg-light);
  margin: 0;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.orientation-panel__body {
  font-size: 1rem;
  color: var(--fg);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.orientation-panel__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .orientation-panel {
    padding: 32px 20px;
  }

  .orientation-panel__inner {
    padding: 32px 24px;
  }
}