/* ===== Reminders Panel ===== */

#edit_character_reminders-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

#edit_character_reminders-title {
  flex: 1 1 160px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#edit_character_reminders-header-tools {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#edit_character_reminders-search-shell {
  width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: width 160ms ease, opacity 160ms ease;
}

#edit_character_reminders-header-tools.search-open #edit_character_reminders-search-shell {
  width: min(220px, 38vw);
  opacity: 1;
  pointer-events: auto;
}

#edit_character_reminders-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75);
}

#edit_character_reminders-search-input:focus {
  border-color: rgba(236, 72, 153, 0.38);
  box-shadow:
    0 0 0 3px rgba(236, 72, 153, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

#edit_character_reminders-panel .panel-header .btn-panel-header {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

#edit_character_reminders-panel .panel-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
}

#edit_character_reminders-list {
  list-style: none;
  padding: 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  overflow-y: auto;
}

#edit_character_reminders-list.search-active {
  padding-top: 8px;
}

#edit_character_reminders-list .memory-item {
  display: flex;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: opacity 180ms ease, transform 180ms ease;
  border: 0;
}

#edit_character_reminders-list .memory-item.removing { opacity: 0; transform: translateY(-4px); }
#edit_character_reminders-list .memory-item.ghost { opacity: 0.7; }

#edit_character_reminders-list .memory-window-status {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  padding: 2px 0 8px;
}

#edit_character_reminders-list .memory-bubble {
  position: relative;
  display: inline-block;
  max-width: min(720px, 90%);
  background: #f5f7fb;
  background-image: linear-gradient(#ffffff, #f6f8ff);
  border: 1px solid #0001;
  border-radius: 16px;
  padding: 6px 30px 6px 10px;
  box-shadow: 0 2px 8px #0001;
  line-height: 1.22;
  word-wrap: break-word;
  white-space: normal;
  font-size: 0.96rem;
}

#edit_character_reminders-list .mem-title,
#edit_character_reminders-list .mem-text,
#edit_character_reminders-list .memory-meta {
  margin: 0;
}

#edit_character_reminders-list .memory-meta {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#edit_character_reminders-list .mem-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  background: rgba(236, 72, 153, 0.12);
  color: #9d1b63;
}

#edit_character_reminders-list .mem-text {
  white-space: pre-line;
  display: inline;
  padding: 0;
}

#edit_character_reminders-list .memory-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  opacity: 0;
  transition: opacity 140ms ease;
}

#edit_character_reminders-list .memory-item:hover .memory-actions {
  opacity: 1;
}

#edit_character_reminders-list .memory-actions .panel-action-button {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 4px 10px rgba(15, 23, 42, 0.18);
}

#edit_character_reminders-compose {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#edit_character_reminders-compose button {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: #0077cc;
  color: #fff;
  cursor: pointer;
}

#edit_character_reminders-compose button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

#edit_character_reminders-compose .btn-red {
  background: #dc2626;
  color: #fff;
}

#edit_character_reminders-compose .btn-red:hover {
  background: #b91c1c;
}

@media (max-width: 980px) {
  #edit_character_reminders-panel .panel-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  #edit_character_reminders-title {
    width: 100%;
    flex-basis: 100%;
  }

  #edit_character_reminders-header-tools {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  #edit_character_reminders-header-tools.search-open #edit_character_reminders-search-shell {
    width: 100%;
  }
}

@media (max-width: 720px) {
  #edit_character_reminders-panel .panel-header {
    align-items: flex-start;
  }

  #edit_character_reminders-header-tools {
    gap: 6px;
  }

  #edit_character_reminders-search-input {
    width: 100%;
    min-width: 0;
  }
}
