/*
 * Orthodox Christian Prayer Book styling
 * Aesthetic: traditional prayer book with serif typography,
 * deep red/gold accents, ornate borders, and dignified layout.
 */

/* ---------------------------------------------------------------------------
   CSS custom properties (palette from reference prayer books)
   --------------------------------------------------------------------------- */
:root {
  --oc-bg: #fafaf8;
  --oc-paper: #fffef9;
  --oc-text: #1a1a1a;
  --oc-text-muted: #3d3d3d;
  --oc-red: #8b1538;
  --oc-red-deep: #6b0f2a;
  --oc-maroon: #722f37;
  --oc-gold: #b8860b;
  --oc-gold-light: #c9a227;
  --oc-teal: #2d5a5a;
  --oc-border: #6b2d2d;
  --oc-border-light: #a05252;
  --oc-drop-cap: var(--oc-red-deep);
  --oc-heading: var(--oc-red);
  --oc-link: var(--oc-red);
  --oc-link-hover: var(--oc-red-deep);
  --oc-success: #2d5a2d;
  --oc-alert-bg: #fdf0f0;
  --oc-alert-border: var(--oc-red);
  --oc-font-serif: "EB Garamond", "Georgia", "Times New Roman", serif;
  --oc-font-display: "EB Garamond", "Georgia", serif;
  --oc-space: 1.25rem;
  --oc-radius: 0;
  --oc-border-width: 2px;
  --oc-shadow: 0 1px 3px rgba(107, 15, 42, 0.08);
}

/* ---------------------------------------------------------------------------
   Base & typography
   --------------------------------------------------------------------------- */
html {
  box-sizing: border-box;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--oc-font-serif);
  font-weight: 400;
  line-height: 1.65;
  color: var(--oc-text);
  background: var(--oc-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------------------------------------------------------------------
   Page frame (centered content with ornamental border)
   --------------------------------------------------------------------------- */
.page-wrap {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: var(--oc-space);
  flex: 1;
}

.page-frame {
  position: relative;
  background: var(--oc-paper);
  padding: 2rem 2.5rem 2.5rem;
  box-shadow: var(--oc-shadow);
  border: var(--oc-border-width) solid var(--oc-border);
  border-radius: 2px;
}

/* Ornamental border effect: inner line */
.page-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--oc-border-light);
  border-radius: 1px;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Ornaments (header / footer decorative bands)
   Orthodox motif: equal-arm (Byzantine) crosses on a vine-style line in maroon and gold.
   --------------------------------------------------------------------------- */
.ornament-top {
  display: block;
  width: 100%;
  height: 28px;
  margin-bottom: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 28' fill='none'%3E%3C!-- Vine line --%3E%3Cpath d='M0 14h48' stroke='%236b2d2d' stroke-width='1.2'/%3E%3Cpath d='M0 11h48' stroke='%23b8860b' stroke-width='0.5' opacity='0.85'/%3E%3C!-- Equal-arm (Byzantine) cross --%3E%3Cpath d='M22 14h4 M24 10v8' stroke='%236b0f2a' stroke-width='1.4' fill='none' stroke-linecap='square'/%3E%3Cpath d='M24 14m-2.5 0a2.5 2.5 0 1 1 5 0a2.5 2.5 0 1 1-5 0' stroke='%236b0f2a' stroke-width='0.8' fill='none'/%3E%3C/svg%3E") center center repeat-x;
  background-size: 48px 28px;
}

.ornament-bottom {
  display: block;
  width: 100%;
  height: 20px;
  margin-top: 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20' fill='none'%3E%3Cpath d='M0 10h48' stroke='%236b2d2d' stroke-width='1'/%3E%3Cpath d='M0 8h48' stroke='%23b8860b' stroke-width='0.4' opacity='0.8'/%3E%3Cpath d='M22 10h4 M24 6v8' stroke='%236b0f2a' stroke-width='1.2' fill='none' stroke-linecap='square'/%3E%3C/svg%3E") center center repeat-x;
  background-size: 48px 20px;
}

/* ---------------------------------------------------------------------------
   Headings (all caps for main titles, red accent)
   --------------------------------------------------------------------------- */
h1, .page-title {
  font-family: var(--oc-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oc-heading);
  margin: 0 0 0.75rem;
  text-align: center;
  line-height: 1.3;
}

.page-title-left {
  text-align: left;
  margin: 0;
}

h2 {
  font-family: var(--oc-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--oc-heading);
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
}

h3 {
  font-family: var(--oc-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--oc-maroon);
  margin: 0.75rem 0 0.35rem;
}

/* ---------------------------------------------------------------------------
   Body text & drop cap
   --------------------------------------------------------------------------- */
p {
  margin: 0 0 1rem;
  text-align: left;
}

