/* 1. LAYOUT WRAPPERS & FIXED VIEWPORT ANCHORING                             */

/* Left stacked reminders zone */
#sticky-reminders-wrapper {
  position: fixed !important;
  left: 0 !important;
  top: 25% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  z-index: 999800 !important;
  pointer-events: none !important; /* Let clicks pass to underlying widgets when collapsed */
}

/* Ensure child stickies restore pointer events for clicks */
#church-sticky-reminder,
#church-event-sticky-reminder {
  position: relative !important;
  pointer-events: auto !important;
  display: flex !important;
}

/* 2. LEFT SIDEBAR DRAWERS: STRUCTURE & SWAP TRANSITIONS                     */

#church-sticky-reminder,
#church-event-sticky-reminder {
  width: 280px !important;
  background: #ffffff !important;
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.12) !important;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
  box-sizing: border-box !important;
  transform: translateX(0) !important;
}

#church-sticky-reminder.reminder-hidden,
#church-event-sticky-reminder.reminder-hidden {
  transform: translateX(-100%) !important;
}

/* 2.1 Content Inside Drawers */
.reminder-content {
  padding: 20px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  text-align: left !important;
}

.reminder-tag {
  background: #fa8334 !important; /* ORPC Accent Orange */
  color: #ffffff !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  font-weight: bold !important;
  padding: 3px 8px !important;
  border-radius: 3px !important;
  letter-spacing: 1px !important;
  display: inline-block !important;
}

.reminder-content h3 {
  font-family: 'Raleway', sans-serif !important;
  margin: 12px 0 6px 0 !important;
  font-size: 16px !important;
  color: #1b1b1e !important;
  line-height: 1.3 !important;
  font-weight: bold !important;
}

.reminder-content p {
  font-size: 13px !important;
  color: #373f51 !important;
  line-height: 1.45 !important;
  margin-bottom: 15px !important;
}

.reminder-btn {
  display: inline-block !important;
  background: #373f51 !important; /* Slate Charcoal */
  color: #ffffff !important;
  padding: 8px 16px !important;
  font-size: 11px !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  font-weight: bold !important;
  transition: background-color 0.2s ease !important;
}

.reminder-btn:hover {
  background: #fa8334 !important;
}

/* 2.2 Toggle Handles (The sticking tabs) */
#reminder-toggle,
#event-reminder-toggle {
  position: absolute !important;
  top: -1px !important;
  right: -40px !important;
  width: 40px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

#reminder-toggle-btn,
#event-reminder-toggle-btn {
  width: 40px !important;
  height: 45px !important;
  background: #ffffff !important;
  border: 1px solid #e8e7e8 !important;
  border-left: none !important;
  color: #1b1b1e !important;
  cursor: pointer !important;
  box-shadow: 4px 2px 8px rgba(0,0,0,0.06) !important;
  border-radius: 0 4px 0 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  padding: 0 !important;
}

#reminder-toggle-btn:hover,
#event-reminder-toggle-btn:hover {
  background: #e8e7e8 !important;
}

.reminder-vertical-text,
.event-vertical-text {
  width: 40px !important;
  background: #ffffff !important;
  border: 1px solid #e8e7e8 !important;
  border-left: none !important;
  border-top: none !important;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.06) !important;
  border-radius: 0 0 4px 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 15px 0 !important;
  cursor: pointer !important;
}

.reminder-vertical-text span,
.event-vertical-text span {
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
  font-family: 'Lato', sans-serif !important;
  font-size: 10px !important;
  font-weight: bold !important;
  color: #fa8334 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  white-space: nowrap !important;
}

/* 2.3 STICKY NOTICES: HARDWARE-ACCELERATED BELL & GLOW ANIMATIONS           */

/* Unified toggle-icon base class to support 3D transforms on all devices */
.toggle-icon {
  display: inline-block !important;
  -webkit-transform-origin: top center !important;
  transform-origin: top center !important;
  transition: transform 0.3s ease !important;
}

/* Natural Tolling Bell Animation (Pendulum Swing with iOS WebKit safeguards) */
.toggle-icon.bell-ringing {
  display: inline-block !important;
  -webkit-transform-origin: top center !important;
  transform-origin: top center !important;
  -webkit-animation: bell-natural-toll 2.5s infinite ease-in-out !important;
  animation: bell-natural-toll 2.5s infinite ease-in-out !important;
}

@-webkit-keyframes bell-natural-toll {
  0% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); }
  50% { -webkit-transform: rotate(18deg); transform: rotate(18deg); }
  100% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); }
}

