/* InsightBD R20 — header contact readability (12 contemporary themes + original).
   Loads after R19 to override theme/browser text colors without changing site data. */
body:not(.insight-exact) {
  --ib-r20-contact-ink: #23372d;
  --ib-r20-contact-hover: #a10e20;
  --ib-r20-contact-tint: rgba(38, 80, 52, 0.075);
  --ib-r20-contact-outline: rgba(38, 80, 52, 0.16);
}
/* The two intentionally dark contemporary themes have dark header backgrounds. */
body.theme-cinema,
body.theme-atelier-noir {
  --ib-r20-contact-ink: #f8f9fb;
  --ib-r20-contact-hover: #ffdbc7;
  --ib-r20-contact-tint: rgba(255, 255, 255, 0.09);
  --ib-r20-contact-outline: rgba(255, 255, 255, 0.24);
}
/* Force visible foreground even when old theme CSS applies -webkit-text-fill-color. */
body:not(.insight-exact) .site-header .header-wrap .header-details,
body:not(.insight-exact) .site-header .header-wrap .header-details .detail-item,
body:not(.insight-exact) .site-header .header-wrap .header-details .detail-item a,
body:not(.insight-exact) .site-header .header-wrap .header-details .insight-header-email-text {
  color: var(--ib-r20-contact-ink) !important;
  -webkit-text-fill-color: var(--ib-r20-contact-ink) !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 650;
}
body:not(.insight-exact) .site-header .header-wrap .header-details .detail-item:hover,
body:not(.insight-exact) .site-header .header-wrap .header-details .insight-header-email:hover .insight-header-email-text,
body:not(.insight-exact) .site-header .header-wrap .header-details .detail-item:focus-visible {
  color: var(--ib-r20-contact-hover) !important;
  -webkit-text-fill-color: var(--ib-r20-contact-hover) !important;
}
body:not(.insight-exact) .site-header .header-wrap .header-details .insight-header-email-icon {
  color: #b5323e !important;
  -webkit-text-fill-color: #b5323e !important;
  opacity: 1 !important;
}
body:not(.insight-exact) .site-header .header-wrap .header-details .detail-item {
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.5;
}
/* On phones show an easy-to-read, centered two-line contact block below logo. */
@media screen and (max-width: 767px) {
  body:not(.insight-exact) .site-header .header-wrap {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 14px;
    padding-bottom: 12px;
  }
  body:not(.insight-exact) .site-header .header-wrap .header-details {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100%;
    max-width: 520px;
    min-width: 0;
    padding: 9px 10px;
    margin: 0;
    border: 1px solid var(--ib-r20-contact-outline);
    border-radius: 8px;
    background: var(--ib-r20-contact-tint);
    text-align: center !important;
    box-sizing: border-box;
    font-size: clamp(13px, 3.2vw, 15px) !important;
    line-height: 1.5 !important;
  }
  body:not(.insight-exact) .site-header .header-wrap .header-details .detail-item,
  body:not(.insight-exact) .site-header .header-wrap .header-details .insight-header-email {
    display: block !important;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--ib-r20-contact-ink) !important;
    -webkit-text-fill-color: var(--ib-r20-contact-ink) !important;
    font-size: inherit !important;
    font-weight: 650 !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }
  body:not(.insight-exact) .site-header .header-wrap .header-details .insight-header-email-text {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}
/* Keep the original 2015 template's header contact text readable too. */
body.insight-exact .insight-legacy-header .list,
body.insight-exact .insight-legacy-header .list .phone,
body.insight-exact .insight-legacy-header .list .email,
body.insight-exact .insight-legacy-header .list .email a,
body.insight-exact .insight-legacy-header .list .address {
  color: #24372e !important;
  -webkit-text-fill-color: #24372e !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
body.insight-exact .insight-legacy-header .list .insight-header-icon {
  color: #b5323e !important;
  -webkit-text-fill-color: #b5323e !important;
}
@media screen and (max-width: 767px) {
  body.insight-exact .insight-legacy-header .list {
    padding: 9px 10px;
    border: 1px solid rgba(38, 80, 52, 0.16);
    border-radius: 8px;
    background: rgba(38, 80, 52, 0.075);
    text-align: center !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
  body.insight-exact .insight-legacy-header .list .phone,
  body.insight-exact .insight-legacy-header .list .email,
  body.insight-exact .insight-legacy-header .list .address {
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: normal !important;
  }
}
