/* ===== PLUS BUTTON MENU ===== */
.plus-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--bg-secondary, #1e1e2e);
  border: 1px solid var(--border, #333);
  border-radius: 12px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  padding: 6px 0;
  opacity: 0;
  transform: scale(0.92) translateY(8px);
  transform-origin: bottom left;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}
.plus-menu.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.plus-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-primary, #e0e0e0);
  font-size: 14px;
  transition: background 0.15s;
  white-space: nowrap;
}
.plus-menu-item:hover {
  background: var(--bg-tertiary, #2a2a3e);
}
.plus-menu-item .plus-menu-icon {
  width: 24px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}
.plus-menu-separator {
  height: 1px;
  background: var(--border, #333);
  margin: 4px 8px;
}

/* ===== SEND LATER BANNER ===== */
.send-later-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 12px 6px 12px;
  border: 2px dashed var(--accent, #6366f1);
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary, #e0e0e0);
  font-size: 13px;
  animation: sendLaterBannerIn 0.25s ease;
}
@keyframes sendLaterBannerIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.send-later-banner .sl-clock-icon {
  flex-shrink: 0;
  color: var(--accent, #6366f1);
}
.send-later-banner .sl-time-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--accent, #6366f1);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.send-later-banner .sl-time-btn:hover {
  text-decoration: underline;
}
.send-later-banner .sl-close-btn {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}
.send-later-banner .sl-close-btn:hover {
  color: var(--text-primary, #e0e0e0);
  background: var(--bg-tertiary, #2a2a3e);
}

/* ===== SEND LATER DATE/TIME PICKER ===== */
.sl-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: slOverlayIn 0.2s ease;
}
@keyframes slOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.sl-picker {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary, #1e1e2e);
  border-radius: 16px 16px 0 0;
  padding: 20px 16px;
  animation: slPickerSlideUp 0.3s ease;
}
@keyframes slPickerSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.sl-picker-header {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 16px;
}
.sl-picker-columns {
  display: flex;
  gap: 4px;
  height: 180px;
  position: relative;
  margin-bottom: 16px;
}
.sl-picker-columns::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 36px;
  transform: translateY(-50%);
  background: var(--bg-tertiary, #2a2a3e);
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
}
.sl-picker-col {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sl-picker-col::-webkit-scrollbar {
  display: none;
}
.sl-picker-col.sl-col-day {
  flex: 2;
}
.sl-picker-cell {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 14px;
  color: var(--text-muted, #888);
  transition:
    color 0.15s,
    font-weight 0.15s;
  cursor: pointer;
  user-select: none;
}
.sl-picker-cell.selected {
  color: var(--text-primary, #e0e0e0);
  font-weight: 600;
}
.sl-picker-spacer {
  height: 72px;
  scroll-snap-align: none;
}
.sl-schedule-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent, #6366f1);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.sl-schedule-btn:hover {
  opacity: 0.9;
}

/* position wrapper for plus menu */
.message-input-wrapper {
  position: relative;
}

/* ===== SCHEDULED MESSAGE IN CHAT ===== */
.message-scheduled {
  cursor: pointer;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
}
.message-scheduled .scheduled-edit-panel {
  flex-basis: 100%;
}
.message-scheduled .scheduled-label {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-bottom: 4px;
  text-align: right;
  padding-right: 4px;
  width: 100%;
}

.message-scheduled .scheduled-bubble {
  border: 2px dashed var(--accent, #6366f1) !important;
  border-radius: 16px 16px 4px 16px !important;
  background: rgba(99, 102, 241, 0.06) !important;
  padding: 10px 14px !important;
}
.message-scheduled .scheduled-bubble .message-text {
  color: var(--accent, #6366f1) !important;
}

/* ===== SCHEDULED EDIT PANEL ===== */
.scheduled-edit-panel {
  margin-top: 8px;
  padding: 0;
  background: var(--bg-secondary, #12121a);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  animation: schedEditIn 0.2s ease;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  box-sizing: border-box;
  overflow: hidden;
}
@keyframes schedEditIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.scheduled-edit-textarea-wrap {
  padding: 12px 14px 8px;
}
.scheduled-edit-content {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary, #e2e8f0);
  padding: 0;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  min-height: 36px;
  box-sizing: border-box;
  line-height: 1.4;
}
.scheduled-edit-content:focus {
  outline: none;
}
.scheduled-edit-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 12px;
  font-size: 13px;
  color: var(--text-muted, #888);
}
.scheduled-edit-time-row svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.scheduled-edit-divider {
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.08));
}
.scheduled-edit-actions {
  display: flex;
  flex-direction: column;
}
.scheduled-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 14px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.scheduled-edit-btn:first-child {
  border-top: none;
}
.scheduled-edit-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}
.scheduled-edit-btn.edit-msg {
  color: var(--accent, #6366f1);
}
.scheduled-edit-btn.send-now {
  color: #22c55e;
}
.scheduled-edit-btn.cancel-sched {
  color: #ef4444;
}
