/* RUYA_V2.4.24.3_HF_UI_SYNC_1_DATA_SAFE
 * Frontend-only visual/viewport stabilization.
 * Push transport, VAPID, subscriptions and live data are intentionally untouched.
 */

/* ---------------------------------------------------------
   Parent notifications — denser cards, less visual churn
   --------------------------------------------------------- */
.role-parent .notificationLink.ruyaLongPressNotification{
  grid-template-columns:36px minmax(0,1fr)!important;
  gap:9px!important;
  width:calc(100% - 16px)!important;
  min-height:0!important;
  margin:0 8px 7px!important;
  padding:10px 11px!important;
  border-radius:14px!important;
  box-shadow:0 5px 15px rgba(58,76,98,.045)!important;
  transform:none!important;
  transition:border-color .14s ease,background .14s ease!important;
}
.role-parent .notificationLink.ruyaLongPressNotification:hover{transform:none!important}
.role-parent .notificationLink.ruyaLongPressNotification .quickIcon{
  width:34px!important;height:34px!important;border-radius:11px!important;font-size:15px!important;
}
.role-parent .notificationLink.ruyaLongPressNotification b{font-size:12.5px!important;line-height:1.24!important;font-weight:650!important}
.role-parent .notificationLink.ruyaLongPressNotification small{font-size:9px!important;line-height:1.2!important;margin-top:2px!important}
.role-parent .notificationLink.ruyaLongPressNotification p{
  margin:3px 0!important;font-size:10.8px!important;line-height:1.32!important;
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;
}
.role-parent .notificationLink.ruyaLongPressNotification .notificationOpenHint{margin-top:3px!important;font-size:9px!important;line-height:1.15!important;font-weight:650!important}
.role-parent .ruyaNotificationLongPressHint{font-size:10.5px!important;line-height:1.35!important;margin:2px 8px 9px!important}

/* ---------------------------------------------------------
   Pickup — child is not at school: stop the flow visually
   --------------------------------------------------------- */
