/* Corporate Building Services shared application branding */

header,
.banner {
  background: #003366 !important;
  position: relative !important;
}

/* Left-side CBS branding */
.cbs-brand-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0;
  flex: 0 1 auto;
  z-index: 2;
}

.cbs-brand-logo {
  height: 56px !important;
  width: auto !important;
  max-width: 230px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  flex: 0 0 auto !important;
}

.cbs-brand-logo-box {
  width: auto !important;
  height: 56px !important;
  min-width: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
}

.cbs-brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff !important;
  line-height: 1.08;
  white-space: nowrap;
}

.cbs-brand-title {
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 800;
}

.cbs-brand-company {
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

/* Centered page title */
.cbs-page-title {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;

  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  white-space: nowrap !important;

  margin: 0 !important;
  padding: 0 !important;
  z-index: 1;
  pointer-events: none;
}

/* Right-side buttons / user information stay above centered title */
header > :last-child,
.banner > :last-child,
.banner-right,
.bannerRight,
.who {
  position: relative;
  z-index: 2;
}

/* Mobile */
@media (max-width: 760px) {
  .cbs-brand-logo {
    height: 48px !important;
    max-width: 185px !important;
  }

  .cbs-brand-logo-box {
    height: 48px !important;
  }

  .cbs-brand-group {
    gap: 8px !important;
  }

  .cbs-brand-title {
    font-size: 14px;
  }

  .cbs-brand-company {
    font-size: 10px;
  }

  .cbs-page-title {
    font-size: 16px !important;
  }
}

@media (max-width: 560px) {
  /*
   * On narrow phones, give the page title its own centered line
   * inside the same dark-blue banner so it cannot crowd the logo.
   */
  header,
  .banner {
    padding-bottom: 38px !important;
  }

  .cbs-page-title {
    top: auto !important;
    bottom: 10px !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px);
    font-size: 15px !important;
  }

  .cbs-brand-logo {
    height: 43px !important;
    max-width: 155px !important;
  }

  .cbs-brand-logo-box {
    height: 43px !important;
  }

  .cbs-brand-title {
    font-size: 13px;
  }

  .cbs-brand-company {
    font-size: 9px;
  }
}
