/*
 * Pharmasift Benchmark prototype: member-site layout.
 * Loaded after the app's own css/site_core.css, so the existing header, tiles and
 * typography stay exactly as they are in production.
 */
body {
  font-family: "Lato", Arial, Helvetica, sans-serif;
}
#body_wrapper {
  padding-bottom: 40px;
}
#main_content.bm {
  display: block;
  width: 100%;
}

/* Footer (production gets this from promotion_analyzer/assets/css/pharma-shift.css) */
.bm-footer {
  max-width: 980px;
  margin: 40px auto 0;
  padding: 16px 16px 90px;
}
.bm-footer .copy-right {
  width: 100%;
  text-align: center;
  font-size: 11px;
  line-height: 16px;
  color: gray;
}
.bm-footer .copy-right a {
  color: gray;
}
.bm-footer .copy-right a:hover {
  color: red;
}

/* ---------------------------------------------------------------- Home tile */
.flip-box.bm-tile {
  width: 96%;
  display: block;
  margin: 1% auto 1% 1%;
  position: relative;
}
.bm-tile .flip-box-inner {
  height: 170px;
}
.bm-tile .flipon {
  height: 280px;
  margin-top: 2%;
  margin-bottom: 4%;
}
.bm-tile .flip-box-front {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); /* logo left, buttons right */
  gap: 4%;
  align-items: center;
  padding: 3% 4%;
  height: 170px;
  box-shadow: inset 0 0 0 2px var(--ps-bm);
}
.bm-tile .flip-box-front .logo {
  width: 100%;
  max-width: 360px;
}
.bm-tile .button_block {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bm-tile .button_block #user_button {
  width: 100%;
  font-size: 20px;
}
.bm-tile .flip-box-back {
  background-color: var(--ps-bm);
  min-height: 280px;
  padding: 3% 5%;
}
.bm-tile .flip-box-back .logo {
  width: 38%;
  min-width: 220px;
}
.bm-tile .flip-box-back p {
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  max-width: 760px;
}
.bm-tile .flip-box-back .button_block {
  flex-direction: row;
}
.bm-tile .flip-box-back .button_block #user_button {
  width: auto;
  min-width: 240px;
}
.bm-tile .flip-box-back .close {
  cursor: pointer;
  font-size: 28px;
}
.bm-new {
  position: absolute;
  top: -10px;
  left: -6px;
  z-index: 5;
  background: var(--ps-bm);
  color: #2b1d00;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
}
.bm-lock {
  font-size: 13px;
  color: var(--ps-muted);
  margin-top: 2px;
  text-align: center;
}
@media (max-width: 760px) {
  .bm-tile .flip-box-inner,
  .bm-tile .flip-box-front {
    height: auto;
  }
  .bm-tile .flip-box-front {
    position: relative;
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px 20px;
  }
  .bm-tile .flip-box-front .logo {
    margin: 0 auto;
  }
  .bm-tile .flipon {
    height: auto;
  }
  .bm-tile .flip-box-back {
    position: absolute;
    top: 0;
  }
}
/* Flip-box mobile width override from site_core (max 540px) */
@media (max-width: 540px) {
  .flip-box.bm-tile {
    width: 100%;
    margin-left: 0;
  }
}

/* ---------------------------------------------------------------- Page heading */
.bm-back {
  display: inline-block;
  color: var(--ps-navy);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
}
.bm-back:hover {
  color: var(--ps-orange);
}

/* ---------------------------------------------------------------- Tabs */
.bm-tabbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--ps-line);
  margin: 12px 0 18px;
}
.bm-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.bm-tabs a {
  display: inline-block;
  padding: 12px 16px;
  color: var(--ps-navy);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 4px solid transparent;
  margin-bottom: -2px;
}
.bm-tabs a:hover {
  color: var(--ps-orange);
}
.bm-tabs a[aria-current="page"] {
  border-bottom-color: var(--ps-orange);
}
.bm-tabbar .bm-btn {
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------- Toolbar */
.bm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.bm-toolbar .bm-input {
  flex: 1 1 240px;
  width: auto;
}
.bm-toolbar .bm-select {
  flex: 0 1 200px;
  width: auto;
}

/* ---------------------------------------------------------------- List rows */
.bm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bm-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  justify-content: space-between;
  background: var(--ps-tile);
  padding: 16px 20px;
  margin-bottom: 10px;
  border-left: 5px solid var(--ps-bm);
}
.bm-item--muted {
  border-left-color: #b9b9c9;
}
.bm-item__main {
  flex: 1 1 320px;
  min-width: 0;
}
.bm-item__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ps-navy);
  margin: 0 0 4px;
  line-height: 1.3;
}
.bm-item__title a {
  color: inherit;
  text-decoration: none;
}
.bm-item__title a:hover {
  color: var(--ps-orange);
}
.bm-item__meta {
  font-size: 13px;
  color: var(--ps-muted);
}
.bm-item__note {
  margin-top: 8px;
  font-size: 13px;
  background: #fff;
  padding: 8px 10px;
  border-left: 3px solid var(--ps-red);
}
.bm-item__note--info {
  border-left-color: var(--ps-navy);
}
.bm-item__side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.bm-item__hint {
  font-size: 13px;
  color: var(--ps-muted);
  font-weight: 700;
}
.bm-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--ps-navy);
  background: #fff;
  padding: 4px 10px;
}

