/*
 * Override conflicting rules from swagger-ui-base.css that cause the API
 * endpoint path to render vertically (one character per line) in Material theme.
 *
 * swagger-ui-base.css sets max-width:calc(100% - 110px - 15rem) which resolves
 * to a near-zero value in the MkDocs Material theme layout context, combined
 * with word-break:break-word this forces character-by-character line wrapping.
 */
.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-path__deprecated {
    max-width: none;
    word-break: normal;
    flex-shrink: 1;
    overflow-wrap: anywhere;
}

/* Align description left edge with path text (path has padding: 0 10px). */
.swagger-ui .opblock .opblock-summary-description {
    padding: 0 10px;
}

/* Control button fills available space in the summary flex row. */
.swagger-ui .opblock .opblock-summary-control {
    flex: 1;
    min-width: 0;
}

/* Path-description wrapper fills the control button, pushing copy icon to the right. */
.swagger-ui .opblock-summary-path-description-wrapper {
    flex: 1;
    min-width: 0;
}

/* Method badge must not shrink — "DELETE" should never wrap to two lines. */
.swagger-ui .opblock .opblock-summary-method {
    flex-shrink: 0;
}

/* swagger-ui-base.css uses right: 100px to "hide" the copy icon by
 * displacing it. With our max-width: none fix the path is now wide so the
 * displaced button is visible in the wrong spot. Replace the positional
 * hide trick with opacity so the button sits at the correct position always
 * and fades in on hover instead. */
.swagger-ui .copy-to-clipboard {
    right: 0;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.swagger-ui .opblock-summary:hover .copy-to-clipboard,
.swagger-ui .opblock.is-open .opblock-summary .copy-to-clipboard {
    opacity: 1;
}