.body-prose {
  text-align: justify;
}

.body-prose p:first-of-type::first-letter {
  font-family: var(--oc-font-display);
  font-size: 3.2em;
  font-weight: 600;
  float: left;
  line-height: 0.85;
  margin: 0.08em 0.08em 0 -0.02em 0;
  color: var(--oc-drop-cap);
}

/* ---------------------------------------------------------------------------
   Links
   --------------------------------------------------------------------------- */
a {
  color: var(--oc-link);
  text-decoration: none;
}

a:hover {
  color: var(--oc-link-hover);
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Lists (prayer list as table-of-contents style)
   --------------------------------------------------------------------------- */
.prayer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prayer-list li {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

.prayer-list .category-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--oc-heading);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.prayer-list .subsection-title {
  font-weight: 600;
  color: var(--oc-maroon);
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
  padding-left: 1rem;
}

/* ---------------------------------------------------------------------------
   Prayer request cards (separator with small flourish: line + cross)
   --------------------------------------------------------------------------- */
.prayer-request {
  margin-bottom: 0;
  padding-bottom: 0.75rem;
  position: relative;
}

/* Flourish: short line segments with a small equal-arm cross in the center */
.prayer-request::after {
  content: "";
  display: block;
  width: 100%;
  height: 14px;
  margin-top: 0.75rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' fill='none'%3E%3Cpath d='M 0 7 L 50 7 M 70 7 L 120 7' stroke='%236b2d2d' stroke-width='0.9' stroke-linecap='round' opacity='0.7'/%3E%3Cpath d='M 57 7 h6 M 60 4 v6' stroke='%236b2d2d' stroke-width='0.9' fill='none' stroke-linecap='round' opacity='0.85'/%3E%3C/svg%3E") center center no-repeat;
  background-size: 120px 14px;
}

.prayer-request:last-child::after {
  display: none;
}

.prayer-request .meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--oc-text-muted);
  margin-top: 0.5rem;
}

/* ---------------------------------------------------------------------------
   Forms (labels, inputs, buttons in theme)
   --------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--oc-text);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"],
select,
textarea {
  font-family: var(--oc-font-serif);
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--oc-border-light);
  background: var(--oc-paper);
  color: var(--oc-text);
  width: 100%;
  max-width: 28rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--oc-gold);
  outline-offset: 1px;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--oc-font-serif);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--oc-border);
  background: var(--oc-paper);
  color: var(--oc-red-deep);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--oc-red-deep);
  color: var(--oc-paper);
}

.btn-primary {
  background: var(--oc-red);
  color: var(--oc-paper);
  border-color: var(--oc-red-deep);
}

.btn-primary:hover {
  background: var(--oc-red-deep);
  color: var(--oc-paper);
}

.btn-danger {
  background: var(--oc-red-deep);
  color: var(--oc-paper);
  border-color: var(--oc-red-deep);
}

.btn-danger:hover {
  background: var(--oc-maroon);
  color: var(--oc-paper);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.375rem 0.75rem;
}

/* ---------------------------------------------------------------------------
   Flash messages & alerts
   --------------------------------------------------------------------------- */
.flash-notice {
  color: var(--oc-success);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--oc-success);
  background: rgba(45, 90, 45, 0.08);
}

.flash-alert {
  color: var(--oc-red-deep);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--oc-alert-border);
  background: var(--oc-alert-bg);
}

.dev-notice {
  color: var(--oc-maroon);
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--oc-gold);
  background: rgba(184, 134, 11, 0.08);
  max-width: 36rem;
}

.dev-notice strong {
  color: var(--oc-red-deep);
}

.dev-notice a {
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Utility & layout
   --------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.actions-between {
  justify-content: space-between;
}

.actions-end {
  justify-content: flex-end;
}

.actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Login page */
.login-page .page-frame {
  text-align: center;
}

.login-page p {
  text-align: center;
  margin-bottom: 1rem;
}

/* Errors list */
.errors-list {
  color: var(--oc-red-deep);
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--oc-alert-border);
  background: var(--oc-alert-bg);
}

.errors-list ul {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
}

.errors-list li {
  margin-bottom: 0.25rem;
}

/* Horizontal rule (ornamental divider) */
.hr-ornament {
  border: none;
  border-bottom: 1px solid rgba(107, 45, 45, 0.2);
  margin: 0.5rem 0;
}

/* Inline form (e.g. button_to next to a link_to button) */
form.actions-inline {
  display: inline;
  margin: 0;
}

/* Checkbox styling */
input[type="checkbox"] {
  width: auto;
  max-width: none;
  margin-right: 0.5rem;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
}

.form-group.checkbox label {
  margin-bottom: 0;
  margin-left: 0.25rem;
}
