/* The Bluebird Bar — Install Banner styles
 * ------------------------------------------------------------------------
 * Sticky bottom bar on phones, top bar on desktop. Designed to be unobtrusive
 * but legible against any site background. Auto-respects iPhone home indicator
 * with safe-area-inset-bottom.
 */
#bb-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;

  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;

  background: #fbfaf3;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, .35),
    0 2px 6px rgba(0, 0, 0, .18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.35;

  animation: bb-ib-slide-up .35s ease-out;
}

@keyframes bb-ib-slide-up {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#bb-install-banner .bb-ib-icon {
  flex-shrink: 0;
}

#bb-install-banner .bb-ib-body {
  flex: 1 1 auto;
  min-width: 0;
}

#bb-install-banner .bb-ib-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  color: #0c2a4d;
}

#bb-install-banner .bb-ib-sub {
  font-size: 12px;
  color: #444;
}

#bb-install-banner .bb-ib-sub b {
  color: #0c2a4d;
}

#bb-install-banner .bb-ib-share {
  display: inline-block;
  vertical-align: middle;
  font-size: 14px;
  color: #0a84ff; /* iOS Safari share-icon blue */
  margin: 0 1px;
}

#bb-install-banner .bb-ib-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#bb-install-banner .bb-ib-btn-primary {
  background: #0c2a4d;
  color: #f5c842;
  border: none;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
#bb-install-banner .bb-ib-btn-primary:hover {
  background: #143b6e;
}

#bb-install-banner .bb-ib-btn-close {
  background: transparent;
  color: #888;
  border: none;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
}
#bb-install-banner .bb-ib-btn-close:hover {
  background: rgba(0, 0, 0, .06);
  color: #222;
}

/* ==========================================================================
   HOW-TO MODAL — visual 3-step iOS install walkthrough
   ========================================================================== */
#bb-howto-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 12, 28, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: bb-howto-fade .25s ease-out;
  overflow-y: auto;
}
@media (min-width: 600px) {
  #bb-howto-modal { align-items: center; padding: 24px; }
}
@keyframes bb-howto-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#bb-howto-modal .bb-howto-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fbfaf3;
  color: #1a1a1a;
  border-radius: 22px 22px 0 0;
  padding: 22px 20px 18px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .4);
  animation: bb-howto-slide .35s ease-out;
  max-height: 96vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 600px) {
  #bb-howto-modal .bb-howto-card { border-radius: 22px; }
}
@keyframes bb-howto-slide {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#bb-howto-modal .bb-howto-x {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #888;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
}
#bb-howto-modal .bb-howto-x:hover { background: rgba(0,0,0,.06); color: #222; }

#bb-howto-modal .bb-howto-hero {
  text-align: center;
  padding: 4px 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  margin-bottom: 14px;
}
#bb-howto-modal .bb-howto-title {
  font-size: 18px;
  font-weight: 800;
  color: #0c2a4d;
  letter-spacing: .01em;
}
#bb-howto-modal .bb-howto-sub {
  font-size: 13px;
  color: #5b6675;
  margin-top: 4px;
}

#bb-howto-modal .bb-howto-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
#bb-howto-modal .bb-howto-steps li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
#bb-howto-modal .bb-howto-steps li:last-child { border-bottom: none; }

#bb-howto-modal .bb-howto-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0c2a4d;
  color: #f5c842;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#bb-howto-modal .bb-howto-body { flex: 1; min-width: 0; }
#bb-howto-modal .bb-howto-step-title {
  font-size: 15px;
  font-weight: 700;
  color: #0c2a4d;
  margin-bottom: 4px;
  line-height: 1.3;
}
#bb-howto-modal .bb-howto-step-title b { color: #0a84ff; }
#bb-howto-modal .bb-howto-step-sub {
  font-size: 13px;
  color: #444;
  line-height: 1.45;
}
#bb-howto-modal .bb-howto-step-sub b { color: #0c2a4d; }

#bb-howto-modal .bb-howto-icon-demo {
  margin-top: 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 6px;
  border: 1px solid rgba(10,132,255,.3);
  border-radius: 12px;
  background: rgba(10,132,255,.06);
}
#bb-howto-modal .bb-howto-icon-label {
  font-size: 10px;
  font-weight: 600;
  color: #0a84ff;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#bb-howto-modal .bb-howto-row-demo {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,.04);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
}
#bb-howto-modal .bb-howto-row-icon {
  font-size: 22px;
  color: #0a84ff;
  line-height: 1;
  width: 26px;
  text-align: center;
}
#bb-howto-modal .bb-howto-row-text {
  font-size: 14px;
  font-weight: 600;
  color: #0c2a4d;
}

#bb-howto-modal .bb-howto-footer { margin-top: 4px; }
#bb-howto-modal .bb-howto-foot-note {
  font-size: 12px;
  color: #5b6675;
  line-height: 1.5;
  background: rgba(245,200,66,.12);
  border: 1px solid rgba(245,200,66,.35);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
#bb-howto-modal .bb-howto-foot-note b { color: #0c2a4d; }

#bb-howto-modal .bb-howto-done {
  width: 100%;
  background: #0c2a4d;
  color: #f5c842;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .15s;
}
#bb-howto-modal .bb-howto-done:hover { background: #143b6e; }

/* On narrow phones, keep the layout tight */
@media (max-width: 380px) {
  #bb-install-banner {
    gap: 10px;
    padding: 10px 12px;
  }
  #bb-install-banner .bb-ib-title { font-size: 13px; }
  #bb-install-banner .bb-ib-sub { font-size: 11.5px; }
  #bb-install-banner .bb-ib-btn-primary { padding: 8px 11px; font-size: 12.5px; }
}
