/* RUYA_TEACHER_MESSAGES_MEASURED_LAYOUT_V1
   Teacher / coordinator only.
   Parent ruyaPmPage is untouched.
*/

@media(max-width:780px){

  /* Konuşma paneli JS tarafından gerçek nav üst sınırına kadar ölçülür. */
  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  .conversationThread{
    display:flex!important;
    flex-direction:column!important;

    width:100%!important;
    min-width:0!important;

    min-height:0!important;
    height:var(--ruya-teacher-thread-h,auto)!important;
    max-height:var(--ruya-teacher-thread-h,none)!important;

    padding-bottom:0!important;
    margin-bottom:0!important;

    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  .threadHeader{
    flex:0 0 auto!important;
    order:1!important;
  }

  /* Mesajlar kalan bütün alanı kullanır. */
  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  .messageThread{
    order:2!important;

    flex:1 1 auto!important;

    width:100%!important;
    min-width:0!important;

    min-height:0!important;
    height:auto!important;
    max-height:none!important;

    padding:13px 10px 12px!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;

    scroll-padding-bottom:12px!important;
    -webkit-overflow-scrolling:touch!important;

    box-sizing:border-box!important;
  }

  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  .messageSendFeedback{
    order:3!important;
    flex:0 0 auto!important;
  }

  /*
    Veli konuşmasındaki bilgi notu composer'ı yukarı itmesin.
    Bilgi notu composer'ın ÜSTÜNDE kalır.
  */
  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  .approvalNotice{
    order:4!important;
    flex:0 0 auto!important;

    margin:5px 10px 6px!important;
    padding:0!important;

    font-size:9px!important;
    line-height:1.3!important;
  }

  /* Composer artık viewport'a fixed değil; panelin son satırı. */
  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  .replyComposer.messageAttachmentComposer{
    order:5!important;
    flex:0 0 auto!important;

    position:static!important;

    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;

    transform:none!important;

    display:grid!important;
    grid-template-columns:minmax(0,1fr) 84px!important;
    align-items:end!important;
    gap:7px!important;

    width:100%!important;
    max-width:none!important;
    min-width:0!important;

    margin:0!important;
    padding:7px!important;

    border:0!important;
    border-top:1px solid #e4e9f0!important;
    border-radius:0!important;

    background:rgba(255,255,255,.98)!important;

    box-shadow:
      0 -7px 22px
      rgba(36,50,78,.055)!important;

    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;

    box-sizing:border-box!important;
  }

  /*
    Sol kolon:
    Mesaj yazma
    Dosya Ekle
  */
  .teacherMessagesReferencePage
  .replyComposer.messageAttachmentComposer
  .messageComposerMain{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;

    gap:6px!important;

    width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:0!important;

    box-sizing:border-box!important;
  }

  .teacherMessagesReferencePage
  .replyComposer.messageAttachmentComposer
  .messageComposerMain textarea{
    display:block!important;

    flex:none!important;

    width:100%!important;
    min-width:0!important;

    height:48px!important;
    min-height:48px!important;
    max-height:88px!important;

    margin:0!important;
    padding:12px 13px!important;

    border:1px solid #e1e6ef!important;
    border-radius:14px!important;

    background:#fafbfd!important;

    color:#34445c!important;

    font-size:12px!important;
    line-height:1.35!important;

    resize:none!important;

    box-sizing:border-box!important;
  }

  .teacherMessagesReferencePage
  .replyComposer.messageAttachmentComposer
  .messageAttachmentPicker{
    display:block!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    margin:0!important;

    box-sizing:border-box!important;
  }

  .teacherMessagesReferencePage
  .replyComposer.messageAttachmentComposer
  .messageFilePickerButton{
    width:100%!important;
    max-width:100%!important;

    min-height:42px!important;

    justify-content:flex-start!important;

    margin:0!important;

    box-sizing:border-box!important;
  }

  /* Gönder sağ altta. */
  .teacherMessagesReferencePage
  .replyComposer.messageAttachmentComposer
  >button[type="submit"]{
    position:static!important;

    align-self:end!important;

    width:84px!important;
    min-width:84px!important;

    height:48px!important;
    min-height:48px!important;

    margin:0!important;
    padding:0 8px!important;

    border-radius:14px!important;

    transform:none!important;

    box-sizing:border-box!important;
  }

  /*
    Yeni mesaj kalemi:
    JS gerçek nav.top değerinden hesaplar.
  */
  .teacherMessagesReferencePage
  .teacherPmComposeFab{
    position:fixed!important;

    top:var(--ruya-teacher-fab-top,auto)!important;
    right:18px!important;
    bottom:auto!important;
    left:auto!important;

    margin:0!important;

    z-index:6100!important;

    transform:none!important;
  }

  /* Konuşma açıldığında kalem yok. */
  .teacherMessagesReferencePage
  .messagingLayout.teacherThreadSelected
  ~.teacherPmComposeFab{
    display:none!important;
  }
}


/* RUYA_TEACHER_DIRECT_MESSAGE_EMPTY_TEXT_V1 */
.teacherMessagesReferencePage .approvalNotice:empty,
.teacherMessagesReferencePage .teacherNewMessageCard .sectionHead p.muted:empty{
  display:none!important;
  margin:0!important;
  padding:0!important;
  min-height:0!important;
}
