/* AcademicKey Student V8.6 — Marketplace Clean Grid */

body.ak83-marketplace .ak82-market-grid,
body.ak83-marketplace .ak83-market-grid,
body.ak83-marketplace .ak85-market-grid,
body.ak83-marketplace .ak86-market-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
  column-count:auto!important;
  column-gap:normal!important;
  align-items:start!important;
  width:100%!important;
}

body.ak83-marketplace .ak82-market-grid > *,
body.ak83-marketplace .ak83-market-grid > *,
body.ak83-marketplace .ak85-market-grid > *,
body.ak83-marketplace .ak86-market-grid > *{
  display:block!important;
  width:auto!important;
  margin:0!important;
  break-inside:auto!important;
  -webkit-column-break-inside:auto!important;
}

body.ak83-marketplace .ak82-course-card,
body.ak83-marketplace .ak83-course-card,
body.ak83-marketplace .ak85-course-card,
body.ak83-marketplace .ak86-course-card{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  align-self:start!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-radius:14px!important;
}

body.ak83-marketplace .ak86-course-card img{
  width:100%!important;
  height:150px!important;
  object-fit:cover!important;
}

body.ak83-marketplace .ak86-course-card h2,
body.ak83-marketplace .ak86-course-card h3,
body.ak83-marketplace .ak86-course-card h4{
  margin-block:8px 5px!important;
}

body.ak83-marketplace .ak86-course-card p{
  margin-block:5px!important;
}

body.ak83-marketplace .ak86-description{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  max-height:3.3em!important;
}

/* Compact group dashboard */
body.ak83-marketplace .ak-course-group-list{
  display:grid!important;
  gap:8px!important;
  margin-top:12px!important;
  padding:8px!important;
  border:1px solid rgba(37,211,218,.14)!important;
  border-radius:12px!important;
  background:rgba(2,24,35,.5)!important;
}

body.ak83-marketplace .ak-group-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 78px 112px!important;
  grid-template-areas:
    "meta meta status"
    "schedule schedule action"
    "start price action"!important;
  gap:6px 10px!important;
  align-items:center!important;
  min-width:0!important;
  margin:0!important;
  padding:10px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:10px!important;
  background:rgba(8,42,56,.72)!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

body.ak83-marketplace .ak-group-row:hover{
  border-color:rgba(37,211,218,.28)!important;
  background:rgba(9,48,63,.86)!important;
}

body.ak83-marketplace .ak-group-meta{
  grid-area:meta!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-width:0!important;
}

body.ak83-marketplace .ak-group-meta strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:.9rem!important;
  line-height:1.25!important;
  white-space:nowrap!important;
}

body.ak83-marketplace .ak-group-meta .pill{
  flex:0 0 auto!important;
  width:max-content!important;
  max-width:100%!important;
  font-size:.64rem!important;
}

body.ak83-marketplace .ak-group-schedule{
  grid-area:schedule!important;
  min-width:0!important;
  margin:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:.72rem!important;
  line-height:1.35!important;
  opacity:.78!important;
}

body.ak83-marketplace .ak-group-start{
  grid-area:start!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:4px 6px!important;
  gap:5px!important;
  border-radius:7px!important;
  background:rgba(25,196,202,.055)!important;
}

body.ak83-marketplace .ak-group-start span{
  flex:0 0 auto!important;
  font-size:.62rem!important;
  font-weight:700!important;
  opacity:.82!important;
}

body.ak83-marketplace .ak-group-start b{
  min-width:0!important;
  font-size:.7rem!important;
  white-space:nowrap!important;
}

body.ak83-marketplace .ak-group-price{
  grid-area:price!important;
  justify-self:end!important;
  margin:0!important;
  padding:0!important;
  font-size:.78rem!important;
  white-space:nowrap!important;
}

body.ak83-marketplace .ak-group-status{
  grid-area:status!important;
  justify-self:end!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  display:flex!important;
  justify-content:flex-end!important;
  gap:5px!important;
  font-size:.66rem!important;
  white-space:nowrap!important;
}

body.ak83-marketplace .ak-group-status > span:first-child{
  display:none!important;
}

body.ak83-marketplace .ak-group-availability{
  display:none!important;
}

body.ak83-marketplace .ak-group-row > details.booking-panel,
body.ak83-marketplace .ak-group-row > form,
body.ak83-marketplace .ak-group-row > button{
  grid-area:action!important;
  align-self:stretch!important;
  justify-self:end!important;
  width:100%!important;
  max-width:112px!important;
  margin:0!important;
}

