/* ═══════════════════════════════════════════════════════════════════
   ANUL LITURGIC - CATHOLIC LITURGICAL CALENDAR STYLING
   ═══════════════════════════════════════════════════════════════════
   Custom CSS for the liturgical calendar wheel component
   Includes animations, badges, compact bar, and responsive layouts
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────
   ANIMATIONS
   ─────────────────────────────────────────────────────────────────── */

/* Animations */
@-webkit-keyframes al-needlePulse {
  0% {
    opacity: 1;
    -webkit-filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
    filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
  }
  50% {
    opacity: 0.7;
    -webkit-filter: drop-shadow(0 0 10px rgba(192, 57, 43, 1));
    filter: drop-shadow(0 0 10px rgba(192, 57, 43, 1));
  }
  100% {
    opacity: 1;
    -webkit-filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
    filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
  }
}

@keyframes al-needlePulse {
  0% {
    opacity: 1;
    -webkit-filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
    filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
  }
  50% {
    opacity: 0.7;
    -webkit-filter: drop-shadow(0 0 10px rgba(192, 57, 43, 1));
    filter: drop-shadow(0 0 10px rgba(192, 57, 43, 1));
  }
  100% {
    opacity: 1;
    -webkit-filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
    filter: drop-shadow(0 0 2px rgba(192, 57, 43, 0.8));
  }
}

@-webkit-keyframes al-pulseRing {
  0% {
    r: 8;
    stroke-opacity: 0.8;
  }
  50% {
    r: 14;
    stroke-opacity: 0.3;
  }
  100% {
    r: 8;
    stroke-opacity: 0.8;
  }
}

@keyframes al-pulseRing {
  0% {
    r: 8;
    stroke-opacity: 0.8;
  }
  50% {
    r: 14;
    stroke-opacity: 0.3;
  }
  100% {
    r: 8;
    stroke-opacity: 0.8;
  }
}

@-webkit-keyframes al-centerPulse {
  0% {
    r: 4;
    fill-opacity: 1;
  }
  50% {
    r: 6;
    fill-opacity: 0.6;
  }
  100% {
    r: 4;
    fill-opacity: 1;
  }
}

@keyframes al-centerPulse {
  0% {
    r: 4;
    fill-opacity: 1;
  }
  50% {
    r: 6;
    fill-opacity: 0.6;
  }
  100% {
    r: 4;
    fill-opacity: 1;
  }
}

/* ───────────────────────────────────────────────────────────────────
   SEASON BANNER (injected at top of #daily)
   ─────────────────────────────────────────────────────────────────── */

.al-season-banner {
  padding: 6px 0;
  margin: -2% -2% 4px -2%;
  background: #a82141;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  min-height: 24px;
}

.al-season-banner-text {
  font-family: 'Caudex', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}

/* ───────────────────────────────────────────────────────────────────
   NEXT FEAST BANNER (in compact bar)
   ─────────────────────────────────────────────────────────────────── */

.al-next-feast-banner {
  margin-bottom: 10px;
}

.al-next-feast-content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 6px;
}

.al-next-feast-label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Caudex', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #666;
}

.al-next-feast-name {
  font-family: 'Caudex', serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #371B0D;
}

.al-separator {
  margin: 0 6px;
  color: #ccc;
  font-size: 12px;
}

.al-next-feast-meta {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  gap: 0;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.al-next-feast-date {
  font-family: 'Caudex', serif;
  font-size: 13px;
  color: #666;
}

.al-next-feast-when {
  font-size: 12px;
  font-style: italic;
  color: #888;
}

/* ───────────────────────────────────────────────────────────────────
   BADGE STYLING
   ─────────────────────────────────────────────────────────────────── */

/* Badge Styling */
.al-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Caudex', serif;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.al-badge-holy {
  color: #a82141;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.al-badge-feast {
  color: #999;
  font-size: 14px;
  font-style: italic;
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.al-feast-days {
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  display: inline-block;
  margin: 0 5px;
  -webkit-box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  -webkit-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.al-feast-days:hover {
  -webkit-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  transform: translateY(-2px);
  -webkit-box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
}

/* ───────────────────────────────────────────────────────────────────
   COMPACT BAR LAYOUT
   ─────────────────────────────────────────────────────────────────── */

/* Compact Bar Styling */
#al-bar-wrap {
  margin-top: 7px;
  padding-top: 12px;
  border-top: 1px solid #d9c5c5;
}

#al-compact-bar {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#al-compact-bar:hover .al-chevron {
  color: #BB2649;
}

