/* Rüya Ailem V2.0.17 — R7.8.3 CLEAN FULL REV-E1 */
/* Preserve R7.8.2 UI helpers. */
.ruya-r78-childLine{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 0}.ruya-r78-childActions{display:flex;gap:8px;flex-wrap:wrap}.ruya-r78-editBtn,.ruya-r78-unlinkBtn,.ruya-r78-classDelete{border:0;border-radius:10px;padding:9px 12px;font-weight:700;cursor:pointer}.ruya-r78-unlinkBtn,.ruya-r78-classDelete{background:#fff1f1;color:#a51d2d}.ruya-r78-editBtn{background:#f0ebf7;color:#5e3f88}.ruya-r78-editForm{display:grid;gap:12px}.ruya-r78-editForm label{display:grid;gap:6px}.ruya-r78-modalActions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.ruya-r78-classActions{display:flex;gap:8px;flex-wrap:wrap}.ruya-r78-classDelete{background:#fff1f1!important;color:#a51d2d!important}.ruya-r78-unsaved{font-size:12px;color:#8a4b11}
.ruya-r781-teacherClassField{margin-top:12px}.ruya-r781-teacherClassField select{width:100%;min-height:46px}
.ruya-r782-teacherClassBadge{display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:5px 9px;border-radius:999px;background:#f3f1f8;color:#4d4561;font-size:12px;font-weight:700;line-height:1.2}.ruya-r782-classTeacher{display:block;margin-top:6px;font-size:13px;color:#596174;font-weight:650}

/* R7.8.3: modal must be bound to the browser viewport, not a short page/card container. */
html:has(.modalBack),body:has(.modalBack){overflow:hidden!important}
body .modalBack{
  position:fixed!important;inset:0!important;top:0!important;right:0!important;bottom:0!important;left:0!important;
  width:100vw!important;height:100dvh!important;min-height:100dvh!important;max-height:none!important;
  z-index:2147483000!important;box-sizing:border-box!important;
  display:flex!important;justify-content:center!important;align-items:flex-start!important;
  overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;
  padding:clamp(14px,2.5vh,28px) clamp(12px,2vw,28px)!important;
  isolation:isolate!important;
}
body .modalBack>.modal,body .modalBack>form.modal{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  transform:none!important;box-sizing:border-box!important;
  max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 28px)!important;
  min-height:0!important;height:auto!important;
  overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;
  scrollbar-gutter:stable;padding-bottom:max(88px,calc(env(safe-area-inset-bottom,0px) + 72px))!important;
  margin:0 auto!important;
}
/* Long V5 survey/gallery/staff dialogs get a little more usable vertical room. */
body .modalBack>.v5Modal,body .modalBack>form.v5Modal,body .modalBack>.teacherRegistrationModal,body .modalBack>form.teacherRegistrationModal,body .modalBack>.staffAccountModal,body .modalBack>form.staffAccountModal{
  max-height:calc(100dvh - 28px)!important;
}
/* Keep final actions reachable while the form body scrolls. */
body .modalBack .teacherRegistrationFooter,
body .modalBack form.modal>footer:last-child,
body .modalBack form.modal>.modalFooter:last-child,
body .modalBack form.modal>.actions:last-child,
body .modalBack form.modal>button:last-child,
body .modalBack form.modal>.btn:last-child{
  position:sticky!important;bottom:0!important;z-index:30!important;
  background:rgba(255,255,255,.98)!important;backdrop-filter:blur(10px);
  padding-top:12px!important;padding-bottom:max(12px,env(safe-area-inset-bottom,0px))!important;
  margin-top:14px!important;box-shadow:0 -12px 24px rgba(19,28,55,.09)!important;
}
body .modalBack .teacherRegistrationPanel,body .modalBack .teacherReferencePanel,body .modalBack .childCandidateList{min-height:0!important}
/* Avoid page/card clipping inherited from dashboard wrappers. */
body .v5Page:has(>.modalBack),body main:has(.modalBack),body .content:has(.modalBack){overflow:visible!important;contain:none!important}

@media (max-width:640px){
  .ruya-r78-childActions{width:100%}.ruya-r78-childActions button{flex:1;min-height:42px}.ruya-r78-classActions{width:100%}.ruya-r78-classActions>*{flex:1;min-height:42px}.ruya-r78-classDelete{min-height:42px}.ruya-r781-teacherClassField{grid-column:1/-1}
  body .modalBack{padding:8px!important;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))!important}
  body .modalBack>.modal,body .modalBack>form.modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;padding-bottom:max(104px,calc(env(safe-area-inset-bottom,0px) + 88px))!important}
}

/* R7.8.4 — Yeni Anket gerçek footer / submit */
body .modalBack .ruya-r784-surveyModal{display:flex!important;flex-direction:column!important;overflow:hidden!important;padding-bottom:0!important;max-height:calc(100dvh - 28px)!important;}
body .modalBack .ruya-r784-surveyBody{min-height:0!important;overflow-y:auto!important;padding:2px 2px 18px!important;flex:1 1 auto!important;}
body .modalBack .ruya-r784-surveyGrid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;}
body .modalBack .ruya-r784-surveyFooter{position:sticky!important;bottom:0!important;z-index:80!important;display:grid!important;grid-template-columns:minmax(150px,.7fr) minmax(220px,1.3fr)!important;gap:10px!important;background:#fff!important;padding:16px 0 max(16px,env(safe-area-inset-bottom,0px))!important;margin-top:auto!important;border-top:1px solid rgba(25,38,70,.10)!important;box-shadow:0 -12px 26px rgba(19,28,55,.08)!important;}
body .modalBack .ruya-r784-surveyFooter button{min-height:48px!important;border-radius:12px!important;font-weight:800!important;font-size:15px!important;cursor:pointer!important;}
body .modalBack .ruya-r784-surveyCancel{background:#fff!important;border:1px solid #dce2ec!important;color:#26344c!important;}
body .modalBack .ruya-r784-surveySubmit{border:0!important;color:#fff!important;background:linear-gradient(100deg,#6f23ef,#173f99)!important;}
body .modalBack .ruya-r784-surveySubmit:disabled,body .modalBack .ruya-r784-surveyCancel:disabled{opacity:.55!important;cursor:not-allowed!important;}
@media(max-width:640px){body .modalBack .ruya-r784-surveyGrid{grid-template-columns:1fr!important}body .modalBack .ruya-r784-surveyFooter{grid-template-columns:1fr!important;padding-bottom:max(16px,env(safe-area-inset-bottom,0px))!important}}
