/* ============================================================================
   studio-overrides.css  —  loaded LAST, so it wins.
   Global design rules + targeted fixes. Cosmetic only.
   ========================================================================== */

/* --- GLOBAL RULE 1: no rounded corners anywhere (spinners stay circular) --- */
.studio-shell-body *,
.studio-shell-body *::before,
.studio-shell-body *::after {
    border-radius: 0 !important;
}
.studio-shell-body .spinner-border,
.studio-shell-body .spinner-border-sm {
    border-radius: 50% !important;
}

/* --- GLOBAL RULE 2: full-width layout (keep side padding for breathing room) --- */
/* border-box so width:100% + side padding fits the viewport instead of overflowing
   by 2x the padding (which caused the horizontal scrollbar / cut-off right edge). */
.studio-shell-container {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* ============================================================================
   PROCEDURES (Assistant Details) — stop the AVA-style wall of text
   ========================================================================== */

/* Header: left-align and clamp the long system-prompt subtitle to 2 lines */
.studio-detail-accordion-button {
    text-align: left !important;
    justify-content: flex-start !important;
}
.studio-detail-accordion-title-wrap {
    text-align: left !important;
    align-items: flex-start !important;
}
.studio-detail-accordion-title {
    text-align: left !important;
}
.studio-detail-accordion-subtitle {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left !important;
    max-width: 940px;
    line-height: 1.5;
}

/* Parameter rows: stack name / badge / value, and bound long constant values
   into a tidy scrollable block instead of a page-long wall. */
.studio-detail-page .studio-parameter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
}
.studio-detail-page .studio-parameter-meta {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100%;
    min-width: 0;
}
.studio-detail-page .studio-parameter-value {
    display: block !important;
    width: 100%;
    max-height: 118px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--app-bg-2) !important;
    border: 1px solid var(--line) !important;
    padding: 8px 10px !important;
    line-height: 1.55;
}
.studio-detail-page .studio-parameter-value-empty {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}

/* ============================================================================
   RUN PROCEDURE MODAL — the offcanvas nested inside the modal renders inline
   (the modal's transform breaks its fixed positioning). Hide it until active.
   ========================================================================== */
.studio-run-modal .studio-step-canvas:not(.show) {
    display: none !important;
}
/* When it IS shown, pin it to the viewport instead of the transformed modal */
.studio-run-modal .studio-step-canvas.show {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100% !important;
    z-index: 1090 !important;
}

/* ============================================================================
   CREATE / EDIT AGENT form — kill the doubled field spacing (grid gap owns it)
   ========================================================================== */
.studio-form-grid .studio-form-field {
    margin-bottom: 0 !important;
}
.studio-form-aside {
    align-self: start;
}

/* Footer: shorthand "padding: 36px 0" zeroed the side padding — restore it so
   the footer aligns with the rest of the page instead of hugging the edge. */
.studio-footer-inner {
    padding-left: var(--shell-px) !important;
    padding-right: var(--shell-px) !important;
}
