/* ==========================================================================
   LFH CALENDAR SUBSCRIBE — standalone shortcode component
   Shortcode: [lfh_calendar_subscribe]
   ========================================================================== */

.lfh-calendar-subscribe {
  --lfh-cal-trigger-bg: rgba(255, 255, 255, 0.045);
  --lfh-cal-trigger-bg-hover: rgba(255, 255, 255, 0.08);
  --lfh-cal-trigger-border: rgba(255, 255, 255, 0.16);
  --lfh-cal-trigger-border-hover: rgba(255, 255, 255, 0.30);
  --lfh-cal-trigger-text: #d7e0ea;
  --lfh-cal-trigger-text-hover: #ffffff;

  --lfh-cal-popover-bg: #ffffff;
  --lfh-cal-popover-border: rgba(31, 49, 74, 0.13);
  --lfh-cal-popover-text: #203653;
  --lfh-cal-popover-hover: #f1f4f8;
  --lfh-cal-popover-shadow: 0 14px 34px rgba(2, 12, 24, 0.20);

  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  font-family: inherit;
}

/* System preference when the theme-toggle plugin has not asserted a state. */
@media (prefers-color-scheme: light) {
  html:not([data-site-theme]) .lfh-calendar-subscribe {
    --lfh-cal-trigger-bg: rgba(10, 26, 47, 0.025);
    --lfh-cal-trigger-bg-hover: rgba(10, 26, 47, 0.07);
    --lfh-cal-trigger-border: rgba(10, 26, 47, 0.18);
    --lfh-cal-trigger-border-hover: rgba(10, 26, 47, 0.34);
    --lfh-cal-trigger-text: #1d2f48;
    --lfh-cal-trigger-text-hover: #0a1a2f;
  }
}

html[data-site-theme="light"] .lfh-calendar-subscribe {
  --lfh-cal-trigger-bg: rgba(10, 26, 47, 0.025);
  --lfh-cal-trigger-bg-hover: rgba(10, 26, 47, 0.07);
  --lfh-cal-trigger-border: rgba(10, 26, 47, 0.18);
  --lfh-cal-trigger-border-hover: rgba(10, 26, 47, 0.34);
  --lfh-cal-trigger-text: #1d2f48;
  --lfh-cal-trigger-text-hover: #0a1a2f;
}

html[data-site-theme="dark"] .lfh-calendar-subscribe {
  --lfh-cal-trigger-bg: rgba(255, 255, 255, 0.045);
  --lfh-cal-trigger-bg-hover: rgba(255, 255, 255, 0.08);
  --lfh-cal-trigger-border: rgba(255, 255, 255, 0.16);
  --lfh-cal-trigger-border-hover: rgba(255, 255, 255, 0.30);
  --lfh-cal-trigger-text: #d7e0ea;
  --lfh-cal-trigger-text-hover: #ffffff;
}

.lfh-calendar-subscribe__trigger {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: auto;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--lfh-cal-trigger-border);
  border-radius: 0.5rem;
  background: var(--lfh-cal-trigger-bg);
  color: var(--lfh-cal-trigger-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transform: none !important;
  box-shadow: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.lfh-calendar-subscribe__trigger:hover,
.lfh-calendar-subscribe__trigger:focus-visible,
.lfh-calendar-subscribe__trigger[aria-expanded="true"] {
  border-color: var(--lfh-cal-trigger-border-hover);
  background: var(--lfh-cal-trigger-bg-hover);
  color: var(--lfh-cal-trigger-text-hover);
  transform: none !important;
}

.lfh-calendar-subscribe__trigger:focus-visible {
  outline: 2px solid #1b98e0;
  outline-offset: 2px;
}


.lfh-calendar-subscribe__icon {
  display: none;
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  color: currentColor;
}

.lfh-calendar-subscribe__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lfh-calendar-subscribe__chevron {
  display: block;
  flex: 0 0 auto;
  width: 0.375rem;
  height: 0.375rem;
  margin-top: -0.1875rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.78;
  transform: rotate(45deg);
  transform-origin: 50% 50%;
  transition: transform 160ms ease, margin 160ms ease;
}

.lfh-calendar-subscribe__trigger[aria-expanded="true"] .lfh-calendar-subscribe__chevron {
  margin-top: 0.1875rem;
  transform: rotate(225deg);
}

/* Popover lives in the browser top layer, so it is not clipped by Pro bars. */
.lfh-calendar-subscribe__popover {
  box-sizing: border-box;
  position: fixed;
  inset: auto;
  width: 250px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  margin: 0;
  padding: 0.375rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--lfh-cal-popover-border);
  border-radius: 0.625rem;
  background: var(--lfh-cal-popover-bg);
  color: var(--lfh-cal-popover-text);
  box-shadow: var(--lfh-cal-popover-shadow);
}

.lfh-calendar-subscribe__popover:not(:popover-open) {
  display: none;
}

.lfh-calendar-subscribe__option {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 0.45rem;
  color: var(--lfh-cal-popover-text) !important;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
}

.lfh-calendar-subscribe__option:hover,
.lfh-calendar-subscribe__option:focus-visible {
  background: var(--lfh-cal-popover-hover);
}

.lfh-calendar-subscribe__option + .lfh-calendar-subscribe__option {
  margin-top: 0.125rem;
}

.lfh-calendar-subscribe__option strong,
.lfh-calendar-subscribe__option small {
  display: block;
}

.lfh-calendar-subscribe__option small {
  margin-top: 0.2rem;
  opacity: 0.72;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
}

@media (max-width: 40em) {
  .lfh-calendar-subscribe__trigger {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
  }

  .lfh-calendar-subscribe__icon {
    display: block;
  }

  .lfh-calendar-subscribe__label,
  .lfh-calendar-subscribe__chevron {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lfh-calendar-subscribe__trigger,
  .lfh-calendar-subscribe__chevron {
    transition-duration: 0.01ms !important;
  }
}
