/* Economic Calendar alert controls v2 — scoped extension only. */

/* Fix: sticky day labels could overlap the first event row while scrolling. */
.ec-day-header {
  position: relative !important;
  top: auto !important;
  z-index: 2 !important;
  isolation: isolate;
}

.ec-day {
  overflow: hidden;
}

.ec-drawer-alert-panel {
  position: relative;
  margin: -6px 0 18px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(244,190,24,.18);
  border-radius: 16px;
  background:
    radial-gradient(280px 120px at 12% -20%, rgba(244,190,24,.10), transparent 68%),
    linear-gradient(145deg, rgba(20,25,34,.96), rgba(9,13,19,.92));
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 18px 44px rgba(0,0,0,.20);
  animation: ecDrawerAlertIn .28s cubic-bezier(.2,.8,.2,1) both;
}

.ec-drawer-alert-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244,190,24,.55), transparent);
  opacity: .7;
}

.ec-drawer-alert-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ec-drawer-alert-panel__head > div {
  display: grid;
  gap: 4px;
}

.ec-drawer-alert-panel__head span {
  color: #a78626;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .14em;
}

.ec-drawer-alert-panel__head strong {
  color: #eef2f6;
  font-size: 13px;
  letter-spacing: -.01em;
}

.ec-drawer-alert-live {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f4be18;
  box-shadow: 0 0 0 5px rgba(244,190,24,.08), 0 0 16px rgba(244,190,24,.26);
  animation: ecDrawerAlertPulse 1.7s ease-in-out infinite;
}

.ec-drawer-alert-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ec-drawer-alert-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(148,163,184,.11);
  border-radius: 13px;
  color: #929ead;
  background: rgba(255,255,255,.018);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.ec-drawer-alert-action:hover {
  transform: translateY(-1px);
  color: #e9eef4;
  border-color: rgba(244,190,24,.22);
  background: rgba(244,190,24,.045);
}

.ec-drawer-alert-action > svg {
  width: 38px;
  height: 38px;
  padding: 10px;
  border-radius: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  background: rgba(255,255,255,.025);
}

.ec-drawer-alert-action > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ec-drawer-alert-action b {
  overflow: hidden;
  color: #dce3ea;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ec-drawer-alert-action small {
  color: #6f7c8b;
  font-size: 8px;
  line-height: 1.35;
}

.ec-drawer-alert-action.is-active {
  color: #1b1608;
  border-color: #d4a410;
  background: linear-gradient(180deg, #f8d75e, #e9b114);
  box-shadow: 0 10px 24px rgba(244,190,24,.11);
}

.ec-drawer-alert-action.is-active > svg {
  color: #211b09;
  background: rgba(255,255,255,.20);
}

.ec-drawer-alert-action.is-active b,
.ec-drawer-alert-action.is-active small {
  color: #1d180a;
}

.ec-drawer-alert-note {
  margin: 9px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #657281 !important;
  background: transparent !important;
  font-size: 8px !important;
  line-height: 1.45 !important;
}

/* Distinguish global all-news mode in the hero. */
#ecNotificationToggle.is-all-news {
  border-color: rgba(244,190,24,.50);
  background: linear-gradient(180deg, #f7d65d, #e9b113);
  color: #1d1707;
  box-shadow: 0 10px 30px rgba(244,190,24,.13);
}

#ecNotificationToggle.is-all-news svg {
  stroke: #1d1707;
}

/* Per-row bell is clearer and visibly stateful. */
.ec-row-alert {
  position: relative;
}

.ec-row-alert::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: .18s ease;
}

.ec-row-alert.is-active::after {
  background: #fff3b0;
  box-shadow: 0 0 6px rgba(255,243,176,.7);
}

.ec-row.is-watched .ec-title::after {
  content: "  ·  ALERT";
  color: #b9972f;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .10em;
  white-space: nowrap;
}

@keyframes ecDrawerAlertIn {
  from { opacity: 0; transform: translateY(-7px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ecDrawerAlertPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.78); }
}

@media (max-width: 760px) {
  .ec-drawer-alert-panel {
    margin-top: -4px;
    padding: 12px;
    border-radius: 14px;
  }

  .ec-drawer-alert-actions {
    grid-template-columns: 1fr;
  }

  .ec-drawer-alert-action {
    min-height: 58px;
  }

  .ec-day-header {
    min-height: 38px;
    padding-inline: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ec-drawer-alert-panel,
  .ec-drawer-alert-live {
    animation: none !important;
  }

  .ec-drawer-alert-action {
    transition: none !important;
  }
}