/*
    Indico conference template stylesheet
    --------------------------------------
    - Logo top left, adjustable size via --logo-height
    - Conference title to the right of the logo
    - Full-page background image via --background-image
    - Everything else kept standard

    Upload this in: Event -> Settings -> Style (custom stylesheet)
    Replace the URLs below with images hosted on an accessible HTTPS location.
*/

:root {
  /* ============================================================
     1. LOGO (top left) — adjust size here
     ============================================================ */
  --conf-theme-logo-height: 30px;          /* increase/decrease to scale the logo */
  --conf-theme-logo-width: auto;           /* set a fixed width instead, if preferred */
  --conf-theme-logo-spacing: 10px;         /* space between logo and title */

  /* ============================================================
     2. BACKGROUND IMAGE (whole page)
     ============================================================ */
  --conf-theme-background-image: url('https://indico.psi.ch/event/18548/images/5421-Baden_Altstadt_160515.jpg');
  --conf-theme-background-size: cover;            /* cover | contain | auto */
  --conf-theme-background-position: center center;
  --conf-theme-background-repeat: no-repeat;
  --conf-theme-background-attachment: fixed;      /* fixed = parallax feel, scroll = moves with page */
  --conf-theme-background-overlay-color: rgba(255, 255, 255, 0.85); /* keeps text readable over busy images */

  /* ============================================================
     3. Header
     ============================================================ */
  --conf-theme-header-bg: transparent;     /* transparent so the background image shows through */
  --conf-theme-header-border-bottom: #0f4c80;
  --conf-theme-header-text: black;
  --conf-theme-header-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); /* legibility over image */

  /* Subtitle area */
  --conf-theme-subtitle-bg: #f5faff;
  --conf-theme-subtitle-border: #d5e4f1;
  --conf-theme-subtitle-text: #24425a;

  /* Menu colors */
  --conf-theme-menu-bg: #f6f6f6;
  --conf-theme-menu-border: #ccc;
  --conf-theme-menu-link: #275c86;
  --conf-theme-menu-selected: #bd891a;
  --conf-theme-menu-selected-bg: #dadada;
  --conf-theme-menu-selected-border: #d0d0d0;
  --conf-theme-hover-bg: #e0e0e0;
  --conf-theme-hover-color: var(--conf-theme-menu-link);
  --conf-theme-title-sprite-bg: transparent;
  --conf-theme-announcement-sprite-bg: transparent;
  --conf-theme-announcement-border-top: 1px solid var(--conf-theme-announcement-border);
  --conf-theme-announcement-border-bottom: none;

  /* Support box */
  --conf-theme-support-bg: #f6f6f6;
  --conf-theme-support-border: #ccc;
  --conf-theme-support-header-bg: #1a64a0;
  --conf-theme-support-header-text: #f3f3f3;
  --conf-theme-support-text: #aaa;

  /* Announcement colors */
  --conf-theme-announcement-bg: #f5faff;
  --conf-theme-announcement-border: #c2d6e7;
  --conf-theme-announcement-text: #0f283d;

  /* Sprites */
  --conf-theme-sprite-image: url('/images/conf/sprites_blue.png');
}

/* ==============================================================
   BACKGROUND IMAGE
   ============================================================== */
body {
  background-image: var(--conf-theme-background-image);
  background-size: var(--conf-theme-background-size);
  background-position: var(--conf-theme-background-position);
  background-repeat: var(--conf-theme-background-repeat);
  background-attachment: var(--conf-theme-background-attachment);
  background-color: #1a64a0; /* fallback while the image loads */
}

/* Content stays readable on top of the image.
   Remove this block if you want the image fully visible behind text. */
.page-content,
main {
  background-color: var(--conf-theme-background-overlay-color);
  padding: 24px;              /* pushes text away from the box edge */
  border-radius: 10px;       /* optional: softer corners */
  box-sizing: border-box;
}

/* ==============================================================
   HEADER: LOGO LEFT, TITLE RIGHT OF IT
   NOTE: Indico's exact class names can differ slightly between
   versions. Open your conference page, right-click the header ->
   "Inspect", and confirm which of the selectors below matches.
   ============================================================== */

/* Lay out the header bar as a horizontal flex row, logo first */
.header,
.event-header,
.conf-header {
  display: flex !important;
  flex-direction: row;
  align-items: center;       /* vertically centers logo and title */
  gap: var(--conf-theme-logo-spacing);
}

/* Logo: size controlled by the variables in :root */
.header img,
.header-logo img,
.event-logo img,
.conf-logo img,
img.logo {
  height: var(--conf-theme-logo-height) !important;
  width: var(--conf-theme-logo-width) !important;
  max-width: none !important;   /* prevent Indico shrinking it */
  object-fit: contain;
  margin: 0;
  padding: 0;
  order: 1;                      /* pin logo to the left */
  flex-shrink: 0;                /* logo keeps its size, title wraps instead */
}

/* Conference title: sits right of the logo, vertically centered */
.header h1,
.event-title,
.conf-title,
h1.conference-title {
  order: 2;
  margin: 0;
  padding: 0;
  color: var(--conf-theme-header-text);
  text-shadow: var(--conf-theme-header-text-shadow);
  line-height: 1.2;
  flex-grow: 1;                  /* title area takes remaining space */
  vertical-align: middle;
}

/* Optional: shrink the title text relative to the logo size */
.header h1,
.event-title,
.conf-title {
  font-size: calc(var(--conf-theme-logo-height) / 2.4);
}

/* Header background transparent so the page background shows */
.header,
.event-header,
.conf-header {
  background: var(--conf-theme-header-bg);
}

/* ==============================================================
   RESPONSIVE: smaller screens shrink the logo automatically
   ============================================================== */
@media (max-width: 768px) {
  :root {
    --conf-theme-logo-height: 56px;
  }

  .header h1,
  .event-title,
  .conf-title {
    font-size: 1.4rem;
  }
}

/* ==============================================================
   EVERYTHING ELSE: standard (colors picked up automatically
   from the --conf-theme-* variables above)
   ============================================================== */
/* Adjust here only if you need additional overrides */