/* Tech VII branding for Huly (huly.techvii.com)
   Core colors: Deep Red #C41E3A, Tech Black #121212, Soft White #E0E0E0, Tech Blue #0066CC */

@font-face {
  font-family: "Space Grotesk";
  src: url("/huly/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --t7-font-body: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
  --t7-font-display: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
}

/* Common (applies across themes) */
* {
  --global-accent-IconColor: #C41E3A !important;
  --global-higlight-Color: #C41E3A !important;

  --button-primary-BackgroundColor: #C41E3A !important;
  --button-primary-hover-BackgroundColor: #E0115F !important;
  --button-primary-active-BackgroundColor: #B31942 !important;

  --selector-active-BackgroundColor: #C41E3A !important;
  --border-talk-indication-primary: #C41E3A !important;
}

/* Dark theme adjustments */
.theme-dark {
  --global-primary-LinkColor: #0066CC !important;
  --global-accent-TextColor: #C41E3A !important;
  --global-accent-BackgroundColor: #C41E3A !important;
}

/* Light theme adjustments */
.theme-light {
  --global-primary-LinkColor: #0066CC !important;
  --global-accent-TextColor: #C41E3A !important;
  --global-accent-BackgroundColor: #C41E3A !important;
}

/*
  SSO splash (briefly visible during Authentik -> Huly handoff).
  Scoped to /login/auth via JS which toggles the html/body class.
*/
html.t7-sso-splash,
html.t7-sso-splash body {
  height: 100%;
  background:
    radial-gradient(1200px 800px at 20% 15%, rgba(196, 30, 58, 0.22), rgba(18, 18, 18, 0)),
    radial-gradient(900px 700px at 80% 85%, rgba(0, 102, 204, 0.18), rgba(18, 18, 18, 0)),
    linear-gradient(180deg, #121212, #0b0f14 55%, #070a0f);
}

#t7-sso-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #E0E0E0;
  font-family: var(--t7-font-body);
}

#t7-sso-splash .t7-card {
  width: min(560px, calc(100vw - 48px));
  padding: 26px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

#t7-sso-splash .t7-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

#t7-sso-splash .t7-logo {
  height: 38px;
  width: auto;
  max-width: min(260px, 60vw);
  display: block;
  flex: 0 0 auto;
}

#t7-sso-splash .t7-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

#t7-sso-splash .t7-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(224, 224, 224, 0.74);
  line-height: 1.45;
}

#t7-sso-splash .t7-bar {
  margin-top: 18px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(224, 224, 224, 0.12);
}

#t7-sso-splash .t7-bar > div {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, #C41E3A, #E0115F);
  animation: t7-sso-slide 1.2s ease-in-out infinite;
}

@keyframes t7-sso-slide {
  0% {
    transform: translateX(-50%);
    opacity: 0.55;
  }
  50% {
    transform: translateX(70%);
    opacity: 1;
  }
  100% {
    transform: translateX(170%);
    opacity: 0.55;
  }
}

/*
  Workspace selection branding (/login/selectWorkspace).
  Scoped to the route via JS which toggles the html/body class.
*/
html.t7-workspace-select,
html.t7-workspace-select body {
  height: 100%;
  background-color: #0b0f14;
}

body.t7-workspace-select {
  position: relative;
  min-height: 100vh;
  color: #E0E0E0;
  font-family: var(--t7-font-body);
  background-color: #0b0f14;
}

body.t7-workspace-select::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 10, 15, 0.82), rgba(7, 10, 15, 0.45) 35%, rgba(7, 10, 15, 0.88)),
    radial-gradient(950px 620px at 16% 18%, rgba(196, 30, 58, 0.28), rgba(18, 18, 18, 0) 65%),
    radial-gradient(760px 560px at 86% 82%, rgba(0, 102, 204, 0.22), rgba(18, 18, 18, 0) 70%),
    url("/huly/techvii-wallpaper.svg") center/cover no-repeat;
  animation: t7-workspace-fade 0.9s ease both;
}

body.t7-workspace-select > * {
  position: relative;
  z-index: 1;
}

#t7-workspace-brand {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(15, 18, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 3;
  animation: t7-workspace-rise 0.8s ease both;
}

#t7-workspace-brand img {
  height: 30px;
  width: auto;
  display: block;
}

#t7-workspace-brand .t7-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#t7-workspace-brand .t7-brand-title {
  font-family: var(--t7-font-display);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.3px;
}

#t7-workspace-brand .t7-brand-subtitle {
  font-size: 12px;
  color: rgba(224, 224, 224, 0.72);
}

body.t7-workspace-select h1,
body.t7-workspace-select h2,
body.t7-workspace-select [class*="title"],
body.t7-workspace-select [class*="heading"] {
  font-family: var(--t7-font-display);
  letter-spacing: 0.2px;
}

body.t7-workspace-select a {
  color: #7bb2ff;
}

body.t7-workspace-select button,
body.t7-workspace-select [role="button"] {
  border-radius: 12px;
  border: 1px solid rgba(196, 30, 58, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

body.t7-workspace-select input,
body.t7-workspace-select select,
body.t7-workspace-select textarea {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 12, 16, 0.7);
  color: #E0E0E0;
}

body.t7-workspace-select [class*="workspace"],
body.t7-workspace-select [class*="card"],
body.t7-workspace-select [class*="panel"],
body.t7-workspace-select [class*="surface"] {
  background: rgba(12, 16, 22, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

@keyframes t7-workspace-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes t7-workspace-rise {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
