/* Toast notification */
.edit-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text, #262626);
  color: var(--bg, #fff);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.edit-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Floating Save button */
.edit-save-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--link, #0095f6);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 1100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.15s, transform 0.15s;
}

.edit-save-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.edit-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal edit buttons */
.modal-edit-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--text-muted, #8e8e8e);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.modal-edit-btn:hover {
  background: var(--border, #dbdbdb);
  color: var(--link, #0095f6);
}

.edit-mode .modal-edit-btn {
  display: inline-flex;
}

.modal-photo-edit-btn {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.modal-photo-edit-btn:hover {
  background: rgba(255,255,255,0.5);
  color: #fff;
}

/* In edit mode, always show photo caption area for the edit button */
.edit-mode #modal-photo-caption {
  display: flex !important;
  align-items: flex-end;
  gap: 8px;
}

.edit-mode #modal-photo-caption .caption-text {
  flex: 1;
}

/* Add post: camera/gallery buttons */
.add-photo-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-icon-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg, #fafafa);
  border: 2px dashed var(--border, #dbdbdb);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted, #8e8e8e);
  transition: border-color 0.15s, color 0.15s;
}

.btn-icon-action:hover {
  border-color: var(--link, #0095f6);
  color: var(--link, #0095f6);
}

/* Pending change indicator */
.caption-pending {
  outline: 2px dashed var(--link, #0095f6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Online editor styles — supplements editor.css which provides the core control styles.
   This file adds login-specific styles and ensures edit controls display in edit mode. */

/* Login button in nav */
#edit-login-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

#edit-login-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* In edit mode, show the lock as active */
.edit-mode #edit-login-btn {
  color: var(--link);
}

/* Caption edit buttons — show on hover in edit mode */
.edit-mode .caption-edit-btn {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.edit-mode .caption-edit-btn:hover {
  color: var(--link);
  border-color: var(--link);
}

/* Photo checkboxes — show in edit mode on hover or selection */
.edit-mode .photo-checkbox {
  display: flex;
}

/* Selection mode: always show checkboxes */
.edit-mode.selection-mode .photo-checkbox {
  display: flex;
}

/* Trash dialog grid layout */
.trash-dialog .trash-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.trash-dialog .trash-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.trash-dialog .trash-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.trash-dialog .trash-item-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.trash-dialog .trash-restore-btn {
  background: var(--link);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.trash-dialog .trash-purge-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
