/* Classeto v7.8 - teacher services management: responsive-only layout fix.
   Scoped deliberately to /services: no change to admin billing or public pages. */
.cl-services-layout,
.cl-services-layout > .panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.cl-services-layout > .panel {
  overflow-wrap: anywhere;
}
.cl-services-layout .field,
.cl-services-layout form,
.cl-services-layout .list,
.cl-services-layout .listrow,
.cl-services-layout .listrow .meta {
  min-width: 0;
  max-width: 100%;
}
.cl-services-layout .field :is(input,textarea,select) {
  box-sizing: border-box;
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.cl-services-layout .field textarea { overflow-wrap: anywhere; }
.cl-services-layout .listrow .meta :is(b,small) {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Original app.css places a later .g-main rule AFTER its general mobile query.
   Therefore the one-column override needs its own stronger selector. */
@media (max-width: 1150px) {
  .app-shell .content .grid.g-main.cl-services-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 16px;
    align-items: start;
    width: 100%;
    max-width: 100%;
  }
  .app-shell .content .grid.g-main.cl-services-layout > .panel {
    width: 100%;
    min-width: 0;
    margin: 0;
  }
}

@media (max-width: 650px) {
  .app-shell .content .grid.g-main.cl-services-layout { gap: 14px; }
  .cl-services-layout > .panel { padding: 17px 15px; }
  .cl-services-layout > .panel h2 { font-size: 1.04rem; line-height: 1.65; }
  .cl-services-layout .field label { font-size: .84rem; }
  .cl-services-layout .field :is(input,textarea,select) { font-size: 16px; }
  .cl-services-layout .listrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 10px;
    width: 100%;
  }
  .cl-services-layout .listrow .demo-list-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    margin: 0;
  }
  .cl-services-layout .listrow .meta {
    flex: 1 1 calc(100% - 64px);
    min-width: 0;
    margin: 0;
  }
  .cl-services-layout .listrow > a.btn,
  .cl-services-layout .listrow > form {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    margin-top: 2px;
    box-sizing: border-box;
  }
  .cl-services-layout .listrow > a.btn,
  .cl-services-layout .listrow > form .btn { width: 100%; min-height: 40px; }
  .cl-services-layout .listrow .btn { white-space: normal; line-height: 1.5; }
  .cl-services-layout .empty { padding: 24px 14px; }
}

/* Native horizontal tab scrolling stays usable but the thick track is hidden. */
@media (max-width: 800px) {
  .app-shell .workspace-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .app-shell .workspace-tabs::-webkit-scrollbar { display: none; }
}
