/* Preview pages only. Linked with body.site-shell.
   Advertising routes never receive that class and do not load this file.
   Tokens are the homepage values: page cream, hero CTA band, primary button. */

body.site-shell {
  --bn-cream: #fdf8ee;
  --bn-cta: #f6f0e6;
  --bn-ink: #10283c;
  --bn-navy: #071e36;
  --bn-muted: #5e7380;
  --bn-teal: #0e7490;
  --bn-accent: #006d7c;
  --bn-line: #e4ebe6;
  --bn-sage: #edf1e5;
  --bn-white: #fff;
  --bn-radius-pill: 999px;
  --bn-radius-card: 24px;
  --bn-shadow: 0 10px 28px rgba(15, 41, 61, 0.1);
  --bn-font: "Poppins", sans-serif;
  background-color: var(--bn-cream);
  color: var(--bn-navy);
  font-family: var(--bn-font);
}

html[dir="rtl"] body.site-shell {
  --bn-font: "El Messiri", sans-serif;
}

body.site-shell button,
body.site-shell input,
body.site-shell select,
body.site-shell textarea,
body.site-shell label,
body.site-shell .form-control,
body.site-shell .btn,
body.site-shell h1,
body.site-shell h2,
body.site-shell h3,
body.site-shell h4,
body.site-shell h5,
body.site-shell h6,
body.site-shell p,
body.site-shell a,
body.site-shell li,
body.site-shell span,
body.site-shell .playfair {
  font-family: var(--bn-font);
}

body.site-shell .glowing {
  display: none;
}

body.site-shell nav.navbar,
body.site-shell nav.navbar.bg-light {
  background-color: var(--bn-cream) !important; /* beats Bootstrap .bg-light */
  border-bottom: 1px solid var(--bn-line);
  padding: 8px 24px;
}

body.site-shell .nav-container {
  width: 100%;
  align-items: center;
}

body.site-shell .navbar-brand {
  margin: 0;
  padding: 0;
}

body.site-shell .navbar-brand img {
  width: 76px !important;
  height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
}

body.site-shell .navbar-toggler {
  border: 0;
  min-width: 44px;
  min-height: 44px;
}

body.site-shell .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='%23071e36' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.site-shell .navbar .nav-link,
body.site-shell .navbar h3,
body.site-shell .switch > a.language-switch.en,
body.site-shell a.login-btn-match-switcher {
  font-family: var(--bn-font);
}

body.site-shell .switch > a.language-switch.ar {
  font-family: "El Messiri", sans-serif;
}

html[dir="rtl"] body.site-shell .navbar .nav-link,
html[dir="rtl"] body.site-shell .navbar h3,
html[dir="rtl"] body.site-shell a.login-btn-match-switcher {
  font-family: var(--bn-font);
}

body.site-shell .navbar .nav-link {
  color: var(--bn-navy);
  font-size: 16px;
  font-weight: 500;
  text-transform: none;
  line-height: 1.3;
}

body.site-shell .navbar .nav-item.active .nav-link {
  color: var(--bn-accent);
}

body.site-shell .switch > a {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  text-shadow: none;
  color: var(--bn-muted);
}

body.site-shell .switch > a.on {
  color: var(--bn-navy);
}

body.site-shell .switch > a.off {
  color: var(--bn-muted);
}

body.site-shell input.check-toggle-round-flat:checked ~ a.on {
  color: var(--bn-muted);
}

body.site-shell input.check-toggle-round-flat:checked ~ a.off {
  color: var(--bn-navy);
}

body.site-shell input.check-toggle-round-flat + label,
body.site-shell input.check-toggle-round-flat + label:before {
  background-color: var(--bn-sage);
}

body.site-shell input.check-toggle-round-flat + label:after {
  background-color: var(--bn-white);
  box-shadow: 0 1px 3px rgba(7, 30, 54, 0.18);
}

body.site-shell a.login-btn-match-switcher {
  background-color: var(--bn-teal);
  border-color: var(--bn-teal);
  border-radius: var(--bn-radius-pill);
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  color: var(--bn-white);
}

