.apiMethod {
    margin-bottom: 4rem;
    padding-top: 4rem;
}

.apiMethod__doc {
    padding-bottom: 3em;
}

.apiMethod__docHeader {
    margin-block: 1.2rem 3rem;
    font-size: .875rem;
}

.apiMethod__docHeader > div {
    display: flex;
    margin-bottom: .5rem;
    gap: .5em;
    align-items: baseline;
    line-height: 1.2;
}

.apiMethod__docHeader > div > :first-child {
    flex: 0 0 5em;
    font: 500 0.875rem/1.2rem var(--font-headings);
}

.apiMethod__value {
    opacity: .7;
}

.apiMethod__url {
    max-width: 100%;
    word-break: break-all;
    hyphens: none;
    white-space: unset;
}

/**
 * Scope
 */

.apiMethod__scopesTitle {
    min-width: 3.5rem;
    margin: 0;
}

/**
 * Last used
 */

/**
 * Method actions
 */

.apiMethod__actions {
    display: flex;
    justify-content: flex-end;
    gap: 2em;
    margin-block: .5rem 1.5rem;
}

/**
 * Call Parameters
 * table
 */

.apiMethod__parameters {
    position: relative;
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

.apiMethod__table {
    width: 100%;
    margin-block: 1rem 2rem;
    border-spacing: 0;
}

.apiMethod__table p {
    margin: 0;
}

.apiMethod__pmHead {
    position: absolute;
    left: -999em;
}

.apiMethod__pmRow {
    display: block;
    padding: .5rem 0;
    border-top: 1px solid #d4d0e0;
}

.apiMethod__pmRow td {
    padding: 0;
    vertical-align: baseline;
}

.apiMethod__pmName,
.apiMethod__pmType {
    display: inline-block;
}

.apiMethod__pmType {
    opacity: .5;
}

.apiMethod__pmDesc {
    opacity: .7;
}

.apiMethod__pmName {
    font: 500 1rem/1.2rem var(--font-headings);
}

.apiMethod__pmDesc {
    font-size: .875rem;
}

/**
 * Method label
 */

.apiMethod__method {
    display: inline-block;
    height: 1.2rem;
    min-width: 3.5rem;
    padding: 0 .4em;
    vertical-align: middle;
    border-radius: 0.3em;
    font: 500 .875rem/1.2rem arial, sans-serif;
    text-align: center;
    color: #000;
    background: #ccc;
}

h3 .apiMethod__method {
    vertical-align: middle;
}

.apiMethod__method--GET {
    background: #DAD2FF;
}

.apiMethod__method--POST {
    background: #CDF2EC;
}

.apiMethod__method--PUT {
    background: #ffcdac;
}

.apiMethod__method--DELETE {
    background: #ffd4d4;
}

/**
 * Respons status label
 */

.apiMethod__status::before {
    content: '•';
    display: inline-block;
    width: .4em;
    height: .4em;
    margin-right: .3em;
    border: 1px solid;
    border-radius: .2em;
    line-height: .4em;
    text-align: center;
    color: transparent;
    speak: none;
}

.apiMethod__status2::before {
    background: #a6e04c;
}

.apiMethod__status3::before {
    background: #e0b84c;
}

.apiMethod__status4::before {
    background: #e04c4c;
}



/**
 * Examples
 */

.apiMethod__example {
    margin-bottom: 3rem;
}

.apiMethod__inactive .fieldinput {
    position: relative;
    height: 100%;
    pointer-events: none;
}

.apiMethod__inactive div.field:not(.first) .fieldinput {
    opacity: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.apiMethod__inactive > div.field.last {
    visibility: hidden;
}

.apiMethod__example + .apiMethod__example {
     padding-top: 3rem;
     border-top: 1px solid #d4d0e0;
}

/*.apiMethod__examples .apiMethod__panel--empty {*/
/*    display: none;*/
/*}*/

.apiMethod__small {
    font-size: .875rem;
}

.apiMethod__examples .apiMethod__header::after {
    content: attr(data-suffix);
    margin-left: .3em;
    font-size: .875rem;
    opacity: .6;
}

.apiMethod__exampleBox {
    position: relative;/** give pre height */
    height: calc(100% - 3rem);
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 6px;
    color: rgba(255,255,255,.7);
    background: #313033;
}

.apiMethod__examples .apiMethod__sourceArea {
    display: none;
}

.apiMethod__sourceArea {
    height: calc(100% - 3rem);
}

.apiMethod__exampleBoxHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    padding: .5rem 1rem;
    background: #ffffff21;
}

.apiMethod__exampleBoxHeader .apiMethod__status {
    justify-self: flex-end;
}

.apiMethod__exampleBox .copy-to-clipboard-button::before {
    background: #ccc;
}

.apiMethod__source {
    height: 100%;
    padding: .5rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 6px;
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
    word-break: break-word;
    word-wrap: normal;
    hyphens: none;
    font-size: .875rem;
    color: #fff;
    background: #313033;
    color-scheme: dark;
}

.apiMethod pre,
.apiMethod code,
[contenteditable] {
    outline: none;
}

.apiMethod__validation {
    filter: invert(1) brightness(1.15) hue-rotate(180deg);
}

.apiMethod__validation + .toolbar button {
    filter: invert(1);
}

.ApiDocumentationView--compact .apiMethod__examples .apiMethod__source {
    max-height: 50ex;
}

.apiMethod__validation {
    height: 100ex;
}

@container main (min-width: 80em) {
    .ApiDocumentationView--compact .apiMethod__examples .apiMethod__source {
        max-height: max(50ex, 40dvh);
    }

    .ApiDocumentationView--compact .apiMethod__validation {
        height: max(100ex, 60dvh);
    }
}

.apiMethod__source code {
    color: inherit;
    background-color: inherit;
    display: block;
}

.apiMethod__label + .apiMethod__source {
    padding-top: 1.7em;
}

/**
 * test call
 */

.apiMethod__examples .apiMethod__exampleHeader {
    display: none;
}

/**
 * Live Test button
 */

.apiMethod__button {
    padding: .3em;
    font-family: var(--font-headings);
    line-height: 1;
    text-decoration: none;
}

[class*='apiMethod__button--icon']::before {
    content: '';
    display: inline-block;
    height: .8em;
    width: .8em;
    margin-right: .3em;
}

.apiMethod__button--pri {
    color: #fff;
    background-color: #481fff;
}

.apiMethod__button--icon-goto {
    padding-inline: 1em;
}

.apiMethod__button--icon-goto::before {
    mask-image: url(arrow-right.svg);
    -webkit-mask-image: url(arrow-right.svg);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: #fff;
}

.apiMethod__button--icon-logs::before {
    mask-image: url(history.svg);
    -webkit-mask-image: url(history.svg);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: #481fff;
}

.ApiDocumentationView--noJs .apiMethod__button--test {
    display: none;
}

/**
 * Layout
 */

@container main (min-width: 60em) {
    .ApiDocumentationView--compact .apiMethod {
        display: grid;
        grid-template-columns: repeat(2, calc(50% - 1rem));
        gap: 2rem;
    }

    .ApiDocumentationView--compact .apiMethod__doc {
        position: sticky;
        top: 0;
        align-self: start;
    }
}