.al-compact-inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
  gap: 10px;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  padding: 4px 0;
  margin: 0 -5px;
}

.al-compact-season,
.al-compact-feast {
  margin: 0 5px;
}

.al-chevron {
  font-size: 14px;
  color: #a82141;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  -webkit-transform-origin: center;
  -ms-transform-origin: center;
  transform-origin: center;
  padding: 0;
  margin: 0;
  font-weight: 700;
}

.al-compact-season {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fdf5f5;
  border-radius: 4px;
  border-left: 3px solid #a82141;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}

.al-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}

.al-season-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 2px;
}

.al-label {
  font-family: 'Caudex', serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #999;
}

.al-season-label {
  font-family: 'Caudex', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #371B0D !important;
}

.al-vestment {
  font-size: 12px;
  color: #888;
  font-style: italic;
  font-family: 'Caudex', serif;
}

.al-compact-feast {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 10px;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 8px 12px;
  background: #fdf5f5;
  border-radius: 4px;
  min-width: 0;
}

.al-feast-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 4px;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.al-feast-label {
  font-family: 'Caudex', serif;
  font-size: 15px;
  color: #371B0D;
  line-height: 1.2;
  font-weight: 700;
}

.al-feast-label-meta {
  font-size: 13px;
  font-style: italic;
  font-weight: normal;
  color: #888;
}

.al-feast-date-compact {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  display: block;
}

.al-feast-meta {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* ───────────────────────────────────────────────────────────────────
   EXPANDED WHEEL VIEW
   ─────────────────────────────────────────────────────────────────── */

/* Expanded wheel cards */
#al-wheel-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  -webkit-transition: max-height 0.5s ease, opacity 0.4s ease;
  -o-transition: max-height 0.5s ease, opacity 0.4s ease;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

#al-svg-container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.al-cards-grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 12px 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.al-card {
  background: #fdf5f5;
  border: 1px solid #e8d0d0;
  border-left: 3px solid #a82141;
  border-radius: 6px;
  padding: 14px;
  font-family: 'Caudex', serif;
}

.al-card-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: #999;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.al-season-name {
  font-size: 17px;
  margin-bottom: 5px;
  color: var(--al-color, #371B0D);
}

.al-season-desc {
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: #7A6640;
}

.al-feast-countdown {
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 5px;
  color: var(--al-color, #a82141);
}

.al-feast-name {
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.4;
  color: var(--al-color, #371B0D);
}

.al-feast-grade {
  font-size: 12px;
  color: #371B0D;
  font-style: italic;
}

.al-feast-date {
  font-size: 12px;
  color: #3A2E10;
  margin-top: 3px;
}

.al-expand-section {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px 6px 12px;
  margin-top: 8px;
  border-top: 1px solid #d9c5c5;
  cursor: pointer;
}

.al-expand-text {
  font-family: 'Caudex', serif;
  font-size: 15px;
  color: #a82141;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ───────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ─────────────────────────────────────────────────────────────────── */

/* Responsive */
@media (max-width: 768px) {
  .al-compact-inner {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    margin: 0;
  }
  
  .al-compact-season,
  .al-compact-feast {
    width: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
    margin: 5px 0;
    box-sizing: border-box;
  }
  
  .al-cards-grid {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
  }
  
  #al-svg-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .al-feast-label {
    font-size: 14px;
  }

  .al-season-label {
    font-size: 14px;
  }

  .al-badge {
    font-size: 11px;
    padding: 6px 12px;
  }

  .al-compact-season,
  .al-compact-feast {
    padding: 10px;
  }

  .al-next-feast-banner {
    padding: 0 14px;
  }

  .al-next-feast-meta {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
  }

  .al-separator {
    display: none;
  }

  .al-expand-section {
    border-top: none;
    margin-top: 0;
    padding-top: 6px;
  }

  .al-season-banner {
    margin: -2% -2% 0 -2%;
    padding: 4px 0;
  }

  #al-bar-wrap {
    margin-top: 0;
    padding-top: 8px;
  }
}

/* Remove the border/space that style.css adds via #daily .snip1572 (mobile)
   since the season banner is now the first child of #daily. */
#daily .al-season-banner + .snip1572 {
  border-top: none !important;
  padding-top: 0 !important;
}

/* Reduce the bulky bottom padding of #daily on non-mobile so the bar-wrap
   doesn't sit so far above the closing edge of the white panel. */
@media only screen and (min-width: 541px) {
  #daily.white_partition {
    padding-bottom: 1.5%;
  }
}
