.memo-time-suggestions {
  box-sizing: border-box;
  flex: 0 1 190px;
  min-height: 108px;
  max-height: min(190px, 27dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--theme-border, #c8dfed);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--theme-card, #f8fcff), var(--theme-tint, #edf8ff));
  box-shadow: 0 8px 22px #1a608416;
  padding: 10px;
  scrollbar-width: thin;
  transform-origin: 50% 0;
  transition:
    opacity 220ms ease,
    transform 240ms cubic-bezier(.22, .8, .24, 1),
    min-height 240ms cubic-bezier(.22, .8, .24, 1),
    max-height 240ms cubic-bezier(.22, .8, .24, 1),
    padding 220ms ease,
    border-width 220ms ease;
}

.memo-editor-screen:has(.memo-time-suggestions:not(.is-hidden)) .memo-editor-content {
  min-height: 140px;
}

.memo-time-suggestions.is-hidden {
  display: none;
}

.memo-time-suggestions.is-entering {
  animation: memo-time-panel-in 300ms cubic-bezier(.22, .8, .24, 1) both;
}

.memo-time-suggestions.is-closing {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  border-width: 0;
  padding-block: 0;
  opacity: 0;
  transform: translateY(-5px) scale(.985);
  pointer-events: none;
}

.memo-time-suggestions-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 1px 2px 9px;
}

.memo-time-suggestions-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--theme-accent-soft, #dff1ff);
  color: var(--app-accent, #1873b4);
  font-size: 17px;
  font-weight: 850;
}

.memo-time-suggestions-header strong,
.memo-time-suggestions-header small {
  display: block;
}

.memo-time-suggestions-header strong {
  color: var(--theme-text, #244a67);
  font-size: 12px;
}

.memo-time-suggestions-header small {
  margin-top: 2px;
  color: var(--theme-muted, #718fa6);
  font-size: 10px;
}

.memo-time-suggestion-list {
  display: grid;
  gap: 7px;
}

.memo-time-suggestion {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--theme-border, #d3e5f0);
  border-radius: 10px;
  background: var(--theme-card, #fff);
  padding: 9px 10px;
  max-height: 96px;
  overflow: hidden;
  transform-origin: 50% 0;
  transition:
    opacity 190ms ease,
    transform 220ms cubic-bezier(.22, .8, .24, 1),
    max-height 220ms cubic-bezier(.22, .8, .24, 1),
    padding 190ms ease,
    border-width 190ms ease;
}

.memo-time-suggestions.is-entering .memo-time-suggestion {
  animation: memo-time-card-in 280ms cubic-bezier(.22, .8, .24, 1) both;
  animation-delay: calc(var(--memo-time-index, 0) * 45ms + 35ms);
}

.memo-time-suggestion.is-leaving,
.memo-time-suggestions.is-entering .memo-time-suggestion.is-leaving {
  animation: none;
  max-height: 0;
  border-width: 0;
  padding-block: 0;
  opacity: 0;
  transform: translateY(-5px) scale(.98);
  pointer-events: none;
}

.memo-time-suggestion-copy {
  min-width: 0;
}

.memo-time-suggestion-copy strong,
.memo-time-suggestion-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-time-suggestion-copy strong {
  color: var(--theme-text, #244a67);
  font-size: 12px;
}

.memo-time-suggestion-copy small {
  margin-top: 3px;
  color: var(--app-accent, #2d7cac);
  font-size: 10px;
  font-weight: 750;
}

.memo-time-suggestion-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.memo-time-create-button,
.memo-time-dismiss-button {
  min-height: 30px;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 130ms ease, filter 160ms ease, border-color 160ms ease, color 160ms ease;
}

.memo-time-create-button:active,
.memo-time-dismiss-button:active {
  transform: scale(.96);
}

.memo-time-create-button {
  border: 0;
  background: var(--app-accent, #1873b4);
  color: #fff;
  box-shadow: 0 4px 10px #176c9f24;
}

.memo-time-create-button:hover,
.memo-time-create-button:focus-visible {
  filter: brightness(1.06);
}

.memo-time-dismiss-button {
  border: 1px solid var(--theme-border, #c5ddea);
  background: transparent;
  color: var(--theme-muted, #6d8ca4);
}

.memo-time-dismiss-button:hover,
.memo-time-dismiss-button:focus-visible {
  border-color: var(--app-accent, #1873b4);
  color: var(--app-accent, #1873b4);
}

@media (max-width: 390px) {
  .memo-time-suggestion {
    grid-template-columns: 1fr;
  }

  .memo-time-suggestion-actions {
    justify-content: flex-end;
  }
}

body[data-app-theme="night"] .memo-time-create-button {
  color: #0f1b2a;
}

@keyframes memo-time-panel-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes memo-time-card-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .memo-time-suggestions,
  .memo-time-suggestion,
  .memo-time-create-button,
  .memo-time-dismiss-button {
    animation: none !important;
    transition: none !important;
  }
}
