/* ===============================
   ðŸŒ¹ Rosary Page â€“ Premium Layout
   =============================== */

.rosary-container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fdf8f0;
  padding: 2rem;
  border: 1px solid #d4c7a1;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: "Crimson Pro", "Cormorant Garamond", serif;
}

/* === MYSTERY HEADER === */
.mystery-header {
  text-align: center;
  background: radial-gradient(circle at center, #fffdf6 0%, #f8eed0 85%, #e8d697 100%);
  border-radius: 14px;
  border: 2px solid #c7a855;
  box-shadow:
    0 0 20px rgba(190,160,80,0.25),
    inset 0 0 15px rgba(255,255,200,0.25);
  margin-bottom: 1.5rem;
  padding: 1rem 0 0 0;  /* tighter top, remove bottom space */
}

.mystery-image-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(168,140,66,0.4);
  border: 1px solid #d6c48f;
}

.mystery-image {
  display: block;
  width: 100%;
  height: 300px; /* 🔽 reduced from 500px for balance */
  object-fit: cover;
  object-position: center 70%; /* keeps Mary centered */
  border-radius: 10px;
}

.mystery-image-wrap::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: radial-gradient(circle at center,
    rgba(255, 248, 210, 0.35) 0%,
    rgba(212, 179, 85, 0.25) 50%,
    rgba(180, 150, 60, 0.05) 80%,
    transparent 100%);
  box-shadow:
    inset 0 0 20px rgba(255, 250, 220, 0.35),
    inset 0 0 35px rgba(200,170,80,0.25);
  border-radius: 10px;
}

/* === TITLE === */
.mystery-title {
  font-family: "Cinzel Decorative", serif;
  font-size: 2rem;
  color: #4b3b1a;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  text-shadow:
    0 1px 0 #fff8e1,
    0 0 10px rgba(180,140,60,0.4);
}


/* === INTENTIONS === */
.intentions-box {
  background: #faf6ee;
  border: 1px solid #e3d7b5;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.intentions-box h3 {
  margin-top: 0;
  color: #7b6535;
}

.intentions-box textarea {
  width: 100%;
  height: 80px;
  border: none;
  resize: none;
  padding: 0.5rem;
  background: #fffdf7;
  font-size: 1rem;
  border-radius: 6px;
}

/* FIXED pill delete button */
.intentions-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1.2rem 0.4rem 0.75rem;
  background: #f4e5c5;
  border-radius: 999px;
  border: 1px solid #d3b270;
  font-size: 0.9rem;
  color: #5b4823;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

#intentions-prayer-view .intentions-pill {
  margin-bottom: 0.4rem;
}

.pill-delete-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 0.75rem;
  background: #b37c4b;
  color: white;
  cursor: pointer;
  line-height: 18px;
  text-align: center;
}

.pill-delete-btn:hover {
  background: #965f33;
}

/* === PRAYER TEXT COLUMNS === */
.prayer-columns {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.prayer-columns div {
  flex: 1;
  padding: 1rem;
  border-left: 2px solid #e6d3a2;
}

.prayer-columns h4 {
  font-family: "Cinzel", serif;
  color: #7b6535;
  border-bottom: 1px solid #d4c7a1;
  padding-bottom: 0.25rem;
}

/* === HAIL MARY PROGRESS === */
.hailmary-progress {
  text-align: center;
  margin: 2rem 0;
  font-size: 1.2rem;
  color: #a6935a;
  letter-spacing: 0.25rem;
}

.hailmary-progress span.active {
  color: #c5a44a;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(197,164,74,0.6);
}

/* === NAVIGATION === */
.rosary-nav {
  text-align: center;
  margin-top: 2rem;
}

.nav-btn {
  background: #c5a44a;
  color: #fffdf7;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  margin: 0 0.5rem;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  transition: background 0.3s;
}

.nav-btn:hover {
  background: #b28f3e;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .mystery-title {
    font-size: 1.6rem;
  }
  .mystery-image-wrap {
    max-width: 100%;
  }
  .prayer-columns {
    flex-direction: column;
  }
}
.mystery-title {
  position: relative;
  margin-bottom: 1rem;
}

