/*
 * WWCS 2027 — SITE-WIDE Indico customization
 * Deploy as:  <CUSTOMIZATION_DIR>/css/00-wwcs-global.css
 *
 * Loads on ALL Indico pages — including /login/ and /register/, which the
 * per-event stylesheet (wwcs-style.css) never reaches, and also alongside
 * wwcs-style.css on event pages (duplicated values are identical, so the
 * overlap is harmless).
 *
 * Brand palette: see wwcs-style.css / WhatWorks Design Guide v02.
 *
 * Logo files: deploy wwcs-summit-logo-fullcolor.svg and
 * wwcs-summit-logo-white.svg (in this project folder) to
 * <CUSTOMIZATION_DIR>/files/ — they are then served at the stable URLs
 * referenced in the variables below.
 */

/* ---------------------------------------------------------------------------
 * 0. Work Sans — self-hosted variable font (no Google servers involved).
 * One file covers all weights 100-900. Files live in
 * <CUSTOMIZATION_DIR>/files/fonts/. License: SIL Open Font License.
 * ------------------------------------------------------------------------ */

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/custom/files/fonts/work-sans-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/custom/files/fonts/work-sans-variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
 * 1. Brand variables (mirror of wwcs-style.css)
 * ------------------------------------------------------------------------ */

:root {
  --wwcs-blue: #312783;
  --wwcs-blue-80: #5a529c;
  --wwcs-blue-60: #837db5;
  --wwcs-blue-40: #ada9cd;
  --wwcs-blue-10: #eae9f3;
  --wwcs-blue-05: #f5f4f9;
  --wwcs-green: #009b62;
  --wwcs-green-dark: #007c4e;
  --wwcs-yellow: #fbbc42;
  --wwcs-coral: #ed6c84;
  --wwcs-font: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --wwcs-gradient: linear-gradient(105deg, var(--wwcs-blue) 0%, var(--wwcs-blue) 40%, var(--wwcs-green) 100%);
  /* Logo variants (aspect ratio ~2.84:1), served from CUSTOMIZATION_DIR/files */
  --wwcs-logo-white: url('/static/custom/files/wwcs-summit-logo-white.svg');
  --wwcs-logo-color: url('/static/custom/files/wwcs-summit-logo-fullcolor.svg');
}

/* ---------------------------------------------------------------------------
 * 2. Base typography, links, buttons (site-wide)
 * ------------------------------------------------------------------------ */

body {
  font-family: var(--wwcs-font);
  font-size: 15px;
  color: var(--wwcs-blue);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--wwcs-font);
}

a,
.fake-link {
  color: var(--wwcs-blue);
}

a:hover,
.fake-link:hover {
  color: var(--wwcs-green);
}

.i-button,
.action-button,
.ui.button {
  border-radius: 999px !important;
  /* Indico's default bold is hard to read in Work Sans — medium instead */
  font-weight: 500;
}

.i-button.highlight:not(.label):not(.borderless):not(.text-color) {
  background: var(--wwcs-green);
  border-color: var(--wwcs-green);
  color: #fff;
}

.i-button.highlight:not(.label):not(.borderless):not(.text-color):hover,
.i-button.highlight:not(.label):not(.borderless):not(.text-color):active,
.i-button.highlight:not(.label):not(.borderless):not(.text-color):focus {
  background: var(--wwcs-blue);
  background-image: none;
  border-color: var(--wwcs-blue);
  color: #fff;
}

/* Footer: hide the Indico logo, keep the "Powered by Indico" line */
footer .footer-logo {
  display: none;
}

/* ---------------------------------------------------------------------------
 * 3. Forms (mirror of the event stylesheet's form styling)
 * ------------------------------------------------------------------------ */

.i-form {
  font-family: var(--wwcs-font);
  color: var(--wwcs-blue);
}

.i-form.horizontal .form-label,
.i-form .form-group.horizontal .form-label {
  float: none;
  width: 100%;
  text-align: left;
  line-height: 1.4;
  margin-bottom: 0.3em;
  font-weight: 600;
  font-size: 1.05em;
  color: var(--wwcs-blue);
}

.i-form.horizontal .form-field,
.i-form .form-group.horizontal .form-field {
  float: none;
  width: 100%;
  margin-left: 0;
  padding-left: 0;
}

.i-form .form-field label {
  font-weight: 400;
  color: #3f3f4a;
  line-height: 1.5;
}

.i-form input[type='checkbox'],
.i-form input[type='radio'] {
  accent-color: var(--wwcs-green);
  margin-right: 0.45em;
}

