/* RUYA_V2.4.24.3_HF6_ANDROID_MESSAGES_ANNOUNCEMENT_DATA_PUSH_SAFE
 * Frontend-only additive hotfix.
 * Scope: Android parent Messages + parent Announcement detail overlay.
 * No DB, API, server, push worker, VAPID or service-worker changes.
 */

/* ---------- Android parent Messages: single page scroll, composer in normal flow ---------- */
@media (max-width:900px){
  html.ruyaHf6AndroidMessages,
  html.ruyaHf6AndroidMessages body,
  html.ruyaHf6AndroidMessages body #root{
    min-height:100%!important;height:auto!important;max-height:none!important;
    overflow-x:hidden!important;overflow-y:auto!important;
  }
  html.ruyaHf6AndroidMessages body #root>.shell.role-parent{
    min-height:100dvh!important;height:auto!important;max-height:none!important;
    overflow:visible!important;
  }
  html.ruyaHf6AndroidMessages body #root>.shell.role-parent>main.main.parentMain{
    min-height:0!important;height:auto!important;max-height:none!important;
    overflow-x:hidden!important;overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;
    padding-bottom:calc(150px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(150px + env(safe-area-inset-bottom))!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout{
    display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important;box-sizing:border-box!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .conversationList{
    display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:116px!important;
    margin:0 0 10px!important;padding:0!important;overflow-x:hidden!important;overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .conversationItem{
    min-height:68px!important;padding:9px 11px!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .conversationThread{
    display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0!important;overflow:visible!important;box-sizing:border-box!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .conversationPlaceholder{
    min-height:82px!important;height:auto!important;padding:22px 16px!important;margin:0!important;
    display:flex!important;align-items:center!important;box-sizing:border-box!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .threadHeader{
    position:relative!important;inset:auto!important;padding:10px 13px!important;margin:0!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .messageThread{
    display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:12px!important;overflow:visible!important;box-sizing:border-box!important;
    touch-action:pan-y!important;overscroll-behavior:auto!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .replyComposer,
  html.ruyaHf6AndroidMessages body.ruyaMobileComposerFocus #root .role-parent .messagingLayout .replyComposer{
    position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) 88px!important;align-items:end!important;gap:8px!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:10px 0 calc(106px + env(safe-area-inset-bottom))!important;
    padding:10px!important;box-sizing:border-box!important;
    border:1px solid #dfe5ee!important;border-radius:16px!important;background:#fff!important;
    box-shadow:0 7px 20px rgba(25,46,78,.08)!important;transform:none!important;z-index:2!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .replyComposer textarea{
    width:100%!important;min-width:0!important;min-height:48px!important;max-height:110px!important;
    margin:0!important;padding:11px 12px!important;box-sizing:border-box!important;resize:none!important;
    font-size:16px!important;line-height:1.35!important;touch-action:manipulation!important;
  }
  html.ruyaHf6AndroidMessages #root .role-parent .messagingLayout .replyComposer button{
    width:88px!important;min-width:88px!important;height:48px!important;min-height:48px!important;
    margin:0!important;padding:0 8px!important;border-radius:14px!important;font-size:12px!important;
  }
  /* Keyboard/composer focus: nav disappears so the editor owns the safe bottom area. */
  html.ruyaHf6AndroidMessages body.ruyaMobileComposerFocus #root nav.ruya-r793-bottom-nav[aria-label="Mobil navigasyon"]{
    display:none!important;visibility:hidden!important;pointer-events:none!important;
  }
  html.ruyaHf6AndroidMessages body.ruyaMobileComposerFocus #root .role-parent .messagingLayout .replyComposer{
    margin-bottom:14px!important;
  }
  html.ruyaHf6AndroidMessages body.ruyaMobileComposerFocus #root>.shell.role-parent>main.main.parentMain{
    padding-bottom:18px!important;scroll-padding-bottom:18px!important;
  }
}

/* ---------- Parent Announcement detail: true modal layer, own scroll, no underlying nav/footer ---------- */
@media (max-width:900px){
  body.ruyaHf6AnnouncementOpen{
    overflow:hidden!important;overscroll-behavior:none!important;
  }
  body.ruyaHf6AnnouncementOpen #root nav.ruya-r793-bottom-nav[aria-label="Mobil navigasyon"],
  body.ruyaHf6AnnouncementOpen #root .mobileNevxupCredit{
    display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
  }
  body.ruyaHf6AnnouncementOpen #root .v214AnnouncementModalBack{
    position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;
    z-index:2147483000!important;display:flex!important;align-items:center!important;justify-content:center!important;
    padding:calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;overflow:hidden!important;background:rgba(24,34,54,.58)!important;
    overscroll-behavior:contain!important;
  }
  body.ruyaHf6AnnouncementOpen #root .v214AnnouncementModal{
    position:relative!important;inset:auto!important;display:block!important;
    width:min(100%,720px)!important;max-width:720px!important;
    height:auto!important;min-height:0!important;max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    margin:0!important;padding:24px 22px 22px!important;box-sizing:border-box!important;
    overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;touch-action:pan-y!important;
    border-radius:28px!important;background:#fff!important;background-image:none!important;
    box-shadow:0 24px 70px rgba(11,22,45,.28)!important;opacity:1!important;
  }
  body.ruyaHf6AnnouncementOpen #root .v214AnnouncementModal>.modalTopClose{
    position:sticky!important;float:right!important;top:0!important;right:0!important;z-index:5!important;
  }
  body.ruyaHf6AnnouncementOpen #root .v214AnnouncementModal>p{
    white-space:pre-line!important;overflow-wrap:anywhere!important;
  }
  body.ruyaHf6AnnouncementOpen #root .v214AnnouncementModal>button:last-child{
    position:relative!important;display:block!important;width:100%!important;min-height:48px!important;
    margin:20px 0 2px!important;z-index:2!important;
  }
}
