/* Social Crest - (C) 2026 SSK-Extensions - GNU GPL v2 or later.
   No JavaScript. Every button carries its colours as custom properties (--sc-brand, --sc-bg, --sc-fg);
   size, gap and the single colour come from the module settings (--sc-size, --sc-gap, --sc-mono).
   Override the custom properties below in your template CSS if you like.
   The icon colour is set on the icon itself (--sc-ic), so template rules for links (for example a colour for all links in the footer) cannot change it. */
.mod-socialcrest{
  --sc-s:var(--sc-size,40px);
  --sc-g:var(--sc-gap,6px);
  --sc-mono-c:var(--sc-mono,var(--cassiopeia-color-primary,var(--bs-primary,#333)));
  --sc-radius-rounded:22%;
  --sc-outline-width:2px;
  --sc-focus:#111;
  --sc-shadow:0 2px 6px rgba(0,0,0,.18);
  --sc-shadow-hover:0 6px 14px rgba(0,0,0,.24);
  --sc-title-color:inherit;
}
.mod-socialcrest.is-align-left{text-align:left}
.mod-socialcrest.is-align-center{text-align:center}
.mod-socialcrest.is-align-right{text-align:right}
.mod-socialcrest__title{margin:0 0 12px;font-size:.75rem;font-weight:700;letter-spacing:.3em;text-transform:uppercase;color:var(--sc-title-color);opacity:.85}
.mod-socialcrest__text{margin:0 0 12px}
.mod-socialcrest__list + .mod-socialcrest__text{margin:12px 0 0}
.mod-socialcrest .mod-socialcrest__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:var(--sc-g)}
.mod-socialcrest.is-align-left .mod-socialcrest__list{justify-content:flex-start}
.mod-socialcrest.is-align-center .mod-socialcrest__list{justify-content:center}
.mod-socialcrest.is-align-right .mod-socialcrest__list{justify-content:flex-end}
.mod-socialcrest .mod-socialcrest__list > li{margin:0;padding:0;list-style:none;line-height:0}
.mod-socialcrest .mod-socialcrest__list > li::before{content:none;display:none}

/* The button */
.mod-socialcrest .mod-socialcrest__btn{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:var(--sc-s);height:var(--sc-s);border-radius:50%;
  background:var(--sc-bg);--sc-ic:var(--sc-fg);text-decoration:none;overflow:hidden;line-height:0;
  transition:transform .2s,box-shadow .2s,filter .2s,background .2s}
.mod-socialcrest .mod-socialcrest__btn .mod-socialcrest__icon{display:block;flex:none;max-width:none;fill:currentColor;color:var(--sc-ic,currentColor);
  width:calc(var(--sc-s) * var(--sc-glyph,.55) * var(--sc-k,1));height:calc(var(--sc-s) * var(--sc-glyph,.55) * var(--sc-k,1))}
.mod-socialcrest .mod-socialcrest__btn .mod-socialcrest__img{display:block;flex:none;max-width:none;object-fit:contain;
  width:calc(var(--sc-s) * var(--sc-glyph,.55));height:calc(var(--sc-s) * var(--sc-glyph,.55))}
.mod-socialcrest .mod-socialcrest__btn.is-image-fill{background:transparent}
.mod-socialcrest .mod-socialcrest__btn.is-image-fill .mod-socialcrest__img{width:100%;height:100%}

/* Shapes */
.mod-socialcrest.is-rounded .mod-socialcrest__btn{border-radius:var(--sc-radius-rounded)}
.mod-socialcrest.is-square .mod-socialcrest__btn{border-radius:0}
.mod-socialcrest.is-plain .mod-socialcrest__btn{border-radius:0;background:none;--sc-ic:var(--sc-brand)}
.mod-socialcrest.is-plain .mod-socialcrest__btn .mod-socialcrest__icon{width:calc(var(--sc-s) * .8 * var(--sc-k,1));height:calc(var(--sc-s) * .8 * var(--sc-k,1))}
/* Logos that are a filled circle themselves (Facebook, Pinterest ...): on round buttons the logo is the button */
.mod-socialcrest.is-circle:not(.is-outline) .mod-socialcrest__btn.is-disk{background:var(--sc-fg);--sc-ic:var(--sc-brand)}
.mod-socialcrest.is-circle:not(.is-outline) .mod-socialcrest__btn.is-disk .mod-socialcrest__icon{width:calc(100% + 2px);height:calc(100% + 2px)}

/* Colour modes: brand (default, above) | mono | outline | gray */
.mod-socialcrest.is-mono .mod-socialcrest__btn{background:var(--sc-mono-c);--sc-ic:var(--sc-mono-fg,#fff)}
.mod-socialcrest.is-mono.is-circle .mod-socialcrest__btn.is-disk{background:var(--sc-mono-fg,#fff);--sc-ic:var(--sc-mono-c)}
.mod-socialcrest.is-mono.is-plain .mod-socialcrest__btn{background:none;--sc-ic:var(--sc-mono-c)}
.mod-socialcrest.is-outline .mod-socialcrest__btn{background:transparent;--sc-ic:var(--sc-brand);box-shadow:inset 0 0 0 var(--sc-outline-width) var(--sc-brand)}
.mod-socialcrest.is-outline .mod-socialcrest__btn:hover,.mod-socialcrest.is-outline .mod-socialcrest__btn:focus-visible{background:var(--sc-bg);--sc-ic:var(--sc-fg);box-shadow:inset 0 0 0 var(--sc-outline-width) transparent}
.mod-socialcrest.is-outline.is-plain .mod-socialcrest__btn,.mod-socialcrest.is-outline.is-plain .mod-socialcrest__btn:hover,.mod-socialcrest.is-outline.is-plain .mod-socialcrest__btn:focus-visible{background:none;--sc-ic:var(--sc-brand);box-shadow:none}
.mod-socialcrest.is-gray .mod-socialcrest__btn{filter:grayscale(1);opacity:.85}
.mod-socialcrest.is-gray .mod-socialcrest__btn:hover,.mod-socialcrest.is-gray .mod-socialcrest__btn:focus-visible{filter:none;opacity:1}

/* Shadow */
.mod-socialcrest.has-shadow .mod-socialcrest__btn{box-shadow:var(--sc-shadow)}
.mod-socialcrest.has-shadow .mod-socialcrest__btn:hover,.mod-socialcrest.has-shadow .mod-socialcrest__btn:focus-visible{box-shadow:var(--sc-shadow-hover)}
.mod-socialcrest.has-shadow.is-outline .mod-socialcrest__btn{box-shadow:inset 0 0 0 var(--sc-outline-width) var(--sc-brand),var(--sc-shadow)}
.mod-socialcrest.has-shadow.is-outline .mod-socialcrest__btn:hover,.mod-socialcrest.has-shadow.is-outline .mod-socialcrest__btn:focus-visible{box-shadow:var(--sc-shadow-hover)}
.mod-socialcrest.has-shadow.is-plain .mod-socialcrest__btn{box-shadow:none}
.mod-socialcrest.has-shadow.is-plain .mod-socialcrest__icon{filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}

/* Hover effects */
.mod-socialcrest.is-hover-lift .mod-socialcrest__btn:hover,.mod-socialcrest.is-hover-lift .mod-socialcrest__btn:focus-visible{transform:translateY(-3px)}
.mod-socialcrest.is-hover-grow .mod-socialcrest__btn:hover,.mod-socialcrest.is-hover-grow .mod-socialcrest__btn:focus-visible{transform:scale(1.12)}

/* Keyboard focus: always a visible ring */
.mod-socialcrest .mod-socialcrest__btn:focus-visible{outline:2px solid var(--sc-focus);outline-offset:3px}

@media (max-width:640px){
  .mod-socialcrest{--sc-s:var(--sc-size-sm,var(--sc-size,40px));--sc-g:var(--sc-gap-sm,var(--sc-gap,6px))}
}
@media (prefers-reduced-motion:reduce){
  .mod-socialcrest .mod-socialcrest__btn{transition:none}
  .mod-socialcrest.is-hover-lift .mod-socialcrest__btn:hover,.mod-socialcrest.is-hover-lift .mod-socialcrest__btn:focus-visible,
  .mod-socialcrest.is-hover-grow .mod-socialcrest__btn:hover,.mod-socialcrest.is-hover-grow .mod-socialcrest__btn:focus-visible{transform:none}
}
@media (forced-colors:active){
  .mod-socialcrest .mod-socialcrest__btn{border:1px solid ButtonText;forced-color-adjust:auto}
}
