/* CyberCore login theme. SPDX-License-Identifier: GPL-3.0-or-later
 * Palette from the existing CyberCore tools. All selectors target anonymous pages.
 */

html:has(> body.welcome-anonymous) {
  background-color: #211b2a;
}

body.welcome-anonymous {
  --cc-purple: #403251;
  --cc-purple-hover: #30243e;
  --cc-lavender: #bfa6da;
  --cc-ink: #26232d;
  --cc-muted: #6f6978;
  --cc-border: #dfdce5;
  --tblr-primary: #403251;
  --tblr-primary-rgb: 64, 50, 81;
  --tblr-link-color: #5c4875;
  --tblr-link-hover-color: #403251;
  --tblr-body-color: #26232d;
  --tblr-bg-surface: #fff;
  --tblr-border-color: #dfdce5;
  margin: 0;
  height: auto;
  min-height: 100vh;
  color: var(--cc-ink);
  background: radial-gradient(ellipse at 15% 10%, #5c4875 0, transparent 55%),
    linear-gradient(135deg, #30263d, #211b2a 80%);
  background-repeat: no-repeat;
  font-family: Arial, Helvetica, sans-serif;
}

body.welcome-anonymous .page-anonymous {
  min-height: 100vh;
  background: transparent;
}

body.welcome-anonymous .page-anonymous > .flex-fill {
  min-height: 100vh;
  margin-top: 0 !important;
  padding: 36px 20px !important;
  box-sizing: border-box;
}

body.welcome-anonymous .page-anonymous .container-tight {
  width: 100%;
  padding: 0 !important;
}

body.welcome-anonymous .page-anonymous .glpi-logo {
  content: none;
  display: block;
  width: min(360px, 100%) !important;
  height: 116px !important;
  margin: 0 auto 30px !important;
  border: 1px solid #ffffff26;
  border-radius: 14px;
  background: #fff url('../assets/cybercore-logo.png') center / 94% auto no-repeat;
  box-shadow: 0 12px 32px #00000026;
}

body.welcome-anonymous .main-content-card {
  color: var(--cc-ink);
  background: #fff;
  border: 1px solid #ffffff66;
  border-top: 4px solid var(--cc-lavender);
  border-radius: 18px;
  box-shadow: 0 24px 64px #00000040;
}

body.welcome-anonymous .main-content-card > .card-body {
  padding: 36px 40px 40px;
}

body.welcome-anonymous .main-content-card .card-header {
  color: var(--cc-purple);
  border-color: var(--cc-border);
}

body.welcome-anonymous .main-content-card .card-header:empty {
  display: none;
}

body.welcome-anonymous .main-content-card h2 {
  color: var(--cc-purple);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
}

body.welcome-anonymous .cc-intro {
  margin-bottom: 28px;
  text-align: center;
}

body.welcome-anonymous .cc-intro h1 {
  margin: 0 0 10px;
  color: var(--cc-purple);
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.5px;
}

body.welcome-anonymous .cc-intro p {
  margin: 0;
  color: var(--cc-muted);
  font-size: 15px;
  line-height: 1.6;
}

body.welcome-anonymous .form-label {
  color: var(--cc-ink);
  font-weight: 500;
}

body.welcome-anonymous .form-control,
body.welcome-anonymous .form-select,
body.welcome-anonymous .select2-selection {
  min-height: 44px;
  color: var(--cc-ink);
  background-color: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
}

body.welcome-anonymous .form-control:focus,
body.welcome-anonymous .form-select:focus {
  border-color: #8064a2;
  outline: none;
  box-shadow: 0 0 0 3px #8064a230;
}

body.welcome-anonymous .btn.btn-primary {
  --tblr-btn-bg: #403251;
  --tblr-btn-border-color: #403251;
  --tblr-btn-hover-bg: #30243e;
  --tblr-btn-hover-border-color: #30243e;
  --tblr-btn-active-bg: #30243e;
  --tblr-btn-active-border-color: #30243e;
  --tblr-btn-color: #fff;
  --tblr-btn-hover-color: #fff;
  min-height: 44px;
  color: #fff;
  background: var(--cc-purple);
  border: 1px solid var(--cc-purple);
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 10px #40325126;
}

body.welcome-anonymous .btn.btn-primary:hover {
  color: #fff;
  background: var(--cc-purple-hover);
  border-color: var(--cc-purple-hover);
}

body.welcome-anonymous a:focus-visible,
body.welcome-anonymous button:focus-visible {
  outline: 3px solid #8064a2;
  outline-offset: 3px;
}

body.welcome-anonymous .cc-sso {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  max-width: 100%;
  padding: 14px 24px;
  color: var(--cc-purple);
  background: #f5f2f9;
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

body.welcome-anonymous .cc-sso:hover {
  background: #eee8f5;
  border-color: #8064a2;
}

body.welcome-anonymous .cc-sso img,
body.welcome-anonymous .cc-sso svg {
  flex-shrink: 0;
  width: 28px !important;
  height: 28px !important;
}

body.welcome-anonymous .cc-sso i {
  margin: 0;
  font-size: 28px !important;
  line-height: 1;
}

body.welcome-anonymous .page-anonymous a.copyright[href*='glpi-project.org'] {
  display: none;
}

body.welcome-anonymous .cc-footer {
  margin: 20px 0 0;
  color: #d7c6ed;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 767.98px) {
  body.welcome-anonymous .page-anonymous > .flex-fill {
    padding: 24px 14px !important;
  }

  body.welcome-anonymous .main-content-card > .card-body {
    padding: 26px 20px;
  }

  body.welcome-anonymous .page-anonymous .glpi-logo {
    width: min(300px, 100%) !important;
    height: 96px !important;
    margin-bottom: 22px !important;
  }

  body.welcome-anonymous .cc-intro {
    margin-bottom: 22px;
  }
}