@keyframes bell-natural-toll {
  0% { transform: rotate(-18deg); }
  50% { transform: rotate(18deg); }
  100% { transform: rotate(-18deg); }
}

/* Horizontal tab text color transition */
#church-sticky-reminder.reminder-hidden .reminder-vertical-text span {
  animation: textFade 6s infinite ease-in-out !important;
}

@keyframes textFade {
  0%, 100% { color: #fa8334; }
  50% { color: #1b1b1e; }
}

/* Red dot notification badge with NO text (Empty Dot) - Removed !important from display to allow jQuery .hide() / .show() to function */
.notice-badge {
  position: absolute !important;
  top: -2px !important;
  right: -2px !important;
  background: #e74c3c !important; /* Pastel Red Alert */
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

/* Open states hibernate animations automatically */
#church-sticky-reminder:not(.reminder-hidden) .toggle-icon,
#church-sticky-reminder:not(.reminder-hidden) .notice-badge {
  animation: none !important;
  display: none !important;
}

/* 2.4 UPCOMING EVENTS DRAWER: CAROUSEL COMPACT STEPPER STRUCTURE            */

.events-carousel-stepper {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 10px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid #e8e7e8 !important;
  padding-bottom: 8px !important;
}

.stepper-count {
  font-size: 11px !important;
  font-weight: bold !important;
  color: #373f51 !important;
  text-transform: uppercase !important;
}

.stepper-nav {
  display: flex !important;
  gap: 4px !important;
}

.step-btn {
  background: #e8e7e8 !important;
  border: none !important;
  color: #1b1b1e !important;
  font-size: 12px !important;
  font-weight: bold !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s !important;
}

.step-btn:hover {
  background: #fa8334 !important;
  color: #ffffff !important;
}

/* Hide inactive slides natively */
.events-slides-container {
  position: relative !important;
  overflow: hidden !important;
  min-height: 180px !important;
}

.event-card-slide {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease-in-out !important;
  display: flex !important;
  flex-direction: column !important;
}

.event-card-slide.active {
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.event-card-slide .event-title {
  font-family: 'Raleway', sans-serif !important;
  margin: 0 0 8px 0 !important;
  font-size: 14px !important;
  color: #1b1b1e !important;
  font-weight: bold !important;
  line-height: 1.3 !important;
}

.event-card-slide .event-excerpt {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: #373f51 !important;
  margin: 8px 0 12px 0 !important;
}

.event-btn {
  display: block !important;
  background: #57886c !important; /* Viridian Green for Growth & Events */
  color: #ffffff !important;
  padding: 8px 12px !important;
  font-size: 11px !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  font-weight: bold !important;
  text-align: center !important;
  transition: background-color 0.2s ease !important;
}

.event-btn:hover {
  background: #fa8334 !important;
}

/* Event Metadata Pills wrapping and breaking cleanly */
.event-meta-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 4px !important;
}

.event-pill {
  background: #f7f7f7 !important;
  border: 1px solid #e8e7e8 !important;
  color: #1b1b1e !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.25 !important;
}

/* Event toggle handle glow animation (pulsing halo) */
#event-reminder-toggle-btn .toggle-icon-glow {
  display: inline-block !important;
  animation: crossGlowPulse 2.5s infinite ease-in-out !important;
}

@keyframes crossGlowPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(217, 119, 6, 0));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.8));
  }
}

/* 2.5 DRAWERS MOBILE STACKING MATH & RESILIENCY (IPHONE 13 CONSTRAINTS)     */

@media screen and (max-width: 768px) {
  #sticky-reminders-wrapper {
    top: 25% !important; /* Aligned with Scripture Drawer top 25vh on mobile */
    bottom: auto !important;
    gap: 12px !important;
  }

  #church-sticky-reminder,
  #church-event-sticky-reminder {
    width: 250px !important; /* Shrink width on mobile viewports */
  }

  /* Mobile compact styles for the Events drawer and safe height limits */
  #church-event-sticky-reminder .reminder-content {
    padding: 12px 15px !important; /* Save vertical spacing */
    max-height: 250px !important;  /* Cap the height to fit within iPhone 13 viewport */
    overflow-y: auto !important;   /* Add smooth vertical scroll if content wraps */
    -webkit-overflow-scrolling: touch !important; /* Smooth inertial scroll on iOS Safari */
  }

  #church-event-sticky-reminder .events-carousel-stepper {
    margin-top: 4px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
  }

  #church-event-sticky-reminder .events-slides-container {
    min-height: 140px !important; /* Lower min-height floor to allow compact cards */
  }

  #church-event-sticky-reminder .event-card-slide .event-title {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }

  #church-event-sticky-reminder .event-card-slide .event-excerpt {
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin: 6px 0 10px 0 !important;
  }

  #church-event-sticky-reminder .event-btn {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }

  #reminder-toggle,
  #event-reminder-toggle {
    right: -35px !important;
    width: 35px !important;
  }

  #reminder-toggle-btn,
  #event-reminder-toggle-btn {
    width: 35px !important;
    height: 40px !important;
    font-size: 16px !important;
  }

  .reminder-vertical-text,
  .event-vertical-text {
    width: 35px !important;
    padding: 12px 0 !important;
  }

  .reminder-vertical-text span,
  .event-vertical-text span {
    font-size: 8px !important;
  }
}

