/* MySchool OS 7.0.11 — school-owned preset/custom themes and abstract decals. */
.tenant-theme{
  --school-surface:#f5f8f4;
  position:relative;
  isolation:isolate;
  min-height:100%;
  color:var(--school-font,#17372b);
  background:var(--school-surface);
  font-family:var(--school-font-family,Inter,"Segoe UI",Arial,sans-serif);
  font-size:var(--school-font-size,16px);
  overflow:clip;
}
.tenant-theme::before,.tenant-theme::after{
  content:"";
  position:fixed;
  inset:54px 0 0;
  pointer-events:none;
  z-index:0;
  opacity:.15;
  background:var(--school-accent,#d0aa45);
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-size:cover;
  mask-size:cover;
  -webkit-mask-position:center top;
  mask-position:center top;
}
.tenant-theme::after{
  opacity:.065;
  background:var(--school-primary,#245c46);
  transform:scaleX(-1);
}
.tenant-theme[data-decal="none"]::before,.tenant-theme[data-decal="none"]::after{display:none}
.tenant-theme[data-decal="canopy"]::before,.tenant-theme[data-decal="canopy"]::after{-webkit-mask-image:url("decals/canopy.svg");mask-image:url("decals/canopy.svg")}
.tenant-theme[data-decal="tide"]::before,.tenant-theme[data-decal="tide"]::after{-webkit-mask-image:url("decals/tide.svg");mask-image:url("decals/tide.svg")}
.tenant-theme[data-decal="mosaic"]::before,.tenant-theme[data-decal="mosaic"]::after{-webkit-mask-image:url("decals/mosaic.svg");mask-image:url("decals/mosaic.svg")}
.tenant-theme[data-decal="ribbons"]::before,.tenant-theme[data-decal="ribbons"]::after{-webkit-mask-image:url("decals/ribbons.svg");mask-image:url("decals/ribbons.svg")}
.tenant-theme[data-decal="constellation"]::before,.tenant-theme[data-decal="constellation"]::after{-webkit-mask-image:url("decals/constellation.svg");mask-image:url("decals/constellation.svg")}
.tenant-theme[data-decal="sunburst"]::before,.tenant-theme[data-decal="sunburst"]::after{-webkit-mask-image:url("decals/sunburst.svg");mask-image:url("decals/sunburst.svg")}
.tenant-theme[data-decal="geometry"]::before,.tenant-theme[data-decal="geometry"]::after{-webkit-mask-image:url("decals/geometry.svg");mask-image:url("decals/geometry.svg")}

/* Preset/custom theme variables override old school-colour declarations that live on child shells. */
.tenant-theme[data-theme-mode="preset"] .v2-school,
.tenant-theme[data-theme-mode="preset"] .sp-public,
.tenant-theme[data-theme-mode="preset"] .si,
.tenant-theme[data-theme-mode="custom"] .v2-school,
.tenant-theme[data-theme-mode="custom"] .sp-public,
.tenant-theme[data-theme-mode="custom"] .si{
  --school-primary:inherit!important;
  --school-secondary:inherit!important;
  --school-accent:inherit!important;
  --school-font:inherit!important;
}
.tenant-theme :where(.v2-school,.sp-public,.v2-portal,.v2-module-page,.v2-public-subpage,.si,.cw,.rp){
  font-family:var(--school-font-family,Inter,"Segoe UI",Arial,sans-serif)!important;
}
.tenant-theme > :not(link):not(style){position:relative;z-index:1}
.tenant-theme :where(.v2-school-canvas,.sp-content,.v2-module-embed,.v2-public-content){position:relative;z-index:1}
.tenant-theme :where(.v2-school-canvas,.v2-module-page,.v2-portal,.tp-shell,.fp-shell,.mg-shell,.portal-workspace-shell){background:linear-gradient(145deg,color-mix(in srgb,var(--school-surface) 92%,transparent),color-mix(in srgb,#fff 93%,transparent) 46%,color-mix(in srgb,var(--school-secondary) 9%,var(--school-surface)))!important}
.tenant-theme :where(.card,.si-card,.v2-compact-grid>article,.sp-news-card,.cw-card,.rp-card){
  box-shadow:0 10px 30px color-mix(in srgb,var(--school-primary) 7%,transparent);
}

/* Theme Studio settings cards. */
.theme-studio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:12px 0 18px}
.theme-preset-card{position:relative;border:1px solid #d8e2da;border-radius:18px;padding:14px;background:#fff;overflow:hidden;min-height:150px}
.theme-preset-card input{position:absolute;top:12px;right:12px;width:20px;height:20px}
.theme-preset-card .theme-swatch{height:54px;border-radius:13px;margin:6px 0 11px;background:linear-gradient(120deg,var(--tp),var(--ts) 58%,var(--ta))}
.theme-preset-card b{display:block;font-size:1rem;margin-bottom:3px}
.theme-preset-card small{color:#5f6f65}
.theme-decal-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:9px;margin-top:8px}
.theme-decal-choice{border:1px solid #d8e2da;border-radius:14px;padding:10px;background:#fff;display:flex;align-items:center;gap:8px}
.theme-decal-choice input{width:18px;height:18px}
.theme-custom-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-top:12px}
.theme-custom-item{border:1px solid #d8e2da;border-radius:15px;padding:12px;background:#fff}
.theme-custom-item .theme-swatch{height:32px;border-radius:9px;margin-bottom:7px;background:linear-gradient(110deg,var(--tp),var(--ts),var(--ta))}
@media(max-width:700px){.tenant-theme::before,.tenant-theme::after{inset:50px 0 0;opacity:.11}.theme-studio-grid{grid-template-columns:1fr 1fr}.theme-preset-card{min-height:135px}}
@media(max-width:480px){.theme-studio-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.tenant-theme::before,.tenant-theme::after{transform:none}}
