/* Reflection Encourager v0.4.4
   Front-end styling now intentionally mirrors the Church Encourager / Christian Practices prayer-reflection visual system.
   It reuses CEP class names when the Church Encourager plugin CSS is present and includes safe fallbacks here. */

.reflection-encourager {
  --cep-ink: var(--cep-ink, #213a2c);
  --cep-muted: var(--cep-muted, #607080);
  --cep-line: var(--cep-line, #e7ded4);
  --cep-bg: var(--cep-bg, #fbfaf8);
  --cep-panel: var(--cep-panel, #ffffff);
  --cep-green: var(--cep-green, #2f5d50);
  --cep-teal: var(--cep-teal, #006b73);
  --cep-gold: var(--cep-gold, #a9793b);
  --cep-heart: var(--cep-heart, #b86a58);
  max-width: 760px;
  margin: 28px auto;
  font-family: inherit;
  color: var(--cep-ink);
}

.reflection-encourager .cep-email-panel,
.reflection-encourager .re-card,
.reflection-encourager .re-invite {
  margin-top: 18px;
  padding: 22px;
  border-radius: 18px;
  background: #fbfaf8;
  border: 1px solid var(--cep-line);
  box-shadow: 0 14px 30px rgba(13,31,55,.045);
}

.reflection-encourager h3,
.reflection-encourager .cep-email-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  margin: 0 0 8px;
  color: var(--cep-ink);
  line-height: 1.15;
}

.reflection-encourager .re-intro,
.reflection-encourager .cep-email-panel p {
  margin: 0 0 16px;
  color: var(--cep-muted);
  line-height: 1.58;
}

.reflection-encourager .re-practice-prompt,
.reflection-encourager .cep-prayer-prompt {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--cep-line);
  border-bottom: 1px solid var(--cep-line);
}

.reflection-encourager .re-followup .re-practice-prompt,
.reflection-encourager .re-followup .cep-prayer-prompt {
  border-top: 0;
  margin-bottom: 10px;
}

.reflection-encourager .cep-prayer-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f7f0e7;
  color: #6f8f6a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 2px;
}

.reflection-encourager .cep-prayer-content label strong,
.reflection-encourager .re-label strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: var(--cep-ink);
  margin-bottom: 4px;
}

.reflection-encourager .cep-prayer-content label span,
.reflection-encourager .re-label span {
  display: block;
  color: var(--cep-muted);
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: 8px;
  font-weight: 400;
}

.reflection-encourager .re-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.reflection-encourager textarea,
.reflection-encourager .cep-prayer-content textarea,
.reflection-encourager .re-reflection,
.reflection-encourager .re-followup-text {
  width: 100%;
  min-height: 86px;
  border: 0;
  border-bottom: 1px solid var(--cep-line);
  border-radius: 0;
  resize: vertical;
  font: inherit;
  color: var(--cep-ink);
  padding: 8px 0;
  background: transparent;
  outline: none;
  line-height: 1.55;
  box-sizing: border-box;
}

.reflection-encourager .re-reflection { min-height: 132px; }
.reflection-encourager .re-followup-text { min-height: 96px; }

.reflection-encourager textarea:focus,
.reflection-encourager .cep-prayer-content textarea:focus {
  border-bottom-color: #6f8f6a;
}

.reflection-encourager textarea::placeholder { color: #9aa4b3; }

.reflection-encourager .re-speech-controls,
.reflection-encourager .cep-speech-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.reflection-encourager .cep-speak-button,
.reflection-encourager .cp-speak-button,
.reflection-encourager .re-speak {
  border: 0;
  border-radius: 999px;
  background: var(--cep-ink);
  color: #fff;
  font-weight: 800;
  padding: 10px 16px;
  box-shadow: 0 8px 20px rgba(16,32,51,.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
}

.reflection-encourager .cep-speak-button:hover,
.reflection-encourager .cp-speak-button:hover,
.reflection-encourager .re-speak:hover { filter: brightness(1.08); }

.reflection-encourager .cep-speak-button.is-listening,
.reflection-encourager .cp-speak-button.is-listening,
.reflection-encourager .re-speak.is-listening {
  background: var(--cep-heart) !important;
  color: #fff !important;
  box-shadow: 0 0 0 4px rgba(184,106,88,.18), 0 8px 20px rgba(16,32,51,.08) !important;
}

.reflection-encourager .cep-speech-status,
.reflection-encourager .re-speech-status {
  color: var(--cep-muted);
  font-size: .92rem;
}

.reflection-encourager .re-consent {
  display: block;
  margin: 14px 0 0;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--cep-muted);
}

.reflection-encourager .re-submit,
.reflection-encourager .re-reply,
.reflection-encourager .re-finish,
.reflection-encourager .re-open,
.reflection-encourager .re-quick-reply {
  display: inline-block;
  margin-top: 16px;
  margin-right: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 900;
  cursor: pointer;
}

.reflection-encourager .re-open,
.reflection-encourager .re-submit,
.reflection-encourager .re-reply {
  background: var(--cep-ink);
  color: #fff;
}

.reflection-encourager .re-finish {
  background: #f7f0e7;
  color: var(--cep-ink);
}

.reflection-encourager .re-submit:hover,
.reflection-encourager .re-reply:hover,
.reflection-encourager .re-finish:hover,
.reflection-encourager .re-open:hover,
.reflection-encourager .re-quick-reply:hover { opacity: .92; }

.reflection-encourager button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.reflection-encourager .re-status {
  margin-top: 14px;
  font-weight: 700;
  color: var(--cep-muted);
}

.reflection-encourager .re-error { color: #9b1c1c; }

.reflection-encourager .re-conversation {
  margin-top: 22px;
}

.reflection-encourager .re-message {
  margin: 14px 0;
  padding: 16px 18px;
  border-radius: 16px;
  line-height: 1.62;
  border: 1px solid var(--cep-line);
  box-shadow: 0 8px 18px rgba(13,31,55,.035);
}

.reflection-encourager .re-assistant {
  border-left: 4px solid #6f8f6a;
  background: #fff;
}

.reflection-encourager .re-user {
  background: #f7f0e7;
}

.reflection-encourager .re-message-label {
  font-weight: 900;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--cep-ink);
}

.reflection-encourager .re-message-content p:last-child { margin-bottom: 0; }

.reflection-encourager .re-followup {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--cep-line);
}

.reflection-encourager .re-quick-replies {
  margin: 0 0 12px;
}

.reflection-encourager .re-quick-reply {
  margin-top: 0;
  border: 1px solid rgba(111,143,106,.28);
  padding: 9px 17px;
  background: rgba(111,143,106,.12);
  color: var(--cep-ink);
}

@media (max-width: 640px) {
  .reflection-encourager { margin: 20px auto; }
  .reflection-encourager .cep-email-panel,
  .reflection-encourager .re-card,
  .reflection-encourager .re-invite { padding: 18px; }
  .reflection-encourager .re-practice-prompt,
  .reflection-encourager .cep-prayer-prompt { grid-template-columns: 1fr; gap: 10px; }
  .reflection-encourager .cep-prayer-icon { width: 38px; }
}


/* v0.4.4 visibility refinements: keep controls readable even when theme/plugin button styles load later. */
.reflection-encourager .re-reflection,
.reflection-encourager .re-followup-text,
.reflection-encourager textarea {
  background: #ffffff !important;
  border: 1px solid #d9cfc3 !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  box-shadow: inset 0 1px 2px rgba(13,31,55,.04) !important;
}

.reflection-encourager .re-reflection:focus,
.reflection-encourager .re-followup-text:focus,
.reflection-encourager textarea:focus {
  border-color: #6f8f6a !important;
  box-shadow: 0 0 0 3px rgba(111,143,106,.16), inset 0 1px 2px rgba(13,31,55,.04) !important;
}

.reflection-encourager .re-open,
.reflection-encourager .re-submit,
.reflection-encourager .re-reply,
.reflection-encourager .cep-speak-button,
.reflection-encourager .cp-speak-button,
.reflection-encourager .re-speak {
  background: #213a2c !important;
  color: #ffffff !important;
  border: 1px solid #213a2c !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

.reflection-encourager .re-open:hover,
.reflection-encourager .re-submit:hover,
.reflection-encourager .re-reply:hover,
.reflection-encourager .cep-speak-button:hover,
.reflection-encourager .cp-speak-button:hover,
.reflection-encourager .re-speak:hover {
  background: #2f5d50 !important;
  border-color: #2f5d50 !important;
  color: #ffffff !important;
}

.reflection-encourager .re-finish {
  background: #f7f0e7 !important;
  color: #213a2c !important;
  border: 1px solid #d9cfc3 !important;
}

.reflection-encourager .re-quick-reply {
  background: #eef5ec !important;
  color: #213a2c !important;
  border: 1px solid rgba(111,143,106,.38) !important;
}

.reflection-encourager button:disabled,
.reflection-encourager .re-submit:disabled,
.reflection-encourager .re-reply:disabled,
.reflection-encourager .re-open:disabled {
  background: #d9cfc3 !important;
  border-color: #d9cfc3 !important;
  color: #5b6570 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

.reflection-encourager .re-consent {
  color: #213a2c !important;
}

.reflection-encourager .re-consent-checkbox {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}

/* v0.4.6 graceful exit and prayer-to-reflection actions */
.reflection-encourager .re-actions,
.reflection-encourager .re-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.reflection-encourager .re-post-actions {
  padding-top: 18px;
  border-top: 1px solid var(--cep-line, #e7ded4);
}

.reflection-encourager .re-actions .re-submit {
  margin-top: 0;
}

.reflection-encourager .re-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  text-decoration: none !important;
  border: 1px solid #d9cfc3;
  background: #f7f0e7;
  color: #213a2c !important;
}

.reflection-encourager .re-secondary-link:hover {
  background: #efe3d5;
  color: #213a2c !important;
}

.reflection-encourager .re-reflections-link {
  background: #eef5ec;
  border-color: rgba(111,143,106,.38);
}

.reflection-encourager .re-reflections-link:hover {
  background: #e4f0e2;
}

@media (max-width: 640px) {
  .reflection-encourager .re-actions,
  .reflection-encourager .re-post-actions {
    align-items: stretch;
  }
  .reflection-encourager .re-actions > *,
  .reflection-encourager .re-post-actions > * {
    width: 100%;
    text-align: center;
  }
}