.i-form .i-checkbox,
.i-form .i-radio {
  margin-bottom: 0.35em;
}

.i-form .form-group {
  margin-bottom: 1.4em;
}

/* Required-field asterisk inline after the label text (Indico pins it
   absolutely to the label's right edge, wrong for full-width labels) */
.i-form .form-group .form-label > .required {
  position: static;
  margin-left: 0.3em;
  font-size: 1.1em;
  color: var(--wwcs-coral);
}

/* ---------------------------------------------------------------------------
 * 4. Login page (/login/)
 * Gradient backdrop, white card, event logo above the card.
 * ------------------------------------------------------------------------ */

.layout-wrapper.login-page {
  background: var(--wwcs-gradient);
}

.login-page .login-container {
  background: #fff;
  border-radius: 14px;
  padding: 2em;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* Replace the Indico logo inside the card with the full-color WWCS logo */
.login-page .login-container > .header-logo {
  display: none;
}

.login-page .login-container::before {
  content: '';
  display: block;
  height: 80px;
  margin: 0.5em auto 1.5em;
  background: var(--wwcs-logo-color) center / contain no-repeat;
}

/* Input fields */
#login-form input[type='text'],
#login-form input[type='password'] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65em 0.9em;
  margin-bottom: 0.8em;
  border: 1px solid var(--wwcs-blue-40);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1em;
  color: var(--wwcs-blue);
}

#login-form input[type='text']:focus,
#login-form input[type='password']:focus {
  outline: 2px solid var(--wwcs-green);
  outline-offset: 0;
  border-color: var(--wwcs-green);
}

/* Primary login button: full-width green CTA pill */
.login-page .i-button.login-form-button {
  width: 100%;
  background: var(--wwcs-green);
  border-color: var(--wwcs-green);
  color: #fff;
  font-size: 17px;
  padding: 0.6em 30px;
}

.login-page .i-button.login-form-button:hover {
  background: var(--wwcs-blue);
  background-image: none;
  border-color: var(--wwcs-blue);
  color: #fff;
}

/* NOTE: the "Indico" wording on the login and account-creation screens is
   replaced in JavaScript (js/20-text-replacements.js), not here. CSS cannot
   touch <input type="submit"> labels, and the font-size:0 technique needed to
   swap text also collapses everything derived from font-size. */

.login-page .forgot-my-password {
  text-align: center;
}

.login-page .forgot-my-password a {
  color: var(--wwcs-blue);
}

/* "Back" link centered under the card */
.login-page .link {
  text-align: center;
}

/* Texts outside the white card sit on the gradient: white, underlined links */
.login-page .register,
.login-page .register a,
.login-page .link a {
  color: #fff;
}

.login-page .register a {
  text-decoration: underline;
}

.login-page .register a:hover {
  text-decoration: none;
  color: #fff;
}

/* Footer on the gradient (the extra `span` selector catches the
   "Powered by" text, which has its own color rule in Indico's CSS) */
.login-page footer,
.login-page footer span,
.login-page footer a,
.login-page footer .version {
  color: rgba(255, 255, 255, 0.85);
}

.login-page footer a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------------------
 * 5. Global page header (used by /register/ and other standalone pages)
 * Solid Primary Blue with the green base line, WWCS logo instead of Indico's.
 * ------------------------------------------------------------------------ */

/* Indico styles this as `div.page-header` (#007cac), which outranks a plain
   class selector — hence the !important */
div.page-header {
  background: var(--wwcs-blue) !important;
  border-bottom: 3px solid var(--wwcs-green);
}

/* Hide the whole global navigation bar (Hauptseite / create event / room
   booking) — a single-conference installation needs none of it. Cosmetic
   only: actual permissions are enforced server-side (event creation is
   restricted via the Home category). */
.global-menu {
  display: none;
}

#header-logo {
  display: block;
  width: 220px;
  height: 56px;
  background: var(--wwcs-logo-white) left center / contain no-repeat;
}

#header-logo img.header-logo {
  display: none;
}

/* Language selector: the instance is pinned to English via ALLOWED_LANGUAGES
   (see indico.conf), so the switcher only offers one option. Its dropdown is
   hidden too. The surrounding .group also holds the timezone and login
   controls, so nothing collapses. */
#language-selector-link,
#language-list {
  display: none;
}

/* Page titles in brand blue */
.fixed-width-standalone-page header h2,
.page-title {
  color: var(--wwcs-blue);
}
