/* Pencil Edit Icons - Dedicated CSS */
.edit-container {
  position: relative !important;
  display: inline-block !important;
  cursor: pointer !important;
}

.media-edit-container {
  position: relative !important;
  cursor: pointer !important;
}

.pencil-icon {
  position: absolute !important;
  top: -10px !important;
  right: -10px !important;
  width: 28px !important;
  height: 28px !important;
  background: linear-gradient(135deg, #ff1744, #ff5722) !important;
  color: white !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 999 !important;
  box-shadow: 0 4px 12px rgba(255, 23, 68, 0.5) !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.edit-container:hover .pencil-icon,
.media-edit-container:hover .pencil-icon,
.pencil-icon:hover {
  opacity: 1 !important;
  transform: scale(1.1) rotate(15deg) !important;
}

/* Center pencil icon explicitly for videos */
.media-edit-container:has(video) > .pencil-icon {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%) !important;
  width: 48px !important;
  height: 48px !important;
  font-size: 20px !important;
}

.media-edit-container:has(video):hover > .pencil-icon,
.media-edit-container:has(video) > .pencil-icon:hover {
  transform: translate(-50%, -50%) scale(1.1) rotate(15deg) !important;
}

.edit-input {
  display: inline-block !important;
  min-width: 50px !important;
  box-sizing: border-box !important;
  padding: 2px 8px !important;
  border: none !important;
  border-bottom: 2px dashed #ff1744 !important;
  border-radius: 4px !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  background: rgba(255, 31, 31, 0.1) !important;
  transition: all 0.2s !important;
}

.edit-input:focus {
  outline: none !important;
  border-bottom: 2px solid #ff1744 !important;
  background: rgba(255, 31, 31, 0.2) !important;
}

/* Hero specific adjustments */
.hero-title .edit-container,
.hero-badges .edit-container {
  position: relative !important;
}

.hero-title .pencil-icon {
  top: -12px !important;
  right: -12px !important;
}

@media (max-width: 768px) {
  .pencil-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    top: -8px !important;
    right: -8px !important;
  }
}

