/*
    University of Guelph (UoG) Indico Theme Stylesheet
*/

:root {
  /* Header */
  --conf-theme-header-bg: #1E1E1E;                  /* UoG Dark Neutral Header */
  --conf-theme-header-border-bottom: #FFC72C;       /* UoG Gold Accent Stripe */
  --conf-theme-header-text: #FFFFFF;

  /* Subtitle area */
  --conf-theme-subtitle-bg: #F4F4F4;                /* Light Neutral Gray */
  --conf-theme-subtitle-border: #E0E0E0;
  --conf-theme-subtitle-text: #1E1E1E;

  /* Menu colors */
  --conf-theme-menu-bg: #FFFFFF;
  --conf-theme-menu-border: #E0E0E0;
  --conf-theme-menu-link: #1E1E1E;
  --conf-theme-menu-selected: #000000;
  --conf-theme-menu-selected-bg: #FFC72C;            /* UoG Gold Highlight */
  --conf-theme-menu-selected-border: #E5AF19;
  --conf-theme-hover-bg: #F0F0F0;
  --conf-theme-hover-color: #000000;
  --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: #F8F9FA;
  --conf-theme-support-border: #E0E0E0;
  --conf-theme-support-header-bg: #C8102E;           /* UoG Red Header */
  --conf-theme-support-header-text: #FFFFFF;
  --conf-theme-support-text: #555555;

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

  /* Announcement colors */
  --conf-theme-announcement-bg: #FFFDF0;             /* Soft Gold Light Tint */
  --conf-theme-announcement-border: #FFC72C;         /* UoG Gold Border */
  --conf-theme-announcement-text: #1E1E1E;
}

/* =========================================================
   Additional UoG Layout & Modernization Fixes for Indico
   ========================================================= */

/* Site header: ABSc logo, no Indico blue banner */
.page-header {
  background-color: #000000 !important;
  background-image: none !important;
  min-height: 0 !important;
}

.page-header > .flexrow {
  align-items: center !important;
  min-height: 0 !important;
  padding: 0.5rem 1rem 0.5rem 0 !important;
}

#header-logo {
  display: block !important;
  align-self: center !important;
  line-height: 0 !important;
}

.page-header img.header-logo {
  display: block !important;
  height: 72px !important;
  width: auto !important;
  max-width: 220px !important;
  margin: 0 0 0 1.25rem !important;
  border: none !important;
}

/* Login page logo (leave "Powered by Indico" footer unchanged) */
.login-page .header-logo,
.login-container .header-logo {
  display: block !important;
  height: auto !important;
  width: 100% !important;
  max-width: 320px !important;
  margin: 0 auto 1.5rem !important;
}

/* Body & Background Clean-Up */
body {
  background-color: #F8F9FA !important;
  color: #1E1E1E !important;
}

/* Events home only — same photo as the room booking landing page.
   The logo link is marked current only on the root category. */
