/* Shared WebSnug portal branding
   Used by Admin, Dashboard, Editor and Logo Tool. */

.ws-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  color: #fff;
}

.ws-brand--link {
  text-decoration: none;
  flex-shrink: 0;
}

.ws-brand__emblem {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  padding: 9px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a7fff, #0052c2);
  box-shadow:
    0 4px 16px rgba(0, 103, 240, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.ws-brand--link:hover .ws-brand__emblem {
  transform: translateY(-1px);
  box-shadow:
    0 6px 22px rgba(0, 103, 240, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ws-brand__emblem svg,
.ws-brand__emblem img {
  display: block;
  width: 100%;
  max-width: 26px;
  height: auto;
  aspect-ratio: 620 / 364;
  flex: none;
  object-fit: contain;
}

.ws-brand__emblem svg path {
  fill: #fff;
}

.ws-brand__emblem.ws-brand__emblem--asset {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.ws-brand__emblem.ws-brand__emblem--asset img {
  width: 100%;
  height: 100%;
  filter: none;
}

.ws-brand--link:hover .ws-brand__emblem.ws-brand__emblem--asset {
  box-shadow: none;
}

/* Framed emblem with the slow, continuous WebSnug light orbit. */
.ws-logo-orbit {
  position: relative;
  isolation: isolate;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: inline-grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(143, 199, 255, 0.38);
  border-radius: 16px;
  background: rgba(0, 103, 240, 0.16);
  box-shadow:
    0 0 0 4px rgba(0, 103, 240, 0.1),
    0 10px 24px rgba(0, 103, 240, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ws-logo-orbit::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 278deg,
    rgba(171, 221, 255, 0.2) 294deg,
    rgba(255, 255, 255, 0.98) 310deg,
    rgba(181, 225, 255, 0.52) 326deg,
    transparent 344deg 360deg
  );
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9));
  animation: ws-logo-orbit-spin 12s linear infinite;
}

.ws-logo-orbit::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 1;
  border-radius: 13px;
  background: linear-gradient(145deg, #0d3973, #08254d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.ws-logo-orbit > img,
.ws-logo-orbit > svg {
  position: relative;
  z-index: 2;
  display: block;
  width: 40px;
  max-width: none;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
  filter: none;
  object-fit: contain;
}

/* Lets legacy portal lockups use the official emblem without duplicating
   their existing inline fallback mark. */
.ws-logo-orbit--asset > img,
.ws-logo-orbit--asset > svg {
  grid-area: 1 / 1;
}

.ws-logo-orbit--asset > svg {
  visibility: hidden;
}

@keyframes ws-logo-orbit-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-logo-orbit::before {
    animation: none;
    opacity: 0;
  }
}

.ws-brand__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1;
}

.ws-brand__wordmark {
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ws-brand__wordmark span {
  color: #0067F0;
  text-shadow: 0 8px 22px rgba(0, 103, 240, 0.45);
}

.ws-brand__subtitle {
  color: rgba(219, 234, 254, 0.58);
  font-family: "Montserrat", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ws-brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 4px 10px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 999px;
  background: rgba(0, 103, 240, 0.22);
  color: #bfdbfe;
  font-family: "DM Sans", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.ws-brand-pill--uppercase {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

a.ws-brand-pill:hover {
  border-color: rgba(147, 197, 253, 0.32);
  background: rgba(0, 103, 240, 0.35);
  color: #fff;
}

/* Logo Tool uses the shared public-facing footer. */
.ws-portal-footer {
  padding: 2.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #151f30;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.ws-portal-footer__inner {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.ws-portal-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: clamp(3rem, 7vw, 8rem);
}

.ws-portal-footer .footer-grid > :first-child p {
  max-width: 48rem;
}

.ws-portal-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.ws-portal-footer .footer-brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.ws-portal-footer .footer-brand-text {
  display: grid;
  gap: 3px;
  line-height: 1;
}

.ws-portal-footer .footer-brand-name {
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.ws-portal-footer .footer-brand-name span {
  color: #0067F0;
  text-shadow: 0 8px 22px rgba(0, 103, 240, 0.45);
}

.ws-portal-footer .footer-brand-tagline {
  display: block;
  font-family: "Montserrat", sans-serif;
  color: rgba(219, 234, 254, 0.55);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ws-portal-footer .footer-col {
  display: grid;
  align-content: start;
  justify-self: end;
  min-width: 9rem;
  gap: 0.55rem;
}

.ws-portal-footer .footer-col strong {
  color: #fff;
  font-family: "Montserrat", sans-serif;
}

.ws-portal-footer p,
.ws-portal-footer a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

.ws-portal-footer a {
  font-weight: 700;
  text-decoration: none;
}

.ws-portal-footer a:hover {
  color: #fff;
}

.ws-portal-footer .copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(219, 234, 254, 0.55);
  font-size: 0.85rem;
  text-align: center;
}

.ws-portal-footer .footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ws-portal-footer .footer-legal a {
  color: rgba(219, 234, 254, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ws-portal-footer .footer-legal a:hover {
  color: #fff;
}

.ws-portal-footer .footer-legal span {
  opacity: 0.35;
}

@media (max-width: 760px) {
  .ws-brand {
    gap: 0.65rem;
  }

  .ws-brand__emblem {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    padding: 6px;
  }

  /* Portal sidebars keep the framed emblem large enough for the official
     square asset; the generic compact rule above otherwise clips its edge. */
  .sidebar-logo .ws-brand__emblem.ws-logo-orbit {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 4px;
    border-radius: 14px;
  }

  .sidebar-logo .ws-brand__emblem.ws-logo-orbit::after {
    border-radius: 11px;
  }

  .sidebar-logo .ws-brand__emblem.ws-logo-orbit > img,
  .sidebar-logo .ws-brand__emblem.ws-logo-orbit > svg {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .ws-brand__wordmark {
    font-size: 1rem;
  }

  .ws-brand__subtitle {
    font-size: 0.48rem;
    letter-spacing: 0.13em;
  }

  .ws-portal-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .ws-portal-footer .footer-col {
    justify-self: start;
  }

  .ws-portal-footer .copyright {
    flex-direction: column;
    align-items: center;
  }
}
