/* SMARTBIBLIA_MOBILE_NATIVE_FINAL_V1 */
@media (max-width: 759px) {
  html, body.dashboard-shell {
    overflow-x:hidden !important;
    scroll-behavior:auto !important;
  }

  body.dashboard-shell {
    padding-bottom:104px !important;
    -webkit-tap-highlight-color:transparent;
  }

  body.dashboard-shell * {
    scroll-behavior:auto !important;
  }

  .church-app-shell {
    display:block !important;
    padding:10px 10px 118px !important;
  }

  /* Native bottom navigation */
  .church-sidebar {
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    top:auto !important;
    z-index:10000 !important;
    min-height:82px !important;
    height:auto !important;
    padding:8px 9px calc(8px + env(safe-area-inset-bottom)) !important;
    border-radius:23px 23px 0 0 !important;
    background:rgba(7,16,29,.99) !important;
    border:1px solid rgba(255,255,255,.13) !important;
    box-shadow:0 -8px 24px rgba(0,0,0,.28) !important;
  }

  .church-sidebar::before,
  .church-sidebar-brand,
  .church-sidebar-profile,
  .church-sidebar-kpis,
  .church-sidebar > .church-sidebar-logout {
    display:none !important;
  }

  .church-sidebar-nav {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:6px !important;
  }

  .church-sidebar-nav-link {
    min-height:58px !important;
    padding:7px 4px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    border-radius:15px !important;
    font-size:10px !important;
    line-height:1.15 !important;
    font-weight:800 !important;
    color:#dbeafe !important;
    background:rgba(255,255,255,.06) !important;
    border:1px solid rgba(255,255,255,.08) !important;
    transition:none !important;
    transform:none !important;
  }

  .church-sidebar-nav-link:active {
    color:#fff !important;
    background:rgba(255,90,10,.20) !important;
    border-color:rgba(255,90,10,.45) !important;
  }

  .church-topbar {
    min-height:64px !important;
    padding:11px 13px !important;
    border-radius:18px !important;
    position:sticky !important;
    top:8px !important;
    z-index:90 !important;
  }

  .church-brand-title { font-size:17px !important; }
  .church-brand-sub { display:none !important; }

  .church-hero,
  .church-section,
  .glass-panel {
    border-radius:18px !important;
  }

  button,
  .btn,
  .church-pay-btn {
    min-height:48px !important;
    touch-action:manipulation !important;
  }

  input,
  select,
  textarea {
    min-height:46px !important;
    font-size:16px !important;
  }

  /* Immediate visual language selection */
  #language-panel label,
  #language-panel [data-language] {
    transition:none !important;
    touch-action:manipulation !important;
  }

  #language-panel input[type="radio"] {
    accent-color:#FF5A0A !important;
  }

  #language-panel[data-sb-language-saving="true"]::after {
    content:"Language selected — syncing to live display…";
    display:block;
    margin-top:10px;
    color:#fb923c;
    font-size:12px;
    font-weight:700;
  }

  /* Payment becomes a compact native bottom sheet */
  body.sb-billing-open {
    overflow:hidden !important;
    padding-bottom:0 !important;
  }

  body.sb-billing-open .church-sidebar {
    display:none !important;
  }

  #billing-modal:not([hidden]) {
    display:flex !important;
    align-items:flex-end !important;
    justify-content:center !important;
    overflow-y:auto !important;
    padding:12px 10px 0 !important;
  }

  #billing-modal > :first-child {
    width:100% !important;
    max-width:560px !important;
    max-height:calc(100dvh - 12px) !important;
    margin:0 auto !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    border-radius:24px 24px 0 0 !important;
    padding:20px 16px 0 !important;
  }

  #billing-form {
    display:flex !important;
    flex-direction:column !important;
    min-height:100% !important;
  }

  #billing-modal .sb-network-grid {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:9px !important;
    margin-top:10px !important;
  }

  #billing-modal .sb-network {
    min-height:86px !important;
    padding:8px 5px !important;
    border-radius:16px !important;
    transform:none !important;
    transition:none !important;
    box-shadow:none !important;
  }

  #billing-modal .sb-network:hover,
  #billing-modal .sb-network.selected,
  #billing-modal .sb-network.is-selected {
    transform:none !important;
  }

  #billing-modal .sb-network-logo {
    width:58px !important;
    height:38px !important;
    max-width:58px !important;
    max-height:38px !important;
  }

  /* Always visible Pay button */
  #billing-modal .sb-billing-actions {
    position:sticky !important;
    bottom:0 !important;
    z-index:10 !important;
    display:flex !important;
    width:100% !important;
    margin:12px 0 0 !important;
    padding:14px 0 calc(14px + env(safe-area-inset-bottom)) !important;
    background:linear-gradient(180deg,rgba(7,16,29,0),#07101d 28%) !important;
  }

  #billing-modal #billing-submit-btn {
    display:block !important;
    visibility:visible !important;
    width:100% !important;
    min-height:56px !important;
    border-radius:16px !important;
    font-size:16px !important;
    font-weight:800 !important;
  }
}

/* SMARTBIBLIA_PAYMENT_MOBILE_CLEAN_V1 */
@media (max-width:759px){
  #billing-modal.sb-processing-mode > #billing-form{
    display:none !important;
  }

  #billing-modal.sb-processing-mode > #billing-processing{
    display:grid !important;
    width:100% !important;
    max-width:560px !important;
    min-height:360px !important;
    margin:0 auto !important;
    padding:34px 24px calc(28px + env(safe-area-inset-bottom)) !important;
    border-radius:24px 24px 0 0 !important;
    place-content:center !important;
    gap:16px !important;
  }

  #billing-modal.sb-processing-mode > #billing-processing::before{
    content:"";
    width:46px;
    height:46px;
    margin:0 auto 4px;
    border-radius:50%;
    border:4px solid rgba(255,255,255,.18);
    border-top-color:#FF5A0A;
    animation:sbPaymentSpin .8s linear infinite;
  }

  #billing-modal.sb-processing-mode > #billing-processing h3{
    font-size:24px !important;
    text-align:center !important;
  }

  #billing-modal.sb-processing-mode > #billing-processing p{
    max-width:30ch !important;
    font-size:16px !important;
    text-align:center !important;
  }

  @keyframes sbPaymentSpin{
    to{transform:rotate(360deg)}
  }
}