body:has(#header-logo[aria-current="True"]) {
  background-color: #111111 !important;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)),
    url("/static/custom/files/home-background-bg.jpg") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body:has(#header-logo[aria-current="True"]) .category-container,
body:has(#header-logo[aria-current="True"]) .category-content-wrapper {
  background: transparent !important;
}

body:has(#header-logo[aria-current="True"]) .category-header,
body:has(#header-logo[aria-current="True"]) .footer {
  background: #F8F9FA !important;
}

body:has(#header-logo[aria-current="True"]) .category-content {
  background: #FFFFFF !important;
  padding: 1.5em !important;
  border-top: 3px solid #FFC72C !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

/* Keep text / links black-white (no forced brand red) */
a {
  color: #1E1E1E !important;
}

a:hover,
a:focus {
  color: #000000 !important;
}

/* Dark tooltips (Indico .qtip-default is gray). Site-wide link color is black. */
.qtip-dark,
.qtip-dark .qtip-content,
.qtip-dark .qtip-content *,
.qtip-dark a,
.qtip-dark a:hover,
.qtip-dark a:focus,
.qtip-default,
.qtip-default .qtip-content,
.qtip-default .qtip-content *,
.qtip-default a,
.qtip-default a:hover,
.qtip-default a:focus,
.qtip-default h1,
.qtip-default h2,
.qtip-default h3,
.qtip-default h4,
.qtip-default h5 {
  color: #FFFFFF !important;
}

.qtip-default.qtip-popup,
.qtip-default.qtip-popup a,
.qtip-default.informational,
.qtip-default.informational a,
.qtip-default.add-field-qtip,
.qtip-default.add-field-qtip a,
.qtip-default.qtip-timezone {
  color: #555555 !important;
}

h1, h2, h3, h4, h5, h6,
.category-header,
.category-title,
.event-list .event-date,
.main h1,
.main h2 {
  color: #1E1E1E !important;
}

/* Keep light text inside dark event / conference headers */
.event-header h1,
.event-header h2,
.event-header h3,
.confheader h1,
.conference-title-link {
  color: #FFFFFF !important;
}

.event-header > .event-title a,
.event-header .details a,
.confheader .conference-title-link,
.confheader a.conference-title-link {
  color: #FFFFFF !important;
}

/* Dropdowns / menus inside the event header must stay dark-on-light */
.event-header .i-dropdown a,
.event-header .event-manage-button .i-dropdown a,
.event-header .event-actions .i-dropdown a,
.event-header ind-menu > menu a,
.event-header .menu a {
  color: #1E1E1E !important;
}

.event-header .i-dropdown a:hover,
.event-header .event-manage-button .i-dropdown a:hover,
.event-header .event-actions .i-dropdown a:hover,
.event-header ind-menu > menu a:hover {
  color: #000000 !important;
}

/* Event top toolbar (home, nav, pencil/edit, theme, etc.) */
.event-page-header,
.page-header-dark.event-page-header {
  background-color: #1E1E1E !important;
  background-image: none !important;
}

.event-page-header .button-bar .i-button,
.event-page-header .button-bar a,
.event-page-header .button-bar button,
.event-page-header .button-bar [class*="icon-"]::before {
  color: #FFFFFF !important;
  background: transparent !important;
  border-color: transparent !important;
  opacity: 1 !important;
}

.event-page-header .button-bar .i-button:hover,
.event-page-header .button-bar a:hover,
.event-page-header .button-bar button:hover,
.event-page-header .button-bar .i-button:hover::before,
.event-page-header .button-bar a:hover::before {
  color: #FFC72C !important;
  opacity: 1 !important;
}

.event-page-header .button-bar .separator {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background-color: rgba(255, 255, 255, 0.35) !important;
}

#global-menu a,
.global-menu a {
  color: #FFFFFF !important;
}

#global-menu a:hover,
.global-menu a:hover {
  color: #FFFFFF !important;
  opacity: 0.85;
}

#session-bar a,
#session-bar .i-button,
#session-bar button {
  color: #1E1E1E !important;
}

#session-bar a:hover,
#session-bar .i-button:hover,
#session-bar button:hover {
  color: #000000 !important;
  opacity: 1;
}

/* Neutralize protection-mode colors in the header session bar */
div.session-bar .i-button.protection-public,
div.session-bar .i-button.protection-public:hover,
div.session-bar .i-button.protection-public:active,
div.session-bar .i-button.protection-public.open,
div.session-bar .i-button.protection-self,
div.session-bar .i-button.protection-self:hover,
div.session-bar .i-button.protection-self:active,
div.session-bar .i-button.protection-self.open {
  background: #e0e0e0 !important;
  background-image: none !important;
  border-color: #ccc !important;
  color: #1E1E1E !important;
}

div.session-bar .i-button.protection-public::before,
div.session-bar .i-button.protection-self::before,
.icon-protection-public::before,
.icon-protection-self::before {
  color: #1E1E1E !important;
}

/* Primary Buttons & Call-To-Action Elements */
.i-button.highlight, 
.i-button.action, 
.ui.button.primary, 
.cta-button {
  background-color: #C8102E !important;
  color: #FFFFFF !important;
  border-color: #C8102E !important;
  font-weight: 600 !important;
}

.i-button.highlight:hover, 
.i-button.action:hover, 
.ui.button.primary:hover {
  background-color: #A00D24 !important;
  border-color: #A00D24 !important;
  color: #FFFFFF !important;
}

/* Secondary Buttons & Gold Accents */
.ui.button.secondary {
  background-color: #FFC72C !important;
  color: #000000 !important;
  border-color: #FFC72C !important;
  font-weight: 600 !important;
}

.ui.button.secondary:hover {
  background-color: #E5AF19 !important;
  border-color: #E5AF19 !important;
  color: #000000 !important;
}

/* =========================================================
   Meetings & Lectures (default Indico theme overrides)
   These pages do not use --conf-theme-* vars; style selectors
   from themes/indico.scss instead.
   ========================================================= */

/* Page chrome around the meeting/lecture card */
body:has(.event-header),
body:has(.meeting-timetable) {
  background: #F8F9FA !important;
}

div.event-header,
.event-header-lecture {
  background: #1E1E1E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-bottom: 3px solid #FFC72C !important;
}

div.event-header .event-title h1,
.event-header-lecture > h1,
.event-header-lecture > h2 {
  color: #FFFFFF !important;
}

.event-header .header-data,
.event-header .header-data::before {
  color: #FFFFFF !important;
}

.event-time-data time,
.event-location .text,
.chairperson-list .author,
.event-time-data time.date {
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  color: #FFFFFF !important;
}

.event-header-lecture .lecture-category {
  color: #FFC72C !important;
}

a.lecture-series-link {
  background: #333333 !important;
  color: #FFFFFF !important;
}

a.lecture-series-link:hover {
  background: #000000 !important;
  color: #FFFFFF !important;
}

/* Timetable accents */
.timetable-contrib .timetable-title,
.timetable-item-header .timetable-title.nested,
.timetable-time,
.timetable-time .end-time {
  color: #1E1E1E !important;
}

.timetable-time.top-level .start-time,
.timetable-time.nested .start-time {
  background-color: #1E1E1E !important;
  color: #FFFFFF !important;
}

.timetable-time.top-level .start-time::before {
  border-color: #000000 #000000 transparent transparent !important;
}

.item-location,
.item-location::before {
  color: #C8102E !important;
}

.timetable-time.break,
.timetable-time.break .end-time,
.timetable-item.timetable-break .timetable-title,
.timetable-item.timetable-break .timetable-duration,
.timetable-item.timetable-break .timetable-duration::before {
  color: #C8102E !important;
}

.timetable-time.break.top-level .start-time,
.timetable-time.break.nested .start-time {
  background-color: #C8102E !important;
  color: #FFFFFF !important;
}

.timetable-time.break {
  border-color: #C8102E !important;
}

.day-header .day-title {
  color: #1E1E1E !important;
}

.meeting-timetable {
  border-top: 3px solid #FFC72C !important;
}
