/* ==========================================================================
   Inline Editing Components
   ========================================================================== */

/* Session Header with Edit Button */
.section-header-editable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-header-editable h2 {
  margin: 0;
}

/* Edit Icon Button */
.edit-icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--grey-500);
  opacity: 0.7;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.edit-icon-button:hover {
  opacity: 1;
  background: var(--parchment-400);
  color: var(--color-accent);
  transform: scale(1.15) rotate(-5deg);
}

/* Add subtle pulse animation when parent section is hovered */
.section-header-editable:hover .edit-icon-button,
.campaign-header:hover .edit-icon-button,
.content-section:hover .edit-icon-button {
  animation: quill-pulse 2s ease-in-out infinite;
}

@keyframes quill-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.edit-icon-image {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.rich-text-display {
  color: var(--warm-grey);
  margin-top: var(--space-xs);
}

/* Inline Edit Actions */
.inline-edit-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* Cancel Link */
.cancel-link {
  background: none;
  border: none;
  color: var(--warm-grey);
  text-decoration: underline;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  padding: 0;
  transition: color 0.2s ease;
}

.cancel-link:hover {
  color: var(--warm-grey-dark);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) /* tablet */ {
  /* Ensure edit buttons are still tappable */
  .edit-button,
  .inline-edit-trigger {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
