.journey-builder .journey-popover.journey-popover--email-template {
  width: min(370px, calc(100% - 10px)) !important;
  min-width: 0;
  max-height: var(--builder-popover-max-height, calc(100% - 10px)) !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

.campaign-email-template-popover,
.campaign-email-template-popover * {
  box-sizing: border-box;
}

.campaign-email-template-popover {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 364px;
  font-family: var(--font-geist);
}

.campaign-email-template-popover__close {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--icon);
  cursor: pointer;
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.campaign-email-template-popover__close:hover {
  background: var(--surface-hover);
}

.campaign-email-template-popover__close:active {
  background: var(--surface-pressed);
}

.campaign-email-template-popover__close:focus-visible {
  outline: 0;
  box-shadow: var(--ring-brand);
}

.campaign-email-template-popover__close > span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  overflow: hidden;
}

.campaign-email-template-popover__close img {
  display: block;
  width: 9.5px;
  height: 9.5px;
}

.campaign-email-template-popover__panel {
  display: flex;
  flex: 0 0 326px;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  height: 326px;
  margin: 0;
  padding: var(--space-md);
  overflow: hidden;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}

.journey-builder .journey-popover .campaign-email-template-popover__search.lio-field {
  display: block;
  flex: 0 0 32px;
  width: 100%;
  min-width: 0;
}

.journey-builder .journey-popover .campaign-email-template-popover__search .lio-input-shell {
  gap: var(--space-xs);
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: var(--space-xs2) var(--space-xs);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: none;
}

.journey-builder .journey-popover .campaign-email-template-popover__search .lio-input-shell:focus-within {
  border-color: var(--neutral-400);
  box-shadow: var(--ring-brand);
}

.campaign-email-template-popover__search .lio-input-shell__icon {
  width: 16px;
  height: 16px;
}

.campaign-email-template-popover__search .lio-input-shell__icon img {
  display: block;
  width: 13px;
  height: 13px;
}

.journey-builder .journey-popover .campaign-email-template-popover__search .lio-input {
  min-height: 0;
  padding: 0;
  color: var(--text-secondary);
  font: 400 14px/22px var(--font-geist);
  letter-spacing: .14px;
}

.journey-builder .journey-popover .campaign-email-template-popover__search .lio-input::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.campaign-email-template-popover__list {
  display: flex;
  flex: 0 0 262px;
  flex-direction: column;
  gap: var(--space-xs);
  height: 262px;
  min-height: 0;
  margin-bottom: calc(var(--space-md) * -1);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.campaign-email-template-popover__list::-webkit-scrollbar {
  display: none;
}

.campaign-email-template-popover__item {
  display: flex;
  flex: 0 0 64px;
  align-items: stretch;
  width: 100%;
  height: 64px;
  min-height: 64px;
  padding: 0;
  overflow: hidden;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.campaign-email-template-popover__item:hover {
  border-color: var(--border-secondary);
  background: var(--surface-hover);
}

.campaign-email-template-popover__item:active {
  background: var(--surface-pressed);
}

.campaign-email-template-popover__item:focus-visible {
  outline: 0;
  box-shadow: var(--ring-brand);
}

.campaign-email-template-popover__thumbnail {
  display: block;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  background: var(--bg);
}

.campaign-email-template-popover__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xs2);
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  overflow: hidden;
  background: var(--surface);
}

.campaign-email-template-popover__copy strong,
.campaign-email-template-popover__copy > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-email-template-popover__copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: .24px;
}

.campaign-email-template-popover__copy > span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: .12px;
}

.campaign-email-template-popover__empty {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-height: 64px;
  margin: 0;
  color: var(--text-tertiary);
  font: 400 12px/18px var(--font-geist);
  text-align: center;
}

.campaign-email-template-popover__empty[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .campaign-email-template-popover__close,
  .campaign-email-template-popover__item {
    transition: none;
  }
}