/* 3. SCRIPTURE DRAWER (RIGHT MARGIN)                                        */

#orpc-bible-drawer {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 85vw !important;
  max-width: 400px !important;
  background: #ffffff !important;
  box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.15) !important;
  z-index: 999999 !important;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
  border-left: 5px solid #373f51 !important; /* Viridian/Charcoal border */
  font-family: 'Lato', sans-serif !important;
  transform: translateX(0) !important;
  display: flex !important;
  flex-direction: column !important;
}

#orpc-bible-drawer.drawer-hidden {
  transform: translateX(100%) !important;
}

.admin-bar #orpc-bible-drawer {
  top: 32px !important; /* WP Admin Bar Offset */
}

@media screen and (max-width: 768px) {
  #orpc-bible-drawer {
    width: 88vw !important;
    max-width: 340px !important;
  }
}

.bible-drawer-content {
  padding: 25px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.bible-tag {
  background: #373f51 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  font-weight: bold !important;
  padding: 3px 8px !important;
  border-radius: 3px !important;
  align-self: flex-start !important;
}

#bible-drawer-title {
  font-family: 'Raleway', sans-serif !important;
  margin: 10px 0 15px 0 !important;
  font-size: 18px !important;
  color: #1b1b1e !important;
  border-bottom: 2px solid #e8e7e8 !important;
  padding-bottom: 10px !important;
}

/* Toggle Trigger */
#bible-drawer-toggle {
  position: absolute !important;
  top: 25vh !important;
  left: -40px !important;
  width: 40px !important;
}

#bible-drawer-toggle-btn {
  width: 40px !important;
  height: 45px !important;
  background: #ffffff !important;
  border: 1px solid #e8e7e8 !important;
  border-right: none !important;
  color: #1b1b1e !important;
  cursor: pointer !important;
  box-shadow: -4px 2px 8px rgba(0,0,0,0.06) !important;
  border-radius: 4px 0 0 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  padding: 0 !important;
}

.bible-vertical-text {
  width: 40px !important;
  background: #ffffff !important;
  border: 1px solid #e8e7e8 !important;
  border-right: none !important;
  border-top: none !important;
  box-shadow: -4px 4px 8px rgba(0,0,0,0.06) !important;
  border-radius: 0 0 0 4px !important;
  padding: 15px 0 !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
}

.bible-vertical-text span {
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
  font-family: 'Lato', sans-serif !important;
  font-size: 10px !important;
  font-weight: bold !important;
  color: #373f51 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

#bg-extracted-container {
  font-size: 14px !important;
  line-height: 1.65 !important;
  color: #373f51 !important;
}

/* Hide BibleGateway Clutter */
#bg-extracted-container h1,
#bg-extracted-container h3,
#bg-extracted-container h4,
#bg-extracted-container .il-text,
#bg-extracted-container .full-chap-link {
  display: none !important;
}

#bg-extracted-container .chapternum,
#bg-extracted-container .versenum {
  font-weight: bold !important;
  font-size: 10px !important;
  vertical-align: super !important;
  color: #fa8334 !important; /* Orange numbers */
  margin-right: 2px !important;
}

/* Footnotes & Cross-references internal links */
#bg-extracted-container .crossrefs ol,
#bg-extracted-container .footnotes ol {
  list-style-type: none !important; /* Strips numerical list markers */
  padding-left: 0 !important;
  margin-top: 25px !important;
  border-top: 1px solid #e8e7e8 !important;
  padding-top: 15px !important;
}

#bg-extracted-container .crossrefs li,
#bg-extracted-container .footnotes li {
  font-size: 12px !important;
  margin-bottom: 10px !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  transition: all 0.4s ease !important;
  border-left: 3px solid transparent !important;
}