.mystery-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  background: linear-gradient(to right, #d6b85f, #fff8e1, #d6b85f);
  margin: 0.75rem auto 0;
  border-radius: 3px;
}

/* ===============================
   SPLASH PAGE STYLES
   =============================== */

.rosary-splash {
  max-width: 1100px;
  margin: 0 auto 2rem;
  background: #fdf8f0;
  padding: 2rem 2.5rem;
  border-radius: 14px;
  border: 1px solid #d4c7a1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  font-family: "Crimson Pro", "Cormorant Garamond", serif;
}

.splash-header {
  text-align: center;
  margin-bottom: 2rem;
}

.splash-title {
  font-family: "Cinzel Decorative", serif;
  font-size: 2.4rem;
  color: #4b3b1a;
  margin: 0;
}

.splash-title-underline {
  width: 140px;
  height: 3px;
  margin: 0.75rem auto 1.5rem;
  border-radius: 3px;
  background: linear-gradient(to right, #d6b85f, #fff8e1, #d6b85f);
}

.splash-banner img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d6c48f;
  box-shadow: 0 0 18px rgba(168,140,66,0.4);
}

/* Sections */
.splash-section {
  margin-bottom: 2rem;
}

.splash-section h2 {
  font-family: "Cinzel", serif;
  font-size: 1.3rem;
  color: #7b6535;
  margin-bottom: 0.75rem;
}

/* Intentions input + tags */
.intentions-input-row {
  margin-bottom: 0.75rem;
}

#intention-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d4c7a1;
  background: #fffdf7;
  font-size: 1rem;
}

.intentions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.intentions-pill {
  position: relative;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  background: #f4e5c5;
  border-radius: 999px;
  border: 1px solid #d3b270;
  font-size: 0.9rem;
  color: #5b4823;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.intentions-pill button {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  font-size: 0.7rem;
  background: #b37c4b;
  color: #fff;
  cursor: pointer;
}

/* Mystery selector */
.mystery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.mystery-card {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mystery-card-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.mystery-card-label {
  padding: 0.5rem 0.75rem;
  background: #f7ecd2;
  font-size: 0.95rem;
  color: #5b4823;
  text-align: center;
}

.mystery-card:hover {
  box-shadow: 0 0 12px rgba(209,176,92,0.6);
  transform: translateY(-1px);
}

.mystery-card.selected {
  box-shadow: 0 0 18px rgba(209,176,92,0.9);
}

/* Mystery summary */
.mystery-summary {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fbf3de;
  border: 1px solid #decb96;
  font-size: 0.95rem;
}

.mystery-summary-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.mystery-summary-list {
  margin: 0;
  padding-left: 1.2rem;
}

/* Options */
.option-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.98rem;
}

.option-help {
  font-size: 0.85rem;
  color: #8a7548;
}

.audible-language-select {
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #d4c7a1;
  background: #fffdf7;
}

/* Let us pray button */
.splash-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.start-rosary-btn {
  background: #c5a44a;
  color: #fffdf7;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.8rem;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.start-rosary-btn:hover {
  background: #b28f3e;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
}

/* Roman numeral spacing tweak (will refine logic later) */
.hailmary-progress span {
  display: inline-block;
  margin: 0 0.3rem;
  letter-spacing: 0.15rem;
}

/* Remove Kadence theme’s auto-added input buttons around intention input */
.intentions-section button,
.intentions-section .kb-form-field-submit,
.intentions-section .wp-block-search__button,
.intentions-section .wp-block-button__link {
  display: none !important;
}

/* Remove weird Kadence auto-generated tokens (the brown ovals) */
.intentions-section .kadence-blocks-form-field,
.intentions-section input + * {
  display: none !important;
}

/* Restore delete buttons inside intention pills */
.intentions-pill button {
  display: block !important;
}

/* ===============================
   Intention Pills – Icon, Category, Animation
   =============================== */

.intentions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 0.5rem;
  position: relative;
}

