/* V9 mobile + payment reliability fixes */
@media (max-width: 767.98px){
  .lc-stack-table-mobile{overflow:visible!important}
  .lc-stack-table-mobile table,
  .lc-stack-table-mobile tbody,
  .lc-stack-table-mobile tr,
  .lc-stack-table-mobile td{display:block;width:100%!important}
  .lc-stack-table-mobile tbody tr{
    padding:14px 0;
    border-bottom:1px solid #eef2f7;
  }
  .lc-stack-table-mobile tbody tr:last-child{border-bottom:none}
  .lc-stack-table-mobile td{
    padding:0!important;
    border:0!important;
    text-align:left!important;
    white-space:normal!important;
  }
  .lc-stack-table-mobile td:first-child{
    color:#8692a6!important;
    font-size:.88rem;
    margin-bottom:4px;
  }
  .lc-stack-table-mobile td:last-child{
    color:#1f2f46!important;
    font-weight:700;
    word-break:break-word;
  }
  .lc-stack-table-mobile .btn{
    margin-top:8px;
  }
}

@media (max-width: 575.98px){
  .modal-mobile-sheet .modal-dialog{
    margin:0;
    max-width:100%;
    height:100%;
    min-height:100%;
  }
  .modal-mobile-sheet .modal-content{
    min-height:100dvh;
    border:0;
    border-radius:18px 18px 0 0;
  }
  .modal-mobile-sheet .modal-header{
    position:sticky;
    top:0;
    z-index:2;
    background:#fff;
    padding:18px 18px 14px;
    box-shadow:0 1px 0 rgba(15,23,42,.06);
  }
  .modal-mobile-sheet .modal-body{
    padding:16px 18px 96px;
  }
  .modal-mobile-sheet .modal-footer{
    position:sticky;
    bottom:0;
    z-index:2;
    background:#fff;
    padding:14px 18px calc(14px + env(safe-area-inset-bottom));
    box-shadow:0 -1px 0 rgba(15,23,42,.06);
  }
  .modal-mobile-sheet .row.g-2 > [class*="col-"],
  .modal-mobile-sheet .row.g-3 > [class*="col-"],
  .modal-mobile-sheet .row.g-4 > [class*="col-"]{
    width:100%;
    flex:0 0 100%;
  }
  .modal-mobile-sheet .form-label{
    font-weight:700;
  }
}

/* V10 client-wide narrow-screen audit */
@media (max-width: 767.98px){
  html,body{max-width:100%;overflow-x:hidden}
  .lc-content-wrap,.container-xl,.container-fluid{max-width:100%!important}
  .page-title-box.d-sm-flex{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:10px!important}
  .page-title-box .page-title-right{width:100%!important;margin-top:0!important}
  .page-title-box .breadcrumb{max-width:100%!important;overflow-x:auto!important;white-space:nowrap!important}
  .checkout-card,.checkout-summary-card,.purchase-shell-card{width:100%!important;max-width:100%!important}
  .checkout-summary-card{position:static!important;top:auto!important}
  .duration-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .duration-grid .btn{width:100%!important}
  .input-group{flex-wrap:nowrap!important}
  .input-group>.form-control,.input-group>.form-select{min-width:0!important}
  .input-group>.btn{flex:0 0 auto!important;padding-left:12px!important;padding-right:12px!important}
  .table-responsive{max-width:100%!important;-webkit-overflow-scrolling:touch}
  .overflow-x-auto{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .overflow-x-auto>table{min-width:720px}
  .website-detail-main{aspect-ratio:16/10!important;height:auto!important}
  .website-detail-main img{width:100%!important;height:100%!important}
  .website-thumb-row{overflow-x:auto!important;display:flex!important;flex-wrap:nowrap!important;padding-bottom:4px}
  .website-thumb{flex:0 0 76px!important}
  .lc-host-summary-grid,.lc-reseller-summary-grid{grid-template-columns:1fr!important}
  .lc-host-main-grid,.lc-reseller-main-grid{grid-template-columns:1fr!important}
  .lc-host-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .lc-host-info-list>div{grid-template-columns:1fr!important;gap:5px!important}
  .lc-host-info-list>div>span{font-size:.75rem!important}
  .lc-host-info-list>div>strong{font-size:.86rem!important;word-break:break-word!important}
  .lc-ns-row{align-items:flex-start!important;flex-direction:column!important}
  .lc-ns-row .lc-btn{width:100%!important}
  .topup-qr-box img{max-width:min(240px,100%)!important;height:auto!important}
  .tl-dashboard-actions{grid-template-columns:1fr!important}
  .source-checkout-card .card-body,.reseller-checkout-card .card-body{padding:15px!important}
}
@media (max-width: 420px){
  .duration-grid{grid-template-columns:1fr!important}
  .lc-host-tools-grid{grid-template-columns:1fr!important}
  .card-body{padding:14px!important}
  .card-header{padding:13px 14px!important}
}

/* Website checkout is now a real route; legacy content-section visibility must never hide it. */
.website-checkout-page{display:block!important;visibility:visible!important;opacity:1!important;min-height:1px!important}
.website-checkout-page .checkout-summary-card{overflow:hidden!important}

@media (max-width: 575.98px){
  .modal:not(.modal-mobile-sheet) .modal-dialog{
    margin:8px!important;
    min-height:calc(100% - 16px)!important;
  }
  .modal:not(.modal-mobile-sheet) .modal-content{
    max-height:calc(100dvh - 16px)!important;
    border-radius:18px!important;
    overflow:hidden!important;
  }
  .modal:not(.modal-mobile-sheet) .modal-header{padding:15px 16px!important}
  .modal:not(.modal-mobile-sheet) .modal-body{padding:16px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .modal:not(.modal-mobile-sheet) .modal-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))!important}
  .modal:not(.modal-mobile-sheet) .modal-footer .btn{flex:1 1 auto!important}
  .lc-table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .lc-table{min-width:680px}
  .lc-kv-row{align-items:flex-start!important}
  .lc-kv-row strong{max-width:58%!important;text-align:right!important;white-space:normal!important;overflow-wrap:anywhere!important}
}

/* V18.9: compact password/copy actions on mobile */
@media (max-width:575.98px){
  .lc-host-info-list>div,.lc-reseller-info-list>div{grid-template-columns:86px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important}
  .lc-host-info-list>div>span,.lc-reseller-info-list>div>span{grid-column:1!important}
  .lc-host-info-list>div>strong,.lc-reseller-info-list>div>strong{grid-column:2!important;min-width:0!important}
  .lc-host-info-list .lc-copy-btn,.lc-reseller-info-list .lc-reseller-copy{grid-column:auto!important;width:32px!important;height:32px!important;min-width:32px!important;padding:0!important;display:inline-grid!important;place-items:center!important}
  .lc-host-info-list>div .lc-copy-btn:nth-of-type(2),.lc-reseller-info-list>div .lc-reseller-copy:nth-of-type(2){display:none!important}
}