@media (min-width: 992px) {
  body.site-shell .navbar-nav {
    align-items: center;
    column-gap: 24px;
    row-gap: 8px;
  }

  body.site-shell .navbar .nav-link {
    padding: 8px 0;
  }
}

@media (max-width: 991.98px) {
  body.site-shell .navbar-collapse {
    background: var(--bn-cream);
    padding: 8px 0 16px;
  }

  body.site-shell .navbar .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
  }

  body.site-shell .bnan-login {
    justify-content: center;
    padding: 12px 24px 0;
  }
}

body.site-shell footer.footer {
  background: #0e7490; /* .bnan-hero .bnan-btn computed background */
  color: #fff;
}

body.site-shell footer.footer .col-12,
body.site-shell footer.footer .col-md-3 {
  flex-basis: auto !important; /* style.css forces flex-basis on every column */
  max-width: 100% !important;
}

@media (min-width: 768px) {
  body.site-shell footer.footer .col-md-3 {
    flex: 1 1 0 !important;
    max-width: 25% !important;
  }
}

@media (min-width: 992px) {
  body.site-shell footer.footer .footer-contact {
    flex: 1.4 0 auto !important;
    max-width: none !important;
  }
}

body.site-shell footer.footer .footer-contact__list,
body.site-shell footer.footer .footer-contact__link {
  max-width: 100%;
}

body.site-shell footer.footer .footer-contact__link span {
  white-space: nowrap;
}

/* The mark is a white field with teal calligraphy and a teal frame.
   Flattening it to white hid those details on the teal footer.
   76px matches the header mark and the image sizes hint, so the
   drawing stays readable. width="20%" had shrunk it to 30px on tablet. */
body.site-shell footer.footer img[alt="logo"] {
  filter: none;
  width: 76px;
  height: 76px;
  max-width: 100%;
}

body.site-shell footer.footer h2,
body.site-shell footer.footer h3,
body.site-shell footer.footer p,
body.site-shell footer.footer a,
body.site-shell footer.footer li,
body.site-shell footer.footer span {
  font-family: var(--bn-font);
  color: #fff;
}

body.site-shell footer.footer i {
  color: #fff;
}

body.site-shell footer.footer h2,
body.site-shell footer.footer h3 {
  font-weight: 600;
}

body.site-shell footer.footer h3 {
  font-size: 16px;
}

html[dir="rtl"] body.site-shell footer.footer h3 {
  text-transform: none !important; /* beats Bootstrap .text-uppercase */
}

body.site-shell footer.footer p,
body.site-shell footer.footer .footer-legal__inner,
body.site-shell footer.footer .footer-legal__name {
  color: #fff;
}

body.site-shell footer.footer a {
  background: transparent;
  color: #fff !important; /* beats Bootstrap .text-reset */
}

body.site-shell footer.footer a:hover,
body.site-shell footer.footer a:focus-visible {
  color: #fdf8ee !important;
  text-decoration: underline;
}

body.site-shell footer.footer .footer-contact__link:hover {
  background: rgba(255, 255, 255, 0.14);
}

body.site-shell footer.footer .footer-social__link svg path[fill="#ffffff"] {
  fill: #0e7490;
}

body.site-shell footer.footer .footer-social__link:focus-visible,
body.site-shell footer.footer .footer-app__badge:focus-visible,
body.site-shell footer.footer a:focus-visible {
  outline: 2px solid #fdf8ee;
  outline-offset: 3px;
}

/* Homepage trial button .bnan-hero .bnan-btn: #0e7490, white type, weight 700, 12px radius.
   Hover keeps that color at 92% opacity. Focus uses the navy outline.
   Sizes stay with each page so the control can fit its label. */