.role-parent .pickupNotAtSchool{
  display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;gap:11px!important;
  margin-top:12px!important;padding:14px!important;border:1px solid #e5e8ed!important;border-radius:17px!important;
  background:#f7f8fa!important;color:#596474!important;
}
.role-parent .pickupNotAtSchool>span{display:grid!important;width:42px!important;height:42px!important;place-items:center!important;border-radius:13px!important;background:#fff!important;font-size:21px!important}
.role-parent .pickupNotAtSchool h3{margin:0 0 4px!important;font-size:14px!important;font-weight:650!important;color:#344054!important}
.role-parent .pickupNotAtSchool p{margin:0!important;font-size:11px!important;line-height:1.4!important;color:#748092!important}

/* ---------------------------------------------------------
   Bulletin deep-link viewer — in-app, no popup dependency
   --------------------------------------------------------- */
body.ruyaDeepDocumentOpen{overflow:hidden!important}
.ruyaDeepDocumentViewer{
  position:fixed!important;inset:0!important;z-index:2147483200!important;display:flex!important;align-items:stretch!important;justify-content:center!important;
  background:rgba(15,28,48,.52)!important;padding:0!important;box-sizing:border-box!important;
}
.ruyaDeepDocumentPanel{width:min(980px,100vw)!important;height:100dvh!important;max-height:100dvh!important;margin:0 auto!important;background:#f6f8fc!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;box-shadow:0 20px 70px rgba(14,27,49,.25)!important}
.ruyaDeepDocumentHead{flex:0 0 auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:calc(9px + env(safe-area-inset-top)) 12px 9px!important;background:rgba(255,255,255,.98)!important;border-bottom:1px solid #dce4ee!important;box-sizing:border-box!important}
.ruyaDeepDocumentHead strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#24364e!important;font-size:14px!important;font-weight:650!important}
.ruyaDeepDocumentHead button{flex:none!important;border:0!important;border-radius:999px!important;background:#173b88!important;color:#fff!important;padding:9px 13px!important;font:inherit!important;font-size:13px!important;font-weight:650!important;touch-action:manipulation!important}
.ruyaDeepDocumentBody{flex:1 1 0!important;min-height:0!important;overflow:auto!important;display:flex!important;align-items:stretch!important;justify-content:center!important;background:#eef2f7!important;padding-bottom:env(safe-area-inset-bottom)!important}
.ruyaDeepDocumentBody>iframe{width:100%!important;height:100%!important;min-height:0!important;border:0!important;background:#fff!important}
.ruyaDeepDocumentBody>img{display:block!important;max-width:100%!important;height:auto!important;object-fit:contain!important;margin:auto!important;padding:10px!important;box-sizing:border-box!important}
.ruyaDeepDocumentBody>video{width:100%!important;height:100%!important;object-fit:contain!important;background:#111!important}
.ruyaDeepDocumentDownload,.ruyaDeepDocumentError{align-self:center!important;width:min(520px,calc(100% - 28px))!important;padding:22px!important;border-radius:20px!important;background:#fff!important;text-align:center!important;color:#445268!important;box-sizing:border-box!important}
.ruyaDeepDocumentDownload a{display:inline-flex!important;margin-top:12px!important;padding:11px 16px!important;border-radius:12px!important;background:#173b88!important;color:#fff!important;text-decoration:none!important;font-weight:650!important}

/* ---------------------------------------------------------
   One bottom navigation surface only
   --------------------------------------------------------- */
@media (max-width:900px){
  body:has(#root .shell.role-parent) #ruyaMobileBottomNav,
  body:has(#root .main.parentMain) #ruyaMobileBottomNav{
    display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
  }
  body:has(#root .shell.role-parent) #root nav.ruya-r793-bottom-nav[aria-label="Mobil navigasyon"]{
    position:fixed!important;left:16px!important;right:16px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;
    width:auto!important;height:72px!important;min-height:72px!important;margin:0!important;padding:7px 8px!important;
    border:1px solid #dce5ef!important;border-radius:27px!important;background:#fff!important;background-image:none!important;
    box-shadow:0 7px 18px rgba(24,46,82,.10)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    transform:none!important;filter:none!important;isolation:isolate!important;overflow:visible!important;z-index:6000!important;
  }
  body:has(#root .shell.role-parent) #root nav.ruya-r793-bottom-nav::before,
  body:has(#root .shell.role-parent) #root nav.ruya-r793-bottom-nav::after,
  body:has(#root .shell.role-parent) #root .v225ReferenceShell::before,
  body:has(#root .shell.role-parent) #root .v225ReferenceShell::after,
  body:has(#root .shell.role-parent) #root .main.parentMain::before,
  body:has(#root .shell.role-parent) #root .main.parentMain::after{
    content:none!important;display:none!important;visibility:hidden!important;background:none!important;box-shadow:none!important;
  }
}

/* ---------------------------------------------------------
   iPhone / iPad: keyboard, viewport, message composer, zoom
   --------------------------------------------------------- */
body.ruyaIosDevice{-webkit-text-size-adjust:100%!important}
body.ruyaIosDevice .parentNewMessageModal,
body.ruyaIosDevice .messagingLayout,
body.ruyaIosDevice #root nav.ruya-r793-bottom-nav{touch-action:manipulation!important}
body.ruyaIosDevice .parentNewMessageModal textarea,
body.ruyaIosDevice .parentNewMessageModal input,
body.ruyaIosDevice .parentNewMessageModal select,
body.ruyaIosDevice .replyComposer textarea,
body.ruyaIosDevice .replyComposer input,
body.ruyaIosDevice .replyComposer select{font-size:16px!important}

@media (max-width:900px){
  body.ruyaIosDevice .modalBack:has(.parentNewMessageModal){
    position:fixed!important;left:0!important;right:0!important;top:var(--ruya-ios-vv-top,0px)!important;bottom:auto!important;
    width:100vw!important;height:var(--ruya-ios-vv-height,100dvh)!important;min-height:0!important;max-height:none!important;
    display:flex!important;align-items:stretch!important;justify-content:stretch!important;overflow:hidden!important;padding:0!important;
    box-sizing:border-box!important;transform:none!important;overscroll-behavior:none!important;
  }
  body.ruyaIosDevice .modalBack:has(.parentNewMessageModal)>.parentNewMessageModal{
    position:relative!important;width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;max-height:100%!important;
    margin:0!important;border-radius:0!important;padding:calc(14px + env(safe-area-inset-top)) 16px 0!important;
    display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;box-sizing:border-box!important;transform:none!important;
  }
  body.ruyaIosDevice .parentNewMessageModal>.modalTopClose{flex:0 0 auto!important}
  body.ruyaIosDevice .parentNewMessageModal textarea{min-height:128px!important;max-height:190px!important;resize:none!important}
  body.ruyaIosDevice .parentNewMessageModal footer{
    position:sticky!important;left:0!important;right:0!important;bottom:0!important;z-index:30!important;flex:0 0 auto!important;
    display:grid!important;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;gap:8px!important;
    margin:auto -16px 0!important;padding:10px 16px max(10px,env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.98)!important;border-top:1px solid #e3e8ef!important;box-shadow:0 -7px 18px rgba(27,41,67,.08)!important;
  }
  body.ruyaIosDevice .parentNewMessageModal footer>button,
  body.ruyaIosDevice .parentNewMessageModal footer>.btn{width:100%!important;min-height:46px!important;margin:0!important}
  body.ruyaIosKeyboardOpen #root nav.ruya-r793-bottom-nav,
  body.ruyaIosKeyboardOpen #ruyaMobileBottomNav{display:none!important;visibility:hidden!important;pointer-events:none!important}
  body.ruyaIosKeyboardOpen #root .main.parentMain{padding-bottom:12px!important}
  body.ruyaIosKeyboardOpen .parentNewMessageModal textarea{min-height:96px!important;max-height:128px!important}
  body.ruyaIosDevice .replyComposer{position:sticky!important;bottom:0!important;z-index:25!important;background:#fff!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
  body.ruyaIosKeyboardOpen .conversationThread{min-height:0!important;max-height:calc(var(--ruya-ios-vv-height,100dvh) - 124px)!important;overflow:auto!important}
}
