.ip-hero-admin-btn {
  margin-left: 8px;
}

.ip-hero-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ip-hero-settings-modal {
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ip-hero-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.ip-hero-settings-header strong {
  font-size: 1.05rem;
}

.ip-hero-settings-note {
  color: #64748b;
  font-size: 0.82rem;
  margin-top: 4px;
}

.ip-hero-settings-body {
  padding: 20px;
  overflow: auto;
}

.ip-hero-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.ip-hero-settings-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.ip-hero-settings-card.is-active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.25);
}

.ip-hero-settings-thumb {
  aspect-ratio: 16 / 9;
  background: #cbd5e1 center/cover no-repeat;
}

.ip-hero-settings-card-body {
  padding: 10px;
}

.ip-hero-settings-card-body strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ip-hero-settings-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ip-hero-settings-card-actions button {
  font-size: 0.72rem;
  padding: 4px 8px;
}

.ip-hero-settings-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.68rem;
  font-weight: 700;
}

.ip-hero-settings-form {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.ip-hero-settings-form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: #334155;
}

.ip-hero-settings-form input[type="text"],
.ip-hero-settings-form input[type="file"],
.ip-hero-settings-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.ip-hero-settings-effects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.ip-hero-settings-effects label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.ip-hero-settings-sliders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ip-hero-settings-preview {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.ip-hero-settings-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.ip-hero-settings-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.ip-hero-settings-status.success {
  background: #ecfdf5;
  color: #047857;
}

.ip-hero-settings-status.error {
  background: #fef2f2;
  color: #b91c1c;
}

.ip-hero-settings-status.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.ip-hero-feed-order-label {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  font-size: 0.72rem;
  color: #475569;
}

.ip-hero-feed-order-label select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.ip-hero-feed-settings {
  margin-bottom: 14px;
  border-color: #ddd6fe;
  background: #faf5ff;
}

.ip-hero-settings-editor {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.ip-hero-settings-editor h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.ip-hero-admin-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.editor-nav-btn.ip-hero-sidebar-btn svg {
  width: 22px;
  height: 22px;
}

.editor-nav-btn.ip-hero-sidebar-btn {
  position: relative;
}

.editor-nav-btn.ip-hero-sidebar-btn::after {
  content: 'Hero';
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.editor-nav-btn.ip-hero-sidebar-btn:hover::after,
.editor-nav-btn.ip-hero-sidebar-btn:focus-visible::after {
  opacity: 1;
}

.editor-nav-btn.ip-hero-sidebar-btn:hover,
.editor-nav-btn.ip-hero-sidebar-btn:focus-visible {
  background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  color: #fff !important;
}

@media (max-width: 640px) {
  .ip-hero-settings-overlay {
    padding: 10px;
  }
  .ip-hero-settings-body {
    padding: 14px;
  }
}
