/* STI Student Management Suite v2.4.331 — Fees & Payments mobile checkout refinement.
   UI only: payment data, Razorpay checkout, due dates, links and desktop styles are unchanged.
   This late-loaded stylesheet only affects the dedicated Fees portal at <=700px. */
@media (max-width:700px) {
  /* Keep payment section readable, without redundant boxed layers. */
  body .mye-student-portal .mye-portal-card {
    padding:13px!important;
    margin-bottom:10px!important;
    border-radius:15px!important;
  }
  body .mye-student-portal .mye-portal-card-head {
    margin-bottom:9px!important;
    align-items:flex-start!important;
    gap:8px!important;
  }
  body .mye-student-portal .mye-portal-card h2 {
    font-size:16px!important;
    line-height:1.25!important;
  }
  body .mye-student-portal .mye-portal-card p {
    font-size:11px!important;
    line-height:1.4!important;
  }
  body .mye-student-portal .mye-count {
    padding:6px 8px!important;
    font-size:10px!important;
  }
  body .mye-student-portal .mye-course-list {gap:9px!important}
  body .mye-student-portal .mye-course-item {
    padding:12px!important;
    gap:9px!important;
    border-radius:12px!important;
    border:1px solid #dde7f5!important;
    box-shadow:none!important;
  }
  body .mye-student-portal .mye-course-title-row {
    align-items:center!important;
    gap:7px!important;
  }
  body .mye-student-portal .mye-course-title-row > strong {
    font-size:15px!important;
    line-height:1.2!important;
  }
  body .mye-student-portal .mye-course-title-row .mye-pill {
    font-size:10px!important;
    padding:4px 7px!important;
  }
  body .mye-student-portal .mye-course-meta-row {margin-top:3px!important}
  body .mye-student-portal .mye-course-meta-row small {
    font-size:10.5px!important;
    line-height:1.35!important;
  }
  body .mye-student-portal .mye-fee-progress-wide {
    height:6px!important;
    margin-top:8px!important;
  }
  body .mye-student-portal .mye-inline-installments {
    margin-top:8px!important;
    border-radius:9px!important;
    background:#fbfcff!important;
  }
  body .mye-student-portal .mye-inline-installments-row,
  body .mye-student-portal .mye-inline-installments-row > div {
    min-height:47px!important;
  }
  body .mye-student-portal .mye-inline-installments-row > div {padding:7px 9px!important}
  body .mye-student-portal .mye-inline-simple-field small {
    margin-bottom:2px!important;
    font-size:10px!important;
    line-height:1.25!important;
  }
  body .mye-student-portal .mye-inline-simple-field strong {
    margin-top:2px!important;
    font-size:11.5px!important;
    line-height:1.25!important;
  }
  body .mye-student-portal .mye-inline-simple-field.amount strong {color:#b45309!important}

  /* A single internal divider is enough: eliminate border-on-border nesting. */
  body .mye-student-portal .mye-course-payment {
    padding:10px 0 0!important;
    margin:0!important;
    border-top:1px solid #e6edf7!important;
  }
  body .mye-student-portal .mye-rzp-rail {
    width:100%!important;
    max-width:none!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }
  body .mye-student-portal .mye-rzp-rail-head {
    margin:0 0 8px!important;
    gap:8px!important;
    min-width:0!important;
  }
  body .mye-student-portal .mye-rzp-rail-brand {
    font-size:10px!important;
    line-height:1.3!important;
    letter-spacing:.045em!important;
  }
  body .mye-student-portal .mye-rzp-powered {
    font-size:10px!important;
    padding:4px 7px!important;
  }
  body .mye-student-portal .mye-rzp-rail-amount {
    padding:0 0 8px!important;
    margin:0 0 8px!important;
    border-bottom:1px solid #e6edf7!important;
  }
  body .mye-student-portal .mye-rzp-rail-amount span {
    font-size:10px!important;
    line-height:1.3!important;
  }
  body .mye-student-portal .mye-rzp-rail-amount strong {
    margin-top:4px!important;
    font-size:23px!important;
    line-height:1.14!important;
    font-variant-numeric:tabular-nums!important;
  }
  body .mye-student-portal .mye-pay-razorpay-btn {
    min-height:48px!important;
    margin-top:8px!important;
    padding:10px 12px!important;
    border-radius:10px!important;
  }
  body .mye-student-portal .mye-rzp-pay-main {
    font-size:12px!important;
    line-height:1.3!important;
  }
  body .mye-student-portal .mye-rzp-rail-meta {
    margin-top:9px!important;
    gap:4px 7px!important;
    font-size:9.5px!important;
    line-height:1.3!important;
  }
  /* The part-payment option stays optional but becomes a usable tap target. */
  body .mye-student-portal .mye-pay-custom-wrap {
    display:flex!important;
    align-items:stretch!important;
    gap:6px!important;
    margin-top:10px!important;
    width:100%!important;
  }
  body .mye-student-portal .mye-pay-custom-toggle {
    width:100%!important;
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:9px 12px!important;
    background:#f1f6ff!important;
    color:#245ac0!important;
    border:1px solid #dce8fa!important;
    border-radius:10px!important;
    font-size:11.5px!important;
    font-weight:800!important;
    text-decoration:none!important;
    text-align:left!important;
  }
  body .mye-student-portal .mye-pay-custom-toggle:after {
    content:'⌄';
    margin-left:8px;
    font-size:16px;
    line-height:1;
    font-weight:800;
  }
  body .mye-student-portal .mye-pay-custom-toggle[aria-expanded="true"]:after {
    content:'⌃';
  }
  body .mye-student-portal .mye-pay-custom-wrap .mye-pay-custom.is-open {
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    margin-top:4px!important;
    gap:8px!important;
  }
  body .mye-student-portal .mye-pay-custom .mye-pay-amount {
    min-height:42px!important;
    font-size:13px!important;
  }
  body .mye-student-portal .mye-pay-status {margin-top:5px!important}
  body .mye-student-portal .mye-fee-managed-note {
    margin-top:10px!important;
    padding:9px 10px!important;
    line-height:1.45!important;
  }

  /* When no payments exist, display a readable empty state, not a 640px-wide scroller. */
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table td.mye-empty) .mye-payment-table {
    min-width:0!important;
    width:100%!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table td.mye-empty) .mye-payment-table thead {display:none!important}
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table td.mye-empty) .mye-payment-table td.mye-empty {
    padding:13px 10px!important;
    white-space:normal!important;
    font-size:11px!important;
    line-height:1.5!important;
    border:1px dashed #dbe5f2!important;
    border-radius:10px!important;
    background:#f8fbff!important;
  }
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table td.mye-empty) .mye-payment-table td.mye-empty strong {
    display:block!important;
    margin-bottom:4px!important;
  }
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table td.mye-empty) .mye-payment-table tr {display:block!important}
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table td.mye-empty) .mye-payment-table tbody {display:block!important}

  /* Keep final scroll content above the fixed mobile bar. */
  body .mye-student-portal {
    padding-bottom:calc(148px + env(safe-area-inset-bottom,0px))!important;
  }
  body .mye-student-portal .mye-pay-razorpay-btn,
  body .mye-student-portal .mye-pay-custom-toggle,
  body .mye-student-portal .mye-portal-card:has(.mye-payment-table) {
    scroll-margin-bottom:calc(105px + env(safe-area-inset-bottom,0px))!important;
  }
}
@media (max-width:365px) {
  body .mye-student-portal .mye-portal-card {padding:11px!important}
  body .mye-student-portal .mye-course-item {padding:10px!important}
  body .mye-student-portal .mye-rzp-rail-brand {font-size:9px!important}
  body .mye-student-portal .mye-rzp-rail-amount strong {font-size:21px!important}
  body .mye-student-portal .mye-pay-razorpay-btn {padding:10px!important}
  body .mye-student-portal .mye-rzp-pay-main {font-size:11.5px!important}
}
