/* web/public/brand/modules/brand-module-skins.css */
/* Admin-only skin picker + glass-surface helpers for Brand pages */

.brand-skins-panel{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 28px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
  overflow: hidden;
  font-family: inherit;
}

.brand-skins-panel[hidden]{ display:none !important; }

.brand-skins__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.brand-skins__title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
  opacity: .92;
}

.brand-skins__meta{
  font-size: 12px;
  opacity: .75;
}

.brand-skins__toggle{
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor:pointer;
  font-weight: 700;
}

.brand-skins__body{
  padding: 10px 12px 12px;
}

.brand-skins__grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-height: 190px;
  overflow:auto;
  padding-right: 4px;
}

@media (max-width: 520px){
  .brand-skins__grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.brand-skins__chip{
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor:pointer;
  position:relative;
  overflow:hidden;
}
.brand-skins__chip::after{
  content:"";
  position:absolute;
  inset:0;
  background: var(--chip-bg, linear-gradient(135deg, rgba(255,255,255,0.25), rgba(0,0,0,0)));
  opacity: .95;
}
.brand-skins__chip.is-active{
  border-color: rgba(255,255,255,0.60);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10) inset;
}

.brand-skins__actions{
  display:flex;
  gap: 8px;
  margin-top: 10px;
}
.brand-skins__btn{
  flex:1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color:#fff;
  padding: 9px 10px;
  cursor:pointer;
  font-weight: 800;
}
.brand-skins__btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* ====== Skins overlay layer ====== */
.brand-skins-overlay{
  position: fixed;
  inset: 0;
  /* Overlay renders ABOVE page background, BELOW all content */
  z-index: 0;
  pointer-events: none;
  background-image: var(--brand-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Force the real document background to be transparent when skin active,
   otherwise the overlay can be hidden behind a solid default background. */
html, body{ background: transparent; }
body[data-brand-skin]{
  background: transparent !important;
}

/* Ensure all main content sits above the overlay (hero included) */
.app-shell,
.app-shell-inner,
#main,
.main-content{
  position: relative;
  z-index: 1;
}

/* Glass surfaces (only when a skin is active) */
body[data-brand-skin] .brand-skin-surface{
  background-color: var(--brand-board-bg, rgba(0,0,0,0.36)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* SHOP: keep the product image area the SAME tone as the card (clean look) */
body[data-brand-skin] .product-image-wrapper{
  background-color: var(--brand-board-bg, rgba(0,0,0,0.36)) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

/* If your shared theme injects a global background layer, kill it here too (brand.css already does). */
body[data-brand-skin]::before{
  content: none !important;
}


/* ====== Contrast helpers ====== */
body[data-brand-skin] .brand-skin-surface,
body[data-brand-skin] .brand-skin-surface *{
  color: rgba(255,255,255,0.92);
}

body[data-brand-skin] .brand-skin-surface .muted,
body[data-brand-skin] .brand-skin-surface .subtle,
body[data-brand-skin] .brand-skin-surface .brand-bio,
body[data-brand-skin] .brand-skin-surface .brand-headline{
  color: rgba(255,255,255,0.78) !important;
}

/* Stronger readability on section headings */
body[data-brand-skin] h1,
body[data-brand-skin] h2,
body[data-brand-skin] h3,
body[data-brand-skin] .section-title,
body[data-brand-skin] .section-header,
body[data-brand-skin] #brandName{
  color: rgba(255,255,255,0.95) !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

/* Chips/buttons inside dark glass */
body[data-brand-skin] .chip,
body[data-brand-skin] .btn,
body[data-brand-skin] button{
  color: rgba(255,255,255,0.92);
}


/* ====== Board color controls ====== */
.brand-skins__controls{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom: 10px;
}

.brand-skins__controlRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.brand-skins__label{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  opacity: .9;
}

.brand-skins__select{
  flex:1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(0,0,0,0.55);
  color:#fff;
  padding: 9px 10px;
  font-weight: 800;
  outline:none;
}

/* Make native dropdown options readable (critical on Windows/Chrome) */
.brand-skins__select option{
  background: #0b0f14;
  color: #fff;
}

.brand-skins__miniChips{
  display:flex;
  gap:8px;
  overflow:auto;
  padding-bottom: 2px;
}

.brand-skins__miniChip{
  width: 34px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor:pointer;
  flex: 0 0 auto;
  background: var(--chip-bg, rgba(255,255,255,0.12));
  position:relative;
}
.brand-skins__miniChip.is-active{
  border-color: rgba(255,255,255,0.60);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10) inset;
}


/* Background image controls */
.brand-skins__bgTools{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  width: 210px;
}
.brand-skins__file{
  width: 150px;
  max-width: 150px;
  color: #fff;
  font-size: 11px;
}
.brand-skins__btnSmall{
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  cursor:pointer;
  font-weight: 800;
  font-size: 11px;
}
.brand-skins__bgPreviewRow{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 8px 0 10px;
}
.brand-skins__bgPreview{
  width: 52px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  background-size: cover;
  background-position:center;
}
.brand-skins__bgHint{
  font-size: 11px;
  line-height: 1.2;
  opacity: .78;
}
