
/* SP Compass UI (portal-only cosmetic layer) */

:root{
  --spcu-orange: #f26522;
  --spcu-border: rgba(15, 23, 42, 0.10);
  --spcu-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
  --spcu-shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
}

/* Loader overlay */
#spcu-loader{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.70);
  backdrop-filter: blur(4px);
}
#spcu-loader .spcu-loader-card{
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--spcu-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--spcu-shadow);
  min-width: 220px;
}
#spcu-loader .spcu-spinner{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(242,101,34,0.25);
  border-top-color: var(--spcu-orange);
  animation: spcuSpin 0.9s linear infinite;
}

#spcu-loader .spcu-check{
  display: none;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  color: #16a34a;
}

#spcu-loader.success .spcu-spinner{
  display: none;
}

#spcu-loader.success .spcu-check{
  display: block;
  animation: spcuCheckIn 180ms ease-out;
}

@keyframes spcuSpin { to { transform: rotate(360deg); } }

@keyframes spcuCheckIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
#spcu-loader .spcu-loader-text{
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
}

/* Toasts */
#spcu-toasts{
  position: fixed;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Default positioning (always works) */
#spcu-toasts.top-right{
  top: 16px;
  right: 16px;
}

#spcu-toasts.top-left{
  top: 16px;
  left: 16px;
}

#spcu-toasts.bottom-right{
  bottom: 16px;
  right: 16px;
}

#spcu-toasts.bottom-left{
  bottom: 16px;
  left: 16px;
}

/* Portal-specific adjustment (push below header) */
body.sp-portal #spcu-toasts.top-right,
body.sp-portal-auth #spcu-toasts.top-right{
  top: 88px;
}

body.sp-portal #spcu-toasts.top-left,
body.sp-portal-auth #spcu-toasts.top-left{
  top: 88px;
}

.spcu-toast{
  pointer-events: auto;
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--spcu-border);
  border-radius: 14px;
  box-shadow: var(--spcu-shadow-sm);
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  animation: spcuToastIn 160ms ease-out;
}
@keyframes spcuToastIn {
  from { transform: translateY(-4px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.spcu-toast .spcu-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
}
.spcu-toast.success .spcu-dot{ background: #16a34a; }
.spcu-toast.error .spcu-dot{ background: #dc2626; }
.spcu-toast.info .spcu-dot{ background: #2563eb; }

.spcu-toast .spcu-title{
  font-weight: 900;
  font-size: 13px;
  color: #111827;
  margin: 0 0 2px 0;
}
.spcu-toast .spcu-msg{
  font-size: 13px;
  color: #374151;
  margin: 0;
  line-height: 1.35;
}
.spcu-toast .spcu-close{
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  color: #6b7280;
}

/* Header logo replacement (shell uses .sp-portal-mark) */
body.sp-portal .sp-portal-mark img.spcu-logo,
body.sp-portal-auth .sp-portal-mark img.spcu-logo{
  height: var(--spcu-logo-h, 34px);
  width: auto;
  display: block;
}

/*
  The shell's default mark is a fixed 34x34 orange tile.
  When we swap in a real logo (wide), we must let the container size itself.
*/
body.spcu-has-logo .sp-portal-mark{
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Keep the header layout clean when the logo is wide */
body.spcu-has-logo .sp-portal-brand{ gap: 12px; }

/* Optional: logo-only header (hide text label when logo is set) */
body.spcu-logo-only .sp-portal-brandtext{ display:none !important; }
