/* Local dev: context modal scroll + sticky save */
.modal-backdrop-custom {
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1.25rem 1rem 2rem;
  overscroll-behavior: contain;
}

.context-modal-card {
  width: 100%;
  max-width: 440px;
  max-height: none;
  margin: auto;
  flex-shrink: 0;
}

.context-modal-card .form-text {
  margin-bottom: 0;
}

.context-modal-card .d-grid.gap-2 {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  background: var(--up-card-bg);
  border-top: 1px solid var(--up-card-border);
}

/* Try Out: tabla de campos dentro de la única card Body */
.tryout-schema-in-body .tryout-schema-hint {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--up-text-muted, #6c757d);
}

.tryout-schema-in-body .tryout-schema-table-wrap {
  max-height: min(26rem, 48vh);
  overflow: auto;
  margin: 0;
  border: 1px solid var(--up-card-border, rgba(0, 0, 0, 0.08));
  border-radius: 0.375rem;
  background: var(--up-surface-1, #fff);
}

.tryout-schema-in-body .tryout-schema-table-wrap table.endpoint-table {
  width: 100%;
  min-width: 42rem;
  table-layout: fixed;
  margin-bottom: 0;
}

/* Anula .endpoint-table .is-narrow { width: 1% } que aplasta Tipo y Req. */
.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table th.is-narrow,
.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table td.is-narrow {
  width: auto;
  white-space: nowrap;
}

.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table thead th:nth-child(1),
.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table tbody tr:not(.schema-ref-row) > td:nth-child(1) {
  width: 24%;
  min-width: 9rem;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table thead th:nth-child(2),
.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table tbody tr:not(.schema-ref-row) > td:nth-child(2) {
  width: 30%;
  min-width: 10rem;
  max-width: 12.5rem;
  overflow: hidden;
}

.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table thead th:nth-child(3),
.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table tbody tr:not(.schema-ref-row) > td:nth-child(3) {
  width: 5.25rem;
  min-width: 5.25rem;
  max-width: 5.25rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  text-align: center;
  box-sizing: border-box;
}

.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table thead th:nth-child(4),
.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table tbody tr:not(.schema-ref-row) > td:nth-child(4) {
  width: auto;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.tryout-schema-in-body .tryout-schema-table-wrap .endpoint-table tbody td.mono.has-tooltip {
  word-break: keep-all;
  overflow-wrap: normal;
}

.tryout-schema-in-body .tryout-schema-table-wrap td.mono,
.tryout-schema-in-body .tryout-schema-table-wrap th {
  vertical-align: top;
}

.tryout-schema-in-body .schema-ref-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.tryout-schema-in-body .schema-ref-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tryout-schema-in-body .schema-ref-panel {
  padding: 0.5rem 0.75rem 0.75rem;
  background: var(--up-surface-2, rgba(0, 0, 0, 0.02));
  border-radius: 0.375rem;
}

.tryout-schema-in-body .schema-ref-panel__title {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}
