.app-restapi-page {
    height: 100vh;
    min-height: 0;
}

.app-restapi-page-body {
    min-height: 0;
}

.app-restapi-playground {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 360px;
    height: 100%;
    min-height: 0;
    background: var(--kiss-base-background-color);
    color: var(--kiss-base-text-color);
}

.app-restapi-sidebar,
.app-restapi-docs,
.app-restapi-console {
    min-height: 0;
}

.app-restapi-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--kiss-hr-color);
    background: var(--kiss-color-contrast);
}

.app-restapi-docs {
    overflow-y: auto;
    padding: 25px;
}

.app-restapi-console-scroll,
.app-restapi-sidebar-body {
    overflow-y: auto;
    min-height: 0;
}

.app-restapi-console-scroll {
    padding: 20px;
}

.app-restapi-sidebar-head,
.app-restapi-sidebar-search {
    padding: 20px;
}

.app-restapi-sidebar-search {
    padding-top: 0;
}

.app-restapi-spec-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 6px;
}

.app-restapi-tag-group {
    padding: 0 10px 10px;
}

.app-restapi-tag-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 600;
    font-size: .9em;
    border-radius: var(--app-border-radius);
    cursor: pointer;
}

.app-restapi-tag-toggle:hover {
    background: color-mix(in srgb, var(--kiss-base-text-color) 5%, transparent);
}

.app-restapi-operation-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    padding: 10px;
    border-radius: var(--app-border-radius);
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: all 250ms;
}

.app-restapi-operation-link:hover,
.app-restapi-operation-link.active {
    background: color-mix(in srgb, var(--kiss-base-text-color) 4%, transparent);
    border-color: var(--kiss-card-bordered-color);
}

.app-restapi-operation-link.active {
    border-color: color-mix(in srgb, var(--kiss-color-primary) 40%, transparent);
}

.app-restapi-operation-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-restapi-operation-summary {
    font-size: .85em;
    font-weight: 600;
}

.app-restapi-operation-path {
    font-size: .7em;
    color: var(--kiss-color-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-restapi-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 4px 8px;
    border-radius: var(--app-border-radius);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-restapi-method--get { background: #147d4b; }
.app-restapi-method--post { background: #1c75d8; }
.app-restapi-method--put { background: #9054ff; }
.app-restapi-method--patch { background: #a85d1a; }
.app-restapi-method--delete { background: #c33d3d; }
.app-restapi-method--head,
.app-restapi-method--options,
.app-restapi-method--trace { background: #55606f; }

.app-restapi-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 1.5rem;
}

.app-restapi-hero-path {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-restapi-path {
    font-size: 1.5rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.app-restapi-summary {
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1rem;
    max-width: 20ch;
}

.app-restapi-description {
    color: var(--kiss-color-muted);
    line-height: 1.6;
    font-size: .9em;
}

.app-restapi-description code {
    display: inline-block;
    padding: 1px 5px;
    border-radius: var(--app-border-radius);
    background: color-mix(in srgb, var(--kiss-color-primary) 12%, transparent);
    color: var(--kiss-base-text-color);
    font-size: .85em;
}

.app-restapi-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.app-restapi-section {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--app-border-radius);
    background: var(--kiss-card-theme-contrast-color);
    border: 1px solid var(--kiss-card-bordered-color);
}

.app-restapi-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.app-restapi-section-title {
    font-size: .9em;
    font-weight: 700;
}

.app-restapi-subtitle {
    font-size: .65em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    color: var(--kiss-color-muted);
    margin-bottom: 10px;
}

.app-restapi-parameter-table + .app-restapi-parameter-table,
.app-restapi-form-grid + .app-restapi-form-grid {
    margin-top: 1rem;
}

.app-restapi-parameter-row,
.app-restapi-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--kiss-hr-color);
}

.app-restapi-parameter-row:first-of-type,
.app-restapi-header-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.app-restapi-field {
    display: block;
}

.app-restapi-field + .app-restapi-field {
    margin-top: 14px;
}

.app-restapi-field-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.app-restapi-field-name,
.app-restapi-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-restapi-field-help {
    font-size: .8em;
    color: var(--kiss-color-muted);
    margin-bottom: 6px;
}

.app-restapi-codeblock {
    margin: 0;
    padding: 12px;
    border-radius: var(--app-border-radius);
    overflow: auto;
    background: var(--kiss-input-background);
    border: 1px solid var(--kiss-input-border-color);
    font-size: .8em;
    line-height: 1.6;
}

.app-restapi-response-doc + .app-restapi-response-doc {
    margin-top: 12px;
}

.app-restapi-actions {
    display: flex;
    margin-top: 1.5rem;
}

.app-restapi-url-preview {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--app-border-radius);
    background: var(--kiss-input-background);
    border: 1px solid var(--kiss-input-border-color);
    font-size: .8em;
    overflow-wrap: anywhere;
}

.app-restapi-auth-card + .app-restapi-auth-card {
    margin-top: 12px;
}

.app-restapi-tabbar {
    display: flex;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--kiss-hr-color);
}

.app-restapi-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 8px 14px;
    margin-bottom: -1px;
    background: transparent;
    color: var(--kiss-color-muted);
    font-size: .85em;
    font-weight: 600;
    letter-spacing: .05em;
    cursor: pointer;
    transition: all 250ms;
}

.app-restapi-tab:hover {
    color: var(--kiss-base-text-color);
}

.app-restapi-tab.active {
    border-bottom-color: var(--kiss-color-primary);
    color: var(--kiss-base-text-color);
}

.app-restapi-chip-button {
    border: 0;
    border-radius: var(--app-border-radius);
    padding: 5px 10px;
    background: color-mix(in srgb, var(--kiss-base-text-color) 7%, transparent);
    color: inherit;
    font-size: .75em;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms;
}

.app-restapi-chip-button.active {
    background: color-mix(in srgb, var(--kiss-color-primary) 18%, transparent);
    color: var(--kiss-base-text-color);
}

.app-restapi-json-view {
    padding: 12px;
    border-radius: var(--app-border-radius);
    background: var(--kiss-input-background);
    border: 1px solid var(--kiss-input-border-color);
    font-size: .8em;
    overflow: auto;
}

.app-restapi-json-node {
    line-height: 1.6;
}

.app-restapi-empty {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: var(--kiss-color-muted);
}

.app-restapi-header-table {
    border-radius: var(--app-border-radius);
    background: var(--kiss-input-background);
    border: 1px solid var(--kiss-input-border-color);
    padding: 12px;
}

.app-restapi-header-name {
    font-size: .7em;
    color: var(--kiss-color-muted);
}

.app-restapi-header-value {
    font-size: .8em;
    overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
    .app-restapi-playground {
        grid-template-columns: 260px minmax(0, 1fr) 320px;
    }

    .app-restapi-summary {
        font-size: 1.5rem;
    }
}

@media (max-width: 1080px) {
    .app-restapi-playground {
        display: block;
        overflow-y: auto;
    }

    .app-restapi-sidebar,
    .app-restapi-console {
        border: 0;
    }

    .app-restapi-docs,
    .app-restapi-console-scroll {
        padding: 15px;
    }

    .app-restapi-summary {
        max-width: none;
    }
}
