/**
 * PrestaChamps Module Showroom - back office launcher (header button + module panel).
 * Everything is scoped under .pchsr-launcher; the only rule outside it lets the button sit right after the search box.
 */
.pchsr-launcher {
  display: none;
  align-self: center;
  margin: 0 auto 0 12px;
  font: 500 13px/1.3 "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  text-align: left;
}
.pchsr-launcher.is-placed { display: block; }
.pchsr-launcher *, .pchsr-launcher *::before, .pchsr-launcher *::after { box-sizing: border-box; }
/* the search form normally takes all the free width of the header: give it back so the button follows the search box */
#header_infos.pchsr-has-launcher #header_search { flex: 0 0 auto; }

.pchsr-launcher-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; margin: 0; padding: 0 12px 0 13px;
  border: 0; border-radius: 9px; background: #df0067; color: #fff; cursor: pointer;
  font: inherit; font-weight: 700; white-space: nowrap;
}
.pchsr-launcher-btn:hover, .pchsr-launcher-btn[aria-expanded="true"] { background: #c3005a; }
.pchsr-launcher-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pchsr-launcher-btn .pchsr-chev { transition: transform .15s; }
.pchsr-launcher-btn[aria-expanded="true"] .pchsr-chev { transform: rotate(180deg); }

/* opens over the page on a click: above the pinned menu (502) and the page title bar (499) */
.pchsr-panel {
  position: fixed; left: 12px; right: 12px; top: 58px; z-index: 1050;
  max-height: calc(100vh - 76px); overflow: auto; padding: 18px 20px 12px;
  border: 1px solid #e7e4f0; border-radius: 14px; background: #fff; color: #1b1738;
  box-shadow: 0 2px 4px rgba(27, 23, 56, .06), 0 18px 44px rgba(27, 23, 56, .22);
}
.pchsr-panel[hidden] { display: none; }
.pchsr-panel-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; }
.pchsr-col-title {
  display: flex; align-items: center; gap: 8px; margin: 2px 8px 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pchsr-c);
}
.pchsr-col-title i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pchsr-c); }
.pchsr-mod {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px;
  color: #1b1738 !important; text-decoration: none !important; font-size: 14px; font-weight: 600; line-height: 1.25;
}
.pchsr-mod:hover, .pchsr-mod:focus { background: color-mix(in srgb, var(--pchsr-m) 10%, #ffffff); }
.pchsr-mod.is-current { background: color-mix(in srgb, var(--pchsr-m) 12%, #ffffff); box-shadow: inset 0 0 0 1.5px var(--pchsr-m); }
.pchsr-mod.is-disabled { opacity: .55; }
.pchsr-mod .pchsr-ico {
  flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; padding: 3px;
  background: #fff; border: 1px solid color-mix(in srgb, var(--pchsr-m) 30%, transparent);
}
.pchsr-mod img { max-width: 100%; height: auto; display: block; }
.pchsr-panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 8px 0; border-top: 1px solid #efedf6; font-size: 12.5px; color: #6b6790;
}
.pchsr-panel-foot b { color: #1b1738; }
.pchsr-panel-foot a { color: #df0067 !important; font-weight: 700; text-decoration: none !important; }
.pchsr-panel-foot a:hover { text-decoration: underline !important; }
.pchsr-panel-now .pchsr-to-demo { margin-left: 10px; }

/* "View store", right before the store selector */
.pchsr-viewstore { display: none; }
.pchsr-viewstore.is-placed {
  display: inline-flex; align-items: center; align-self: center; gap: 6px; height: 36px; margin-right: 8px; padding: 0 10px;
  border-radius: 8px; color: #fff !important; text-decoration: none !important; white-space: nowrap;
  font: 600 13px/1 "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
.pchsr-viewstore.is-placed:hover, .pchsr-viewstore.is-placed:focus-visible { background: rgba(255, 255, 255, .12); }
/* the store's name after "View store": long demo store names are cut, the full one is in the tooltip */
.pchsr-viewstore-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; opacity: .85; }

/* every profile except SuperAdmin (html.pchsr-limited, set by the module): no store switchers, and the Module Manager
   lists only the modules enabled in the current store, without the showroom itself (nor its own menu entry, the header
   button does the same); !important keeps PrestaShop's own
   search and filter from bringing them back */
html.pchsr-limited #header-list,
html.pchsr-limited #header-multishop,
html.pchsr-limited #multishop-modal,
html.pchsr-limited .module-item[data-active="0"],
html.pchsr-limited .module-item[data-tech-name="pchshowroom"],
html.pchsr-limited #subtab-AdminPchShowroomParent { display: none !important; }

@media (max-width: 1100px) {
  .pchsr-launcher-btn > span, .pchsr-viewstore > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pchsr-launcher-btn .pchsr-chev { transition: none; } }