/* subtle scroll shadow at bottom */
.intentions-tags::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(253,248,240,0), #fdf8f0);
}

.intentions-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  background: #f4e5c5;
  border-radius: 999px;
  border: 1px solid #d3b270;
  font-size: 0.9rem;
  color: #5b4823;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  font-family: "Crimson Pro", "Cormorant Garamond", serif;
}

.pill-cross {
  font-size: 0.9rem;
  color: #b2883b;
}

.pill-text {
  white-space: nowrap;
}

.pill-category {
  margin-left: 0.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #e4cf96;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Delete button (splash only) */
.pill-delete-btn {
  border: none;
  cursor: pointer;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 18px;
  text-align: center;
  padding: 0;
  background: #b37c4b;
  color: #fff;
}

.pill-delete-btn:hover {
  background: #965f33;
}

/* Fade-in animation for new pills */
@keyframes pillFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pill-enter {
  animation: pillFadeIn 0.25s ease-out;
}

/* ===============================
   Collapsible Intentions (Prayer Page)
   =============================== */

.intentions-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0.5rem;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: #7b6535;
  cursor: pointer;
}

.intentions-toggle:hover .intentions-chevron {
  color: #b28f3e;
}

.intentions-chevron {
  font-size: 0.9rem;
}

.intentions-collapsible.intentions-open {
  max-height: 150px;
  opacity: 1;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.intentions-collapsible.intentions-closed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}

.intentions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  overflow: visible;
  width: 100%;
}

/* --- Intentions pills: make sure nothing clips the shadow --- */
.rosary-container,
.rosary-splash,
.intentions-section,
.intentions-box,
.intentions-tags {
  overflow: visible !important;
}

/* Give the pill row a tiny bit of bottom padding so the shadow has room */
.intentions-tags {
  padding-bottom: 0.6rem;
}

/* And a hair more vertical size on the pill itself so the ellipse looks full */
.intentions-pill {
  padding: 0.45rem 0.9rem 0.5rem 0.75rem; /* slightly more bottom padding */
}

/* ===============================
   ROSARY COMPLETION PAGE — Missal Style
   =============================== */

.rosary-completed {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background: #fdf8f0;
  border: 2px solid #d4c7a1;
  border-radius: 14px;
  box-shadow:
    0 0 30px rgba(168,140,66,0.25),
    inset 0 0 30px rgba(255,250,220,0.4);
  font-family: "Crimson Pro", serif;
  text-align: center;
}

.completion-wrapper {
  position: relative;
  padding: 2rem 1rem;
}

.completion-title {
  font-family: "Cinzel Decorative", serif;
  font-size: 2.4rem;
  color: #4b3b1a;
  margin-bottom: 1.5rem;
  text-shadow:
    0 1px 0 #fff8e1,
    0 0 10px rgba(180,140,60,0.4);
}

.completion-text {
  font-size: 1.35rem;
  color: #5c4a28;
  line-height: 1.6;
  margin: 2rem 0;
}

/* Ornamental borders — top & bottom */
.completion-ornament-top,
.completion-ornament-bottom {
  width: 100%;
  height: 28px;
  background: url('../rosary/images/missal-border.png') center/contain no-repeat;
  margin: 1.5rem auto;
  opacity: 0.8;
}

/* Return button */
.completion-return-btn {
  background: #b5974b;
  color: #fffef7;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.2rem;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: background 0.3s ease, transform 0.2s ease;
}

.completion-return-btn:hover {
  background: #a4873d;
  transform: translateY(-1px);
}


/* ===============================
   ROSARY VIEW STATES
   =============================== */

/* Default splash: show splash, hide main & completed */
body.rosary-state-splash #rosary-splash {
  display: block;
}
body.rosary-state-splash #rosary-main,
body.rosary-state-splash #rosary-completed {
  display: none;
}

/* Main praying state: show main, hide splash & completed */
body.rosary-state-main #rosary-splash,
body.rosary-state-main #rosary-completed {
  display: none;
}
body.rosary-state-main #rosary-main {
  display: block;
}

