/**
 * Page RHI v0.2.28 — Sejoli LMS catalog + certificate bridge.
 * All selectors are scoped so the LMS provider remains the data owner.
 */

/* Course catalog: target the real AJAX markup emitted by Sejoli LMS. */
.rhi-member-app-content--course .rhi-course-provider-wrap{
  width:100%;
  min-width:0;
  overflow:visible;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course-listing,
.rhi-member-app-content--course .rhi-course-provider-wrap .course_query{
  width:100%!important;
  min-width:0!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course-container{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  flex-wrap:wrap!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course-container > h2{
  min-width:0!important;
  margin:0!important;
  color:#3b2715!important;
  font-size:clamp(24px,3vw,36px)!important;
  line-height:1.2!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course-container .ui.icon.input{
  flex:0 1 330px!important;
  min-width:220px!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap #cari_course{
  width:100%!important;
  min-width:0!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course_query > .ui.grid.course-wrapper{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
  width:100%!important;
  min-width:0!important;
  margin:22px 0 0!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course_query > .ui.grid.course-wrapper > .column{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  padding:0!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card{
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  margin:0!important;
  overflow:hidden!important;
  border:1px solid #eadfce!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 10px 26px rgba(61,48,28,.08)!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .image{
  width:100%!important;
  aspect-ratio:16/9!important;
  overflow:hidden!important;
  background:#f5f1e9!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .image img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .content{
  min-width:0!important;
  padding:15px!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .content > .header,
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .content > .header a{
  display:block!important;
  min-width:0!important;
  color:#2d2117!important;
  font-size:17px!important;
  line-height:1.35!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  text-overflow:clip!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card .meta{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card .course-detail{
  min-width:0!important;
  font-size:13px!important;
  line-height:1.4!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.bottom.attached.buttons{
  min-width:0!important;
  flex-wrap:wrap!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .ui.bottom.attached.buttons > *{
  min-width:0!important;
}

@media(max-width:1180px){
  .rhi-member-app-content--course .rhi-course-provider-wrap .course_query > .ui.grid.course-wrapper{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:720px){
  .rhi-member-app-content--course .rhi-course-provider-wrap .course-container{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .course-container .ui.icon.input{
    width:100%!important;
    min-width:0!important;
    flex:1 1 auto!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .course_query > .ui.grid.course-wrapper{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card{
    display:grid!important;
    grid-template-columns:minmax(112px,34%) minmax(0,1fr)!important;
    grid-template-areas:
      "image content"
      "buttons buttons"
      "progress progress";
    align-items:stretch!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .image{
    grid-area:image!important;
    height:100%!important;
    min-height:150px!important;
    aspect-ratio:auto!important;
    border-radius:0!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .content{
    grid-area:content!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    padding:14px!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .ui.bottom.attached.buttons{
    grid-area:buttons!important;
    width:100%!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .ui.bottom.attached.progress{
    grid-area:progress!important;
    width:100%!important;
  }
}

@media(max-width:430px){
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card{
    grid-template-columns:104px minmax(0,1fr)!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .content > .header,
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card > .content > .header a{
    font-size:15px!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .ui.fluid.card .course-detail{
    font-size:12px!important;
  }
}

/* Certificate endpoint inside the Page RHI shell. */
body.page-rhi-lms-certificate{
  overflow-x:hidden!important;
  background:#f6f4f0!important;
}
.rhi-member-app-page--certificate{
  min-height:100svh;
  padding-bottom:34px;
}
.rhi-member-app-content--certificate,
.rhi-lms-certificate-embed{
  width:100%;
  min-width:0;
}
.rhi-lms-certificate-embed > h2.ui.header{
  margin:0 0 18px!important;
  color:#3b2715!important;
  font-family:inherit!important;
  font-size:clamp(26px,3vw,38px)!important;
  line-height:1.2!important;
}
.rhi-lms-certificate-embed .ui.message{
  border-radius:14px!important;
  box-shadow:none!important;
}
.rhi-lms-certificate-embed .dataTables_wrapper{
  width:100%!important;
  min-width:0!important;
}
.rhi-lms-certificate-embed .dataTables_length,
.rhi-lms-certificate-embed .dataTables_info,
.rhi-lms-certificate-embed .dataTables_paginate{
  color:#5f554a!important;
  font-family:inherit!important;
}
.rhi-lms-certificate-embed .dataTables_length select{
  min-height:40px!important;
  border:1px solid #ded4c4!important;
  border-radius:10px!important;
  background:#fff!important;
}
.rhi-lms-certificate-embed #sejoli-lms-sertificate_wrapper{
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
}
.rhi-lms-certificate-embed #sejoli-lms-sertificate{
  width:100%!important;
  min-width:760px!important;
  margin-top:14px!important;
  border:1px solid #e9dfcf!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.rhi-lms-certificate-embed #sejoli-lms-sertificate th,
.rhi-lms-certificate-embed #sejoli-lms-sertificate td{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
}
.rhi-lms-certificate-embed .ui.button{
  border-radius:10px!important;
  font-family:inherit!important;
}

@media(max-width:860px){
  .rhi-member-app-page--certificate{padding-bottom:126px!important}
  .rhi-member-app-content--certificate .rhi-member-app-workspace{padding:10px!important}
  .rhi-lms-certificate-embed #sejoli-lms-sertificate{min-width:680px!important}
}

/* v0.2.29 — keep catalog search controls inside the workspace. */
.rhi-member-app-content--course .rhi-course-provider-wrap .course-container .ui.icon.input{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:stretch!important;
  width:min(100%,390px)!important;
  max-width:100%!important;
  min-width:0!important;
  flex:0 1 390px!important;
  gap:0!important;
  overflow:hidden!important;
  border-radius:11px!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course-container #cari_course{
  position:static!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  border-radius:11px 0 0 11px!important;
  box-sizing:border-box!important;
}
.rhi-member-app-content--course .rhi-course-provider-wrap .course-container #search_course{
  position:static!important;
  inset:auto!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto!important;
  max-width:108px!important;
  min-width:72px!important;
  margin:0!important;
  padding-inline:13px!important;
  border-radius:0 11px 11px 0!important;
  box-sizing:border-box!important;
}

/* Certificate uses the same conflict-resistant shell structure as Profile. */
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-sidebar,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-header,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-workspace,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-home-greeting,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-home-header-actions{
  visibility:visible!important;
  opacity:1!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav{
  display:grid!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>.rhi-home-nav-link,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-header>.rhi-home-greeting,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-header>.rhi-home-header-actions{
  display:flex!important;
}

@media(max-width:720px){
  .rhi-member-app-content--course .rhi-course-provider-wrap .course-container .ui.icon.input{
    width:100%!important;
    max-width:100%!important;
    flex:1 1 auto!important;
  }
}
@media(max-width:482px){
  .rhi-member-app-content--course .rhi-course-provider-wrap .course-container #search_course{
    display:none!important;
  }
  .rhi-member-app-content--course .rhi-course-provider-wrap .course-container #cari_course{
    border-radius:11px!important;
  }
}

/* v0.2.30 — Certificate shell menu must remain fully visible despite legacy LMS selectors. */
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav{
  position:relative!important;
  z-index:70!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  width:100%!important;
  padding-inline:8px!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>a.rhi-home-nav-link{
  position:relative!important;
  z-index:71!important;
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  padding:10px 16px 10px 24px!important;
  gap:14px!important;
  color:rgba(255,255,255,.88)!important;
  font-family:Inter,Poppins,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.25!important;
  text-indent:0!important;
  visibility:visible!important;
  opacity:1!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>a.rhi-home-nav-link.is-active{
  color:#3a250f!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>a.rhi-home-nav-link>span,
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>a.rhi-home-nav-link>img{
  position:static!important;
  display:block!important;
  width:auto;
  height:auto;
  margin:0!important;
  padding:0!important;
  clip:auto!important;
  clip-path:none!important;
  color:inherit!important;
  visibility:visible!important;
  opacity:1!important;
  transform:none!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>a.rhi-home-nav-link>img{
  width:20px!important;
  height:20px!important;
  flex:0 0 20px!important;
}
body.page-rhi-lms-certificate .rhi-profile-shell-fix .rhi-profile-shell-side-nav>a.rhi-home-nav-link>span{
  flex:1 1 auto!important;
  min-width:0!important;
  white-space:normal!important;
}
