/* Mode staff inline — aucun blocage du scroll ni plein écran sur le site */

/* La modale charge l’embed admin sans la colonne navigation dupliquant le dock */
.rshop-staff-admin-modal .rshop-staff-sidebar {
  display: none !important;
}
.rshop-staff-admin-modal .rshop-staff-layout {
  display: flex !important;
  flex-direction: column !important;
  min-height: auto !important;
}
.rshop-staff-admin-modal #rshopStaffAdminEmbedRoot {
  min-height: auto;
}

/* Modale centrale compacte premium */
.rshop-staff-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: clamp(0.65rem, 2.5vmin, 1.75rem);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s;
}
.rshop-staff-admin-modal--open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.rshop-staff-admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 16, 0.38);
}

.rshop-staff-admin-modal__dialog {
  position: relative;
  margin: auto;
  width: min(1040px, 100%);
  height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  background: linear-gradient(160deg, rgba(14, 8, 26, 0.98), rgba(5, 3, 12, 0.99));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 90px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(100, 50, 180, 0.18);
}

.rshop-staff-admin-modal__chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.22);
  background: rgba(22, 10, 40, 0.55);
}
.rshop-staff-admin-modal__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 214, 255, 0.92);
}

.rshop-staff-admin-modal__close {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 10px;
  border: 1px solid rgba(196, 181, 253, 0.32);
  background: rgba(40, 16, 70, 0.45);
  color: #f5f0ff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.rshop-staff-admin-modal__close:hover {
  background: rgba(88, 28, 135, 0.5);
}

.rshop-staff-admin-modal__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Dock flottant */
.rshop-staff-dock {
  position: fixed;
  z-index: 99990;
  right: clamp(0.75rem, 2vw, 1.35rem);
  bottom: clamp(0.85rem, 3vh, 1.65rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: min(100vw - 1.25rem, 420px);
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(12, 6, 24, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.rshop-staff-dock[hidden],
.rshop-staff-shop-toolbar[hidden] {
  display: none !important;
}

body.rshop-staff-inline-on .rshop-staff-shop-toolbar:not([hidden]) {
  display: flex;
}

.rshop-staff-shop-toolbar:not([hidden]) {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.rshop-staff-dock__badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.85);
  padding: 0 0.15rem;
}
.rshop-staff-dock__cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.rshop-staff-dock__btn {
  margin: 0;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 120, 200, 0.35);
  background: rgba(30, 12, 50, 0.55);
  color: rgba(245, 240, 255, 0.95);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.2s,
    border-color 0.2s;
}
.rshop-staff-dock__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 181, 253, 0.45);
}
.rshop-staff-dock__btn--active {
  background: rgba(120, 50, 200, 0.45);
  border-color: rgba(196, 181, 253, 0.5);
}

.rshop-staff-dock__btn--accent {
  border-color: rgba(167, 139, 250, 0.55);
}

/* Boutique — boutons injectés sous la carte */
.rshop-staff-shop-tools {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(124, 58, 237, 0.25);
}

body.rshop-staff-inline-on .rshop-staff-shop-tools {
  display: flex;
}

.rshop-staff-shop-tools__lbl {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.75);
}

.rshop-staff-mini {
  margin: 0;
  padding: 0.3rem 0.52rem;
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(24, 10, 48, 0.55);
  color: rgba(252, 250, 255, 0.95);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease;
}

.rshop-staff-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(120, 60, 200, 0.28);
}

.rshop-staff-mini--danger {
  border-color: rgba(248, 113, 113, 0.55);
  color: rgba(254, 202, 202, 0.98);
}

/* Toggle header */
#navStaffModeToggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(20, 8, 40, 0.45);
  color: rgba(235, 225, 255, 0.95);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.25s;
}
#navStaffModeToggle.is-on {
  background: linear-gradient(120deg, rgba(120, 50, 200, 0.45), rgba(50, 20, 90, 0.75));
  box-shadow: 0 0 22px rgba(120, 60, 200, 0.45);
  border-color: rgba(196, 181, 253, 0.5);
}
body.rshop-staff-inline-on #navStaffModeToggle.is-on {
  animation: staff-toggle-pulse 2.2s ease-in-out infinite;
}
@keyframes staff-toggle-pulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(120, 60, 200, 0.35);
  }
  50% {
    box-shadow: 0 0 28px rgba(167, 139, 250, 0.55);
  }
}
#navStaffModeToggle .rshop-staff-toggle__knob {
  width: 1.65rem;
  height: 0.95rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  position: relative;
  flex-shrink: 0;
}
#navStaffModeToggle .rshop-staff-toggle__knob::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#navStaffModeToggle.is-on .rshop-staff-toggle__knob::after {
  transform: translateX(100%);
}

body.rshop-staff-inline-on #rshopStaffProductActions:not(.hidden):not(:empty) {
  display: flex;
}

.rshop-staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(20, 8, 40, 0.55);
  color: rgba(245, 240, 255, 0.95);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rshop-staff-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(120, 60, 200, 0.35);
}

/* Modales imbriquées (éditeur produit, commande…) au-dessus de la coque staff */
#rshopStaffAdminEmbedRoot .checkout-modal {
  z-index: 100100;
}