#bg-extracted-container .crossreference a,
#bg-extracted-container .footnote a {
  color: #373f51 !important;
  font-weight: bold !important;
  text-decoration: none !important;
  padding: 1px 4px !important;
  background: #e8e7e8 !important;
  border-radius: 3px !important;
}

/* Dynamic highlighting box when cross-ref clicked */
#bg-extracted-container .bg-highlight-active {
  background-color: #fff9c4 !important; /* Smooth yellow */
  border-left: 3px solid #fa8334 !important; /* Orange left border */
}

/* 4. GLOBAL FOCAL-POINT FONT RESIZER                                        */

#orpc-font-resizer {
  position: fixed !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 1000000 !important;
  box-shadow: -4px 4px 12px rgba(0,0,0,0.12) !important;
  border-radius: 6px 0 0 6px !important;
  overflow: hidden !important;
  font-family: 'Lato', sans-serif !important;
}

.font-btn {
  width: 42px !important;
  height: 42px !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

#font-increase {
  background-color: #57886c !important; /* Growth Viridian Green */
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#font-increase:hover:not(.disabled) {
  background-color: #436952 !important;
}

#font-decrease {
  background-color: #e74c3c !important; /* Pale Coral Red */
  color: #ffffff !important;
}

#font-decrease:hover:not(.disabled) {
  background-color: #c0392b !important;
}

.font-btn.disabled {
  background-color: #fadbd8 !important; /* Soft pastel red when disabled */
  color: #e6b0aa !important;
  cursor: not-allowed !important;
  opacity: 0.9 !important;
}

/* 4.1 Strict content-leaf-node scaling (ignores nav menus and quotes) */
body.orpc-font-step-1 p:not(blockquote p):not(.wp-block-quote p),
body.orpc-font-step-1 li:not(nav li):not(.menu li):not(.navigation li),
body.orpc-font-step-1 td:not(blockquote td),
body.orpc-font-step-1 th:not(blockquote th) {
  font-size: 110% !important;
  line-height: 1.65 !important;
}

body.orpc-font-step-2 p:not(blockquote p):not(.wp-block-quote p),
body.orpc-font-step-2 li:not(nav li):not(.menu li):not(.navigation li),
body.orpc-font-step-2 td:not(blockquote td),
body.orpc-font-step-2 th:not(blockquote th) {
  font-size: 120% !important;
  line-height: 1.70 !important;
}

body.orpc-font-step-3 p:not(blockquote p):not(.wp-block-quote p),
body.orpc-font-step-3 li:not(nav li):not(.menu li):not(.navigation li),
body.orpc-font-step-3 td:not(blockquote td),
body.orpc-font-step-3 th:not(blockquote th) {
  font-size: 130% !important;
  line-height: 1.75 !important;
}

body.orpc-font-step-4 p:not(blockquote p):not(.wp-block-quote p),
body.orpc-font-step-4 li:not(nav li):not(.menu li):not(.navigation li),
body.orpc-font-step-4 td:not(blockquote td),
body.orpc-font-step-4 th:not(blockquote th) {
  font-size: 140% !important;
  line-height: 1.80 !important;
}

body.orpc-font-step-5 p:not(blockquote p):not(.wp-block-quote p),
body.orpc-font-step-5 li:not(nav li):not(.menu li):not(.navigation li),
body.orpc-font-step-5 td:not(blockquote td),
body.orpc-font-step-5 th:not(blockquote th) {
  font-size: 150% !important;
  line-height: 1.85 !important;
}

/* 5. WHATSAPP SHOUTOUT BUTTON                                               */

#orpc-wa-shoutout {
  position: fixed !important;
  bottom: 25px !important;
  right: 25px !important;
  background-color: #25D366 !important; /* Branded WhatsApp Green */
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  padding: 10px 15px 10px 20px !important;
  border-radius: 50px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
  z-index: 999900 !important;
  transition: all 0.3s ease !important;
  font-family: 'Lato', sans-serif !important;
}

#orpc-wa-shoutout:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4) !important;
  background-color: #1EBE55 !important;
}

.wa-shoutout-text {
  font-size: 14px !important;
  font-weight: 700 !important;
  margin-right: 10px !important;
  white-space: nowrap !important;
}

.wa-icon-container {
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.wa-icon-container svg {
  width: 100% !important;
  height: 100% !important;
}

@media screen and (max-width: 768px) {
  #orpc-wa-shoutout {
    bottom: 20px !important;
    right: 20px !important;
    padding: 12px !important;
    border-radius: 50% !important;
  }
  .wa-shoutout-text {
    display: none !important;
  }
  .wa-icon-container {
    width: 24px !important;
    height: 24px !important;
    margin-right: 0 !important;
  }
}