body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 20px;
  background: #f5f5f7;
  color: #222;
}
h1 {
  margin-bottom: 10px;
}
h2 {
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
  margin-top: 30px;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.toolbar input[type="search"] {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 260px;
}
.toolbar .meta {
  font-size: 0.85rem;
  color: #555;
}

/* Group bar */
.group-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}
.group-pill {
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  background: #fff;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.group-pill.active {
  background: #1976d2;
  border-color: #1976d2;
  color: #fff;
}

details {
  margin-bottom: 10px;
  border: 1px solid #ddd;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
}
summary {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}

code {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  background: #f0f0f0;
  padding: 2px 4px;
  border-radius: 4px;
}

.endpoint-desc {
  font-size: 0.85rem;
  color: #555;
}

.endpoint-body {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.section {
  margin-top: 8px;
}
.section-title {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}
pre {
  background: #f7f7f7;
  padding: 8px;
  overflow-x: auto;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Method badges */
.methods {
  display: inline-flex;
  gap: 4px;
  margin-right: 4px;
}
.method {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.method-get {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #0d47a1;
}
.method-post {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
}
.method-put {
  background: #fff3e0;
  border-color: #ffb74d;
  color: #e65100;
}
.method-delete {
  background: #ffebee;
  border-color: #ef9a9a;
  color: #b71c1c;
}
.method-other {
  background: #eceff1;
  border-color: #b0bec5;
  color: #455a64;
}

/* AI notes list */
.ai-notes {
  padding-left: 18px;
  margin: 4px 0 0 0;
}

.log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #f4f4f4;
  padding: 10px;
  margin-top: 10px;
  border-left: 5px solid #999;
  font-size: 0.85rem;
  max-height: 250px;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}




/*Try-it modal */


/* Overlay */
#tryit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#tryit-overlay.open {
    display: flex;
}

/* Modal box — matches existing card style (white bg, border, border-radius: 8px) */
#tryit-modal {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: min(660px, 95vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #222;
}

/* Header — light grey like toolbar area */
#tryit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    background: #f5f5f7;
    flex-shrink: 0;
}
#tryit-header .tryit-methods { display: flex; gap: 4px; }
#tryit-header code {
    font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #222;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#tryit-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s;
}
#tryit-close:hover { color: #b71c1c; }

/* Body */
#tryit-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Field group */
.tryit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tryit-field label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tryit-field label .required-badge {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
}
.tryit-field label .optional-badge {
    background: #eceff1;
    border: 1px solid #b0bec5;
    color: #455a64;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 999px;
}
.tryit-field .field-desc {
    font-size: 0.8rem;
    color: #777;
}
.tryit-field input,
.tryit-field textarea {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #222;
    font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.tryit-field input:focus,
.tryit-field textarea:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.12);
}
.tryit-field textarea {
    min-height: 72px;
    resize: vertical;
}

/* Body editor (POST) — matches pre style */
#tryit-body-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#tryit-body-section > label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}
#tryit-body-editor {
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #222;
    font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    padding: 8px;
    min-height: 90px;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}
#tryit-body-editor:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.12);
}

/* Send button — matches .group-pill.active */
#tryit-send {
    background: #1976d2;
    color: #fff;
    border: 1px solid #1976d2;
    border-radius: 999px;
    padding: 6px 18px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-start;
}
#tryit-send:hover { background: #1565c0; border-color: #1565c0; }
#tryit-send:active { background: #0d47a1; }
#tryit-send:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #888;
    cursor: not-allowed;
}

/* Response area */
#tryit-response {
    display: none;
    flex-direction: column;
    gap: 6px;
}
#tryit-response.visible { display: flex; }

#tryit-response-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}
.resp-status {
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid transparent;
}
.resp-status.ok   { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.resp-status.err  { background: #ffebee; border-color: #ef9a9a; color: #b71c1c; }
.resp-status.warn { background: #fff3e0; border-color: #ffb74d; color: #e65100; }
.resp-latency { color: #888; font-size: 0.8rem; }

/* Response body — inherits pre style */
#tryit-response-body {
    background: #f7f7f7;
    padding: 8px;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 260px;
    margin: 0;
    color: #222;
    border-left: 3px solid #1976d2;
}

/* Divider */
.tryit-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 0;
}

/* Empty state */
.tryit-no-params {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* Try it button on each endpoint summary */
.tryit-btn {
    margin-left: auto;
    background: #fff;
    border: 1px solid #1976d2;
    border-radius: 999px;
    color: #1976d2;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s ease, color 0.1s ease;
    flex-shrink: 0;
}
.tryit-btn:hover {
    background: #1976d2;
    color: #fff;
}