body.ak83-marketplace .ak-group-row details.booking-panel > summary.group-book-cta,
body.ak83-marketplace .ak-group-row > form .btn,
body.ak83-marketplace .ak-group-row > button.btn{
  width:100%!important;
  min-height:36px!important;
  height:100%!important;
  padding:6px 8px!important;
  border-radius:8px!important;
  font-size:.72rem!important;
  font-weight:850!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}

/* Keep the compact CTA short while preserving the original accessible label in the DOM. */
body.ak83-marketplace .ak-group-row summary.group-book-cta span:last-child{
  font-size:0!important;
}

html[lang^="ar"] body.ak83-marketplace .ak-group-row summary.group-book-cta span:last-child::after{
  content:"احجز";
  font-size:.76rem;
}

html:not([lang^="ar"]) body.ak83-marketplace .ak-group-row summary.group-book-cta span:last-child::after{
  content:"Book";
  font-size:.76rem;
}

body.ak83-marketplace .ak86-extra-group{
  display:none!important;
}

body.ak83-marketplace .ak86-course-card.ak86-expanded .ak86-extra-group{
  display:grid!important;
}

.ak86-groups-toggle{
  width:100%;
  min-height:36px;
  margin-top:7px;
  border:1px solid #216479;
  background:#082f40;
  color:#bdf7fa;
  border-radius:9px;
  font-weight:750;
  font-size:.76rem;
  cursor:pointer;
}

.ak86-groups-toggle:hover{
  background:#0b4053;
}

body.ak83-marketplace .ak82-show-groups,
body.ak83-marketplace .ak83-show-groups{
  display:none!important;
}

body.ak83-marketplace .ak83-unavailable,
body.ak83-marketplace .ak86-unavailable{
  display:inline-flex!important;
  width:auto!important;
  max-width:100%!important;
  min-height:28px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:4px 9px!important;
  margin:7px 0!important;
  border-radius:999px!important;
  border:1px solid #5b5128!important;
  background:#332d18!important;
  color:#ffe798!important;
  font-size:.76rem!important;
  line-height:1.2!important;
}

body.ak83-marketplace .ak86-secondary-warning{
  display:none!important;
}

body.ak83-marketplace .ak86-course-card form[action="/student/book-course"] button,
body.ak83-marketplace .ak86-course-card form[action="/student/book-course"] input[type="submit"]{
  min-height:40px!important;
  border-radius:9px!important;
}

body.ak83-marketplace .ak86-details{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:34px!important;
  margin-top:7px!important;
  border:1px solid #1b586b!important;
  background:transparent!important;
  color:#aeeff2!important;
  border-radius:9px!important;
  text-decoration:none!important;
  font-size:.82rem!important;
}

body.ak83-marketplace .ak86-no-group-card{
  padding-bottom:12px!important;
}

@media(max-width:1000px){
  body.ak83-marketplace .ak82-market-grid,
  body.ak83-marketplace .ak83-market-grid,
  body.ak83-marketplace .ak85-market-grid,
  body.ak83-marketplace .ak86-market-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:680px){
  body.ak83-marketplace .ak82-market-grid,
  body.ak83-marketplace .ak83-market-grid,
  body.ak83-marketplace .ak85-market-grid,
  body.ak83-marketplace .ak86-market-grid{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  body.ak83-marketplace .ak86-course-card img{
    height:170px!important;
  }

  body.ak83-marketplace .ak-course-group-list{
    padding:6px!important;
  }

  body.ak83-marketplace .ak-group-row{
    grid-template-columns:1fr auto!important;
    grid-template-areas:
      "meta status"
      "schedule schedule"
      "start price"
      "action action"!important;
    gap:7px 8px!important;
    padding:10px!important;
    overflow:visible!important;
  }

  body.ak83-marketplace .ak-group-meta{
    display:grid!important;
    justify-items:start!important;
    gap:4px!important;
  }

  body.ak83-marketplace .ak-group-meta strong,
  body.ak83-marketplace .ak-group-schedule{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }

  body.ak83-marketplace .ak-group-status{
    justify-content:flex-end!important;
  }

  body.ak83-marketplace .ak-group-start{
    justify-content:flex-start!important;
  }

  body.ak83-marketplace .ak-group-row > details.booking-panel,
  body.ak83-marketplace .ak-group-row > form,
  body.ak83-marketplace .ak-group-row > button{
    justify-self:stretch!important;
    max-width:none!important;
  }

  body.ak83-marketplace .ak-group-row details.booking-panel > summary.group-book-cta,
  body.ak83-marketplace .ak-group-row > form .btn,
  body.ak83-marketplace .ak-group-row > button.btn{
    width:100%!important;
    min-height:40px!important;
  }
}