body.site-shell .bnan-btn,
body.site-shell a.login-btn-match-switcher,
body.site-shell .ab-close__btn,
body.site-shell .pr-btn,
body.site-shell .pr-textlink,
body.site-shell .cp-btn--teal,
body.site-shell .qp-btn,
body.site-shell .qp-banner__btn,
body.site-shell .ap-btn:not(.ap-btn--ghost),
body.site-shell .sc-btn,
body.site-shell .cu-form__foot button,
body.site-shell .btn-primary,
body.site-shell .fl-page a.btn-secondary,
body.site-shell .wrap .button,
body.site-shell .bn-trial-bar__btn {
  background: #0e7490;
  background-image: none;
  color: #fff;
  border-radius: 12px;
  font-family: var(--bn-font);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

body.site-shell a.login-btn-match-switcher {
  border-radius: 999px;
}

body.site-shell a.login-btn-match-switcher,
body.site-shell .btn-primary,
body.site-shell .fl-page a.btn-secondary,
body.site-shell .pr-btn {
  border-color: #0e7490;
}

body.site-shell .bnan-btn:hover,
body.site-shell a.login-btn-match-switcher:hover,
body.site-shell .ab-close__btn:hover,
body.site-shell .pr-btn:hover,
body.site-shell .pr-textlink:hover,
body.site-shell .cp-btn--teal:hover,
body.site-shell .qp-btn:hover,
body.site-shell .qp-banner__btn:hover,
body.site-shell .ap-btn:not(.ap-btn--ghost):hover,
body.site-shell .sc-btn:hover,
body.site-shell .cu-form__foot button:hover,
body.site-shell .btn-primary:hover,
body.site-shell .fl-page a.btn-secondary:hover,
body.site-shell .wrap .button:hover,
body.site-shell .bn-trial-bar__btn:hover {
  background: #0e7490;
  background-image: none;
  color: #fff;
  filter: none;
  opacity: 0.92;
  transform: none;
}

body.site-shell a.login-btn-match-switcher:hover,
body.site-shell .btn-primary:hover,
body.site-shell .fl-page a.btn-secondary:hover,
body.site-shell .pr-btn:hover {
  border-color: #0e7490;
}

body.site-shell .bnan-btn:focus-visible,
body.site-shell a.login-btn-match-switcher:focus-visible,
body.site-shell .ab-close__btn:focus-visible,
body.site-shell .pr-btn:focus-visible,
body.site-shell .pr-textlink:focus-visible,
body.site-shell .cp-btn:focus-visible,
body.site-shell .qp-btn:focus-visible,
body.site-shell .qp-banner__btn:focus-visible,
body.site-shell .ap-btn:focus-visible,
body.site-shell .sc-btn:focus-visible,
body.site-shell .cu-form__foot button:focus-visible,
body.site-shell .btn-primary:focus-visible,
body.site-shell .fl-page a.btn-secondary:focus-visible,
body.site-shell .wrap .button:focus-visible,
body.site-shell .bn-trial-bar__btn:focus-visible {
  outline: 2px solid #071e36;
  outline-offset: 3px;
  opacity: 1;
}

body.site-shell .wrap .button::before,
body.site-shell .wrap .button::after,
body.site-shell .wrap button::before,
body.site-shell .wrap button::after {
  display: none;
}

/* Preview notice stays below the status bar when the viewport covers the safe area. */
body.site-shell > .preview-banner {
  padding-top: calc(8px + env(safe-area-inset-top, 0px)) !important;
}

/* Mobile free-trial bar. Same placement as the /quran-kids bar: fixed to the
   bottom, hidden from 768px up. Color comes from the shared trial button rule. */
.bn-trial-bar {
  display: none;
}

@media (max-width: 767px) {
  body.site-shell .bn-trial-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--bn-line);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 16px
      calc(20px + env(safe-area-inset-right, 0px))
      calc(16px + env(safe-area-inset-bottom, 0px))
      calc(20px + env(safe-area-inset-left, 0px));
  }

  body.site-shell .bn-trial-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: normal;
  }

  body.site-shell:has(.bn-trial-bar) {
    padding-bottom: var(--bn-trial-bar-h, calc(96px + env(safe-area-inset-bottom, 0px)));
  }

  /* The free-trial bar is the mobile action. The chat button stays on larger screens. */
  body.site-shell a.float {
    display: none;
  }
}

@media (max-width: 359px) {
  body.site-shell .bn-trial-bar__btn {
    font-size: 15px;
  }
}
