/* Hero floating custom controls + slider configuration modal */

#heroControlsLayer {
  position: absolute;
  inset: 0;
  z-index: 4;
  /* Pass clicks through to hero copy/slider; only .hero-custom-control receives events. */
  pointer-events: none;
}

.hero-custom-control {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  max-width: min(92vw, 420px);
  margin: 0;
  z-index: 2;
}

.hero-custom-label {
  display: inline-block;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  line-height: 1.35;
  white-space: pre-wrap;
  text-align: center;
}

.hero-custom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(244, 208, 111, 0.55);
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.hero-edit-mode .hero-custom-control {
  outline: 1px dashed rgba(244, 208, 111, 0.45);
  outline-offset: 4px;
  cursor: grab;
}

.hero-edit-mode .hero-custom-control.is-dragging,
body.hero-control-dragging .hero-custom-control {
  cursor: grabbing;
  outline-color: rgba(244, 208, 111, 0.9);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  z-index: 6;
}

.hero-custom-control--editable {
  position: absolute;
}

.hero-edit-pencil--floating {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 3;
}

#heroControlsLayer.hero-controls-layer--mobile-hidden {
  display: none !important;
  pointer-events: none;
}

.hero-custom-mobile-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.hero-custom-mobile-slot:empty {
  display: none;
}

.hero-custom-control--mobile-flow {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  max-width: 100%;
  width: auto;
  margin: 0;
}

.hero-custom-mobile-slot .hero-custom-label {
  text-align: center;
}

.hero-custom-btn--mobile-cta,
.hero-custom-btn--mobile-stack {
  width: 100%;
  min-width: 0;
}

.hero-custom-mobile-slot--panel,
.hero-custom-mobile-slot--wide {
  width: 100%;
}

@media (max-width: 991.98px) {
  .hero-custom-mobile-slot {
    margin-block: 0.15rem;
  }

  .hero-custom-mobile-slot[data-hero-mobile-slot="after-eyebrow"] {
    margin-bottom: 0.35rem;
  }

  .hero-custom-mobile-slot[data-hero-mobile-slot="after-title"] {
    margin-top: 0.15rem;
    margin-bottom: 0.45rem;
  }

  .hero-custom-mobile-slot[data-hero-mobile-slot="after-lead"],
  .hero-custom-mobile-slot[data-hero-mobile-slot="before-cta"] {
    margin-bottom: 0.65rem;
  }

  .hero-custom-mobile-slot[data-hero-mobile-slot="after-cta"] {
    margin-top: 0.35rem;
  }

  .hero-custom-mobile-slot[data-hero-mobile-slot="before-stats"] {
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
  }

  .hero-custom-mobile-slot[data-hero-mobile-slot="before-slider"] {
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
  }
}

/* Slider layout positions */
@media (min-width: 992px) {
  .hero-balanced--slider-left .hero-visual-col {
    order: -1;
  }

  .hero-balanced--slider-center {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
  }

  .hero-balanced--slider-center .hero-panel {
    align-items: center;
  }

  .hero-balanced--slider-center .hero-copy {
    text-align: center;
  }

  .hero-balanced--slider-center .hero-cta-row {
    justify-content: center;
  }

  .hero-balanced--slider-center .hero-stats-row {
    justify-content: center;
  }

  .hero-balanced--slider-center .hero-visual-col {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }
}

/* Slider config modal */
.hero-slider-config-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hero-slider-config-modal[hidden] {
  display: none !important;
}

.hero-slider-config-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
}

.hero-slider-config-modal__panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 95, 0.35);
  background: linear-gradient(165deg, #12151d 0%, #0c0e14 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  color: #f7ead0;
}

.hero-slider-config-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 95, 0.14);
}

.hero-slider-config-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.hero-slider-config-modal__sub {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: rgba(247, 234, 208, 0.68);
}

.hero-slider-config-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(212, 175, 95, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #f7ead0;
  cursor: pointer;
}

.hero-slider-config-modal__body {
  padding: 1rem 1.35rem 1.25rem;
  display: grid;
  gap: 1.1rem;
}

.hero-slider-config-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.hero-slider-config-modal__grid .site-editor-field--full {
  grid-column: 1 / -1;
}

.hero-slider-config__slides {
  display: grid;
  gap: 0.75rem;
}

.hero-slider-config__slide {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 95, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.hero-slider-config__slide img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-slider-config__slide-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.hero-slider-config__icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(212, 175, 95, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: #f7ead0;
  cursor: pointer;
}

.hero-slider-config__icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hero-slider-config__icon-btn--danger {
  color: #f5a8a8;
  border-color: rgba(245, 120, 120, 0.35);
}

.hero-slider-config__empty {
  margin: 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(247, 234, 208, 0.65);
  font-size: 0.875rem;
}

.hero-slider-config__upload {
  display: grid;
  gap: 0.45rem;
}

.hero-slider-config__upload input[type="file"] {
  font-size: 0.85rem;
  color: rgba(247, 234, 208, 0.8);
}

.hero-slider-config-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.85rem 1.35rem 1.15rem;
  border-top: 1px solid rgba(212, 175, 95, 0.14);
}

.site-edit-menu__divider {
  height: 1px;
  margin: 0.3rem 0.35rem;
  background: rgba(212, 175, 95, 0.2);
}

@media (max-width: 575.98px) {
  .hero-slider-config-modal__grid {
    grid-template-columns: 1fr;
  }
}
