/* Agenda flutuante — site da igreja (acima do player) */

.ic-float-stack {
  position: fixed;
  right: 1rem;
  top: calc(var(--ic-nav-h, 4.5rem) + 0.65rem);
  bottom: 1rem;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: min(100vw - 2rem, 22rem);
  height: auto;
  max-height: calc(100svh - var(--ic-nav-h, 4.5rem) - 1.65rem);
  pointer-events: none;
}

.ic-float-stack > * {
  pointer-events: auto;
  width: 100%;
}

/* O dock da rádio deixa de ser fixed isolado quando está na stack */
.ic-float-stack .ic-radio-dock {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  flex: 0 0 auto;
}

.ic-eventos-dock {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  animation: ic-ev-rise 0.7s var(--ic-ease) both;
}

.ic-eventos-dock.is-collapsed {
  flex: 0 0 auto;
}

@keyframes ic-ev-rise {
  from { opacity: 0; transform: translateY(1rem) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.ic-eventos-dock__shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(700px 220px at 90% -30%, rgba(179, 36, 36, 0.28), transparent 55%),
    linear-gradient(165deg, rgba(24, 24, 28, 0.96) 0%, rgba(8, 8, 10, 0.98) 100%);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.ic-eventos-dock__shell::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(179, 36, 36, 0.85), transparent);
  opacity: 0.9;
}

.ic-eventos-dock__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem 0.55rem;
}

.ic-eventos-dock__badge {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(179, 36, 36, 0.35), rgba(139, 26, 26, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffd0d0;
  font-size: 0.95rem;
}

.ic-eventos-dock__head-copy {
  min-width: 0;
  flex: 1;
}

.ic-eventos-dock__kicker {
  margin: 0;
  font-family: var(--ic-font-apostolic);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 245, 242, 0.55);
}

.ic-eventos-dock__name {
  margin: 0.15rem 0 0;
  font-family: var(--ic-font-display);
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--ic-white);
  line-height: 1.15;
}

.ic-eventos-dock__clock {
  flex-shrink: 0;
  min-width: 3.1rem;
  text-align: right;
  font-family: var(--ic-font-apostolic);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(247, 245, 242, 0.82);
  font-variant-numeric: tabular-nums;
}

.ic-eventos-dock__toggle {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 245, 242, 0.75);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.25s var(--ic-ease);
}

.ic-eventos-dock__toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ic-eventos-dock.is-collapsed .ic-eventos-dock__toggle {
  transform: rotate(180deg);
}

.ic-eventos-dock__sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.85rem 0.65rem;
  font-size: 0.78rem;
  color: var(--ic-muted);
}

.ic-eventos-dock__count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(179, 36, 36, 0.35);
  background: rgba(179, 36, 36, 0.14);
  color: #ffd4d4;
  font-family: var(--ic-font-apostolic);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ic-eventos-dock__count strong {
  font-family: var(--ic-font-body);
  font-size: 0.78rem;
  letter-spacing: 0;
  font-weight: 600;
}

.ic-eventos-dock__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 0 0.55rem 0.7rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 36, 36, 0.45) transparent;
  transition: max-height 0.4s var(--ic-ease), opacity 0.3s, padding 0.3s, flex-basis 0.3s;
}

.ic-eventos-dock.is-collapsed .ic-eventos-dock__body,
.ic-eventos-dock.is-collapsed .ic-eventos-dock__sub {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.ic-ev-dock__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.ic-ev-dock__empty {
  padding: 1rem 0.75rem;
  text-align: center;
  color: var(--ic-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.ic-ev-dock__item {
  position: relative;
  padding: 0.75rem 0.8rem 0.7rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.35s var(--ic-ease), background 0.35s var(--ic-ease), transform 0.35s var(--ic-ease);
}

.ic-ev-dock__item.is-focus {
  border-color: rgba(179, 36, 36, 0.45);
  background:
    linear-gradient(135deg, rgba(179, 36, 36, 0.16), rgba(255, 255, 255, 0.03));
  transform: translateY(-1px);
}

.ic-ev-dock__item.is-today {
  box-shadow: inset 0 0 0 1px rgba(179, 36, 36, 0.22);
}

.ic-ev-dock__item.is-culto .ic-ev-dock__pill {
  background: rgba(247, 245, 242, 0.1);
  color: rgba(247, 245, 242, 0.88);
  border-color: rgba(247, 245, 242, 0.16);
}

.ic-ev-dock__item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ic-ev-dock__pill {
  display: inline-flex;
  align-items: center;
  max-width: 70%;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(179, 36, 36, 0.35);
  background: rgba(179, 36, 36, 0.16);
  color: #ffd0d0;
  font-family: var(--ic-font-apostolic);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-ev-dock__live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--ic-font-apostolic);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffb4b4;
}

.ic-ev-dock__live::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #e23b3b;
  box-shadow: 0 0 0 0 rgba(226, 59, 59, 0.55);
  animation: ic-ev-pulse 1.6s ease-out infinite;
}

@keyframes ic-ev-pulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 59, 59, 0.55); }
  70% { box-shadow: 0 0 0 0.45rem rgba(226, 59, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 59, 59, 0); }
}

.ic-ev-dock__title {
  display: block;
  font-family: var(--ic-font-display);
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.ic-ev-dock__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: rgba(247, 245, 242, 0.7);
}

.ic-ev-dock__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ic-ev-dock__meta i {
  font-size: 0.72rem;
  opacity: 0.8;
  color: #d77a7a;
}

.ic-ev-dock__loc {
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  color: rgba(247, 245, 242, 0.55);
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.35;
}

.ic-ev-dock__loc i {
  margin-top: 0.15rem;
  color: #d77a7a;
  font-size: 0.7rem;
}

@media (max-width: 520px) {
  .ic-float-stack {
    right: 0.65rem;
    bottom: 0.65rem;
    top: calc(var(--ic-nav-h, 4.5rem) + 0.45rem);
    width: min(100vw - 1.3rem, 20.5rem);
    max-height: calc(100svh - var(--ic-nav-h, 4.5rem) - 1.1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ic-eventos-dock,
  .ic-ev-dock__item,
  .ic-ev-dock__live::before {
    animation: none !important;
    transition: none !important;
  }
}