/* ---------------------------------------------------------------- Survey answering */
.bm-survey-head {
  margin-bottom: 18px;
}
.bm-survey-head h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ps-navy);
  margin: 0 0 6px;
}
.bm-kicker {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-bm-ink);
}
.bm-qcard {
  background: var(--ps-tile);
  padding: 20px 22px;
  margin-bottom: 12px;
  border-left: 5px solid transparent;
}
.bm-qcard.is-invalid {
  border-left-color: var(--ps-red);
}
.bm-qcard fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.bm-qcard legend {
  padding: 0;
  width: 100%;
}
.bm-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bm-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #b9b9c9;
  padding: 10px 14px;
  cursor: pointer;
  min-width: 150px;
  font-size: 15px;
}
.bm-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ps-navy);
  flex: 0 0 auto;
}
.bm-choice:hover {
  border-color: var(--ps-navy);
}
.bm-choice:has(input:checked) {
  border-color: var(--ps-navy);
  box-shadow: inset 0 0 0 1px var(--ps-navy);
  background: #f4f4fa;
  font-weight: 700;
}
.bm-choice:has(input:focus-visible) {
  outline: 3px solid var(--ps-orange);
  outline-offset: 2px;
}
.bm-choice:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.bm-scale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bm-scale__end {
  font-size: 13px;
  color: var(--ps-muted);
  font-weight: 700;
}
.bm-scale__points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bm-scale__pt {
  position: relative;
}
.bm-scale__pt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
}
.bm-scale__pt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid #b9b9c9;
  font-weight: 700;
  color: var(--ps-navy);
  font-size: 16px;
}
.bm-scale__pt input:checked + span {
  background: var(--ps-navy);
  color: #fff;
  border-color: var(--ps-navy);
}
.bm-scale__pt input:focus-visible + span {
  outline: 3px solid var(--ps-orange);
  outline-offset: 2px;
}
.bm-scale__pt:hover span {
  border-color: var(--ps-navy);
}
.bm-number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.bm-number .bm-input {
  width: 160px;
  font-size: 16px;
}
.bm-number__unit {
  font-weight: 700;
  color: var(--ps-navy);
}
.bm-number__hint {
  font-size: 13px;
  color: var(--ps-muted);
}
.bm-submitbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-top: 2px solid var(--ps-line);
  padding: 16px 0 0;
  margin-top: 8px;
}
.bm-anon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ps-muted);
  font-size: 14px;
}
.bm-anon svg {
  flex: 0 0 auto;
}
.bm-submitbar .bm-btn {
  min-width: 180px;
}
.bm-preview-banner {
  background: var(--ps-bm-soft);
  border-left: 5px solid var(--ps-bm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 700;
  color: var(--ps-bm-ink);
}

/* Notices: confirmation, already answered, closed */
.bm-notice {
  background: var(--ps-tile);
  padding: 34px 28px;
  text-align: center;
  border-top: 5px solid var(--ps-bm);
}
.bm-notice h1,
.bm-notice h2 {
  font-size: 26px;
  color: var(--ps-navy);
  margin: 10px 0 8px;
  font-weight: 700;
}
.bm-notice p {
  max-width: 560px;
  margin: 0 auto 18px;
  color: var(--ps-muted);
  font-size: 15px;
}
.bm-notice--ok {
  border-top-color: var(--ps-green);
}
.bm-notice__icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--ps-green-soft);
  color: var(--ps-green);
  font-size: 28px;
  font-weight: 900;
}
.bm-notice__icon--info {
  background: var(--ps-bm-soft);
  color: var(--ps-bm-ink);
}

/* Results header */
.bm-results-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}
.bm-results-head h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ps-navy);
  margin: 4px 0 0;
}
.bm-badge {
  display: inline-block;
  background: var(--ps-navy);
  color: #fff;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
}
.bm-results-foot {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ps-muted);
  text-align: center;
}

/* Contact page */
.bm-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
}
.bm-contact__intro {
  background: var(--ps-tile);
  padding: 24px;
  border-top: 5px solid var(--ps-bm);
}
.bm-contact__intro h1 {
  font-size: 26px;
  color: var(--ps-navy);
  font-weight: 700;
  margin-bottom: 10px;
}
@media (max-width: 760px) {
  .bm-contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #header_content,
  #body_content {
    width: auto;
    padding: 0 16px;
  }
  .bm-survey-head h1,
  .bm-results-head h1 {
    font-size: 23px;
  }
  .bm-item {
    padding: 14px 16px;
  }
  .bm-choice {
    min-width: 0;
    flex: 1 1 100%;
  }
  .bm-submitbar .bm-btn {
    width: 100%;
  }
  .bm-tabs a {
    padding: 10px 10px;
    font-size: 14px;
  }
}

/* Benchmark tile back: darker amber so white text meets contrast, and a plain close button */
.bm-tile .flip-box-back { background-color: #9a6700; }
.bm-tile .flip-box-back .bm-tile-close {
  position: absolute; top: 14px; right: 18px; z-index: 5; background: none; border: 0; color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.bm-tile .flip-box-back .bm-tile-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bm-tile:has(.flipon) .bm-new { display: none; }