/* Completed: show completion page only */
body.rosary-state-completed #rosary-splash,
body.rosary-state-completed #rosary-main {
  display: none;
}
body.rosary-state-completed #rosary-completed {
  display: block;
}

body.rosary-state-completed #rosary-main-wrap {
  display: none !important;
}

/* Hide main Rosary content completely when completed */
body.rosary-state-completed #rosary-main {
    display: none !important;
}

/* Kadence wraps content in .entry-content, so force-hide any first child that isn't the completed section */
body.rosary-state-completed #rosary-main-wrap {
    display: none !important;
}

/* Autoplay option row (hidden unless audible is selected) */
.autoplay-row {
  display: none; /* JS will flip this to flex when Audible is checked */
}

/* Secondary nav buttons (Pause / Resume / Return) */
.nav-btn.nav-btn-secondary {
  background: #b5a064;
  margin-left: 0.5rem;
}

.nav-btn.nav-btn-secondary:hover {
  background: #a08b50;
}

/* Mystery banner wrapper */
.mystery-image-wrap {
  width: 100%;
  max-width: 1200px; /* your content width */
  margin: 0 auto 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* The image itself */
.mystery-image {
  width: 100%;
  height: 280px;            /* <- Adjust height as desired */
  object-fit: cover;        /* ensures center crop, no distortion */
  object-position: center;  /* centers the mystery artwork */
  display: block;
  border-radius: 12px;
}

/* ================================
   AUDIO SPEED BUTTONS — BEAUTIFUL
   ================================ */

.speed-btn,
.audio-speed-btn {
  background: #c5a44a;       /* match nav buttons */
  color: #fffdf7;
  border: none;
  border-radius: 20px;
  padding: 0.40rem 1.0rem;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  min-width: 60px;
  text-align: center;
}

.speed-btn:hover,
.audio-speed-btn:hover {
  background: #b28f3e;
  transform: translateY(-2px);
}

.speed-btn.active-speed,
.audio-speed-btn.active-speed {
  background: #a27e34 !important;
}

.mystery-header {
    padding-top: 0 !important;
}

.mystery-image-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Fully eliminate any gap above the image */
.mystery-image {
    display: block;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.mystery-image-wrap {
    background: #fefaf4;
    border: 1px solid #d6c48f;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* Tighten spacing above/below the mystery title */
.mystery-header {
    padding-top: 0.5rem !important;   /* was larger */
    padding-bottom: 0.5rem !important;
}

.mystery-title {
    margin-top: 0.25rem !important;   /* was 0.75–1.0rem */
    margin-bottom: 0.35rem !important;
}

.mystery-title::after {
    margin-top: 0.35rem !important;   /* tighten underline spacing */
    margin-bottom: 0 !important;
}

/* Remove unwanted Kadence padding around the mystery header */
.mystery-header {
    padding-top: 0 !important;
    padding-bottom: 0.5rem !important; /* small breathing room under title */
    margin-top: 0 !important;          /* removes theme padding above the image */
}

/* Ensure image is flush to top of header */
.mystery-image-wrap {
    margin-top: 0 !important;
}

/* Title spacing: perfect balance between above/below */
.mystery-title {
    margin-top: 0.35rem !important;    /* equal top */
    margin-bottom: 0.35rem !important; /* equal bottom */
}

/* Underline spacing tightened */
.mystery-title::after {
    margin-top: 0.35rem !important;
    margin-bottom: 0 !important;
}

/* Remove all theme-added padding */
.mystery-header {
    padding: 0 !important;
    margin: 0 !important;
}

/* Image stays snug to top */
.mystery-image-wrap {
    margin: 0 !important;
}

/* PERFECT symmetrical title spacing */
.mystery-title {
    margin-top: 0.5rem !important;     /* equal spacing above */
    margin-bottom: 0.5rem !important;  /* equal spacing below */
    padding: 0 !important;
}

/* Underline spacing tightened to eliminate "extra" bottom space */
.mystery-title::after {
    margin-top: 0.35rem !important;   /* closer to title */
    margin-bottom: 0 !important;      /* remove downward push */
}