/* PatientBoost — shared language modal + CTA buttons (load on all public pages) */
:root {
  --pb-blue: #1565D8;
  --pb-blue-dark: #0f52b8;
  --pb-teal: #0AAFB0;
  --pb-white: #FFFFFF;
  --pb-border: #DDE5F0;
  --pb-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --pb-font-display: 'DM Serif Display', Georgia, serif;
  --pb-radius-lg: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--pb-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pb-blue) 0%, #0a4fb8 100%);
  color: var(--pb-white);
  box-shadow: 0 6px 22px rgba(21, 101, 216, 0.38), 0 0 0 0 rgba(21, 101, 216, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--pb-blue-dark) 0%, #083e94 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(21, 101, 216, 0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--navy, #0b1f3a);
  border: 1.5px solid var(--pb-border);
}
.btn-ghost:hover {
  border-color: var(--pb-blue);
  color: var(--pb-blue);
  background: #e8f1ff;
}

.lang-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s;
}
.lang-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lang-modal.is-leaving {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
}
.lang-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 58, 0.52);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lang-modal__panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: linear-gradient(165deg, #0a1428 0%, #050b1c 45%, #060d20 100%);
  border-radius: var(--pb-radius-lg);
  padding: 42px 40px 38px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(21, 101, 216, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(28px) scale(0.92);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-modal.is-visible .lang-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.lang-modal.is-leaving .lang-modal__panel {
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.38s ease-out, opacity 0.35s ease-out;
}
.lang-modal__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pb-teal);
  margin-bottom: 10px;
}
.lang-modal__title {
  font-family: var(--pb-font-display);
  font-size: clamp(1.45rem, 3.8vw, 1.85rem);
  color: #fff;
  font-weight: 500;
  line-height: 1.28;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.lang-modal__sub {
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 32px;
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}
.lang-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
@media (max-width: 400px) {
  .lang-modal__actions {
    flex-direction: column;
  }
}
.lang-modal__btn {
  flex: 1 1 160px;
  min-width: 0;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 15px 24px;
  animation: none !important;
}
.lang-modal__btn.btn-primary {
  box-shadow: 0 6px 22px rgba(21, 101, 216, 0.42), 0 0 0 0 rgba(21, 101, 216, 0.35);
}
.lang-modal__panel .btn-ghost {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lang-modal__panel .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.lang-modal__btn:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.95);
  outline-offset: 3px;
}
.footer-lang {
  margin-top: 8px;
}
.footer-lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  transition: color 0.15s;
}
.footer-lang-btn:hover {
  color: rgba(255, 255, 255, 0.95);
}
.footer-lang-btn:focus-visible {
  outline: 2px solid var(--pb-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .lang-modal {
    transition: opacity 0.2s ease, visibility 0.2s !important;
  }
  .lang-modal__panel {
    transition: opacity 0.2s ease, transform 0.2s ease !important;
  }
  .lang-modal__panel .lang-modal__btn {
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
  }
}
