﻿/* 
    ---------------------------------------------------
    Swagger UI Customization (Server API Documentation)
    ---------------------------------------------------
*/

html {
    box-sizing: border-box;
    overflow-y: scroll;
}
*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: #fff;
    overflow-x: hidden;
}

#swagger-ui {
    min-height: 100vh;
}

.swagger-ui {
    padding-bottom: 20px;
}

    .swagger-ui .wrapper {
        max-width: 1200px;
        padding: 0 15px;
    }

header,
footer {
    font-family: 'Roboto', sans-serif;
}


/* Swagger Header */
.swagger-ui .topbar,
.swagger-ui .info .description,
.swagger-ui .info .title small {
    display: none;
}

.swagger-ui .information-container {
    position: relative;
}

    .swagger-ui .information-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 200vw;
        height: 100%;
        margin-left: -50vw;
        background-color: #eee;
    }

    .swagger-ui .information-container .info {
        position: relative;
        padding: 30px 0 20px;
        margin: 0;
    }

        .swagger-ui .information-container .info hgroup.main {
            margin: 0;
        }

.swagger-ui .info hgroup.main a {
    font-size: 14px;
}

.swagger-ui .information-container h2.title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.75em;
    font-weight: 500;
    color: #555;
    margin: 0 0 5px;
}

    .swagger-ui .information-container h2.title::after {
        content: " Live Server API Documentation";
    }


@media (min-width: 40em) {

    .swagger-ui .information-container .info {
        padding: 70px 0 30px;
    }

    .swagger-ui .information-container h2.title {
        font-size: 2em;
    }
}


/* Swagger Content */
.swagger-ui select {
    max-width: 100%;
}

.swagger-ui .scheme-container {
    position: relative;
    background-color: #eee;
    padding: 0 0 30px;
    margin: 0 0 20px;
    box-shadow: none;
}

@media (min-width: 40em) {

    .swagger-ui .scheme-container {
        padding: 0 0 40px;
        margin: 0 0 60px;
    }
}


/* Modals */
.swagger-ui .dialog-ux {
    padding: 10px;
}

    .swagger-ui .dialog-ux .modal-ux {
        width: calc(100% - 20px);
        min-width: 0;
        max-height: calc(100vh - 20px);
        overflow: hidden;
    }

    .swagger-ui .dialog-ux .modal-dialog-ux,
    .swagger-ui .dialog-ux .modal-ux-inner,
    .swagger-ui .dialog-ux .modal-ux-content {
        height: 100%;
    }

    .swagger-ui .dialog-ux .modal-ux-content {
        max-height: calc(100vh - (56px + 20px));
        padding: 20px 20px 10px;
    }


/* Auth */
.swagger-ui .auth-btn-wrapper,
.swagger-ui .scheme-container .auth-wrapper {
    justify-content: flex-start;
}

.swagger-ui .dialog-ux .modal-ux-content .auth-container {
    padding: 0 0 10px;
}

.swagger-ui .opblock .authorization__btn {
    position: absolute;
    top: 0;
    right: 0;
    margin: 10px 0 0;
}

.swagger-ui .scheme-container button.btn.authorize {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    padding: 15px 25px;
    background: #27ae60;
    color: white;
    border: none;
    transition: none;
    border-radius: .5em;
}

    .swagger-ui .scheme-container button.btn.authorize:hover {
        filter: brightness(105%);
        border-color: transparent
    }

    .swagger-ui .scheme-container button.btn.authorize span {
        padding: 0 10px 0 0;
    }

    .swagger-ui .scheme-container button.btn.authorize svg {
        display: block;
        fill: currentColor;
    }


/* Endpoint Groups */
.swagger-ui .opblock-tag-section {
    margin-bottom: 30px;
}

.swagger-ui .opblock-tag {
    display: block;
    position: relative;
    line-height: 1.2;
    padding: 0 0 15px;
    margin: 0 0 15px;
    border-bottom: 1px solid #ddd;
}

    .swagger-ui .opblock-tag:hover {
        background: transparent;
    }

    .swagger-ui .opblock-tag a.nostyle {
        display: block;
        padding-right: 40px;
        word-break: break-all;
    }

    .swagger-ui .opblock-tag small {
        display: block;
        width: 100%;
        padding: 0;
        line-height: 1.4;
    }

        .swagger-ui .opblock-tag small p {
            margin: 10px 0 0;
        }

    .swagger-ui .opblock-tag button {
        position: absolute;
        top: 0;
        right: 0;
    }

.swagger-ui .opblock .opblock-summary {
    position: relative;
    display: block;
    padding: 10px;
}

.swagger-ui .opblock .opblock-summary-method {
    display: block;
    width: 70px;
    padding: 6px 10px;
}

.swagger-ui .opblock .opblock-summary-path {
    font-size: 16px;
    padding: 0;
    margin: 10px 0;
}

.swagger-ui .opblock .opblock-summary-description {
    line-height: 1.2;
}

.swagger-ui .opblock .responses-inner,
.swagger-ui .opblock .opblock-body .table-container {
    width: 100%;
    overflow-x: auto;
}

.swagger-ui .opblock .opblock-section-header,
.swagger-ui .opblock .opblock-body .table-container,
.swagger-ui .opblock .opblock-description-wrapper {
    padding: 10px;
}

.swagger-ui .opblock .responses-inner {
    padding: 0 10px 10px;
}

.swagger-ui .opblock .opblock-section-header,
.swagger-ui .opblock .opblock-section-header label {
    display: block;
}

    .swagger-ui .opblock .opblock-section-header select,
    .swagger-ui .opblock .opblock-section-header button,
    .swagger-ui .opblock .opblock-description-wrapper pre {
        margin-top: 5px;
    }

@media (min-width: 40em) {

    .swagger-ui .opblock .responses-inner,
    .swagger-ui .opblock .opblock-section-header,
    .swagger-ui .opblock .opblock-body .table-container {
        padding: 20px;
    }
}

@media (min-width: 60em) {

    .swagger-ui .opblock .opblock-section-header,
    .swagger-ui .opblock .opblock-section-header label {
        display: flex;
    }

    .swagger-ui .opblock .opblock-summary {
        padding: 8px;
    }

    .swagger-ui .opblock .opblock-summary-path,
    .swagger-ui .opblock .opblock-summary-description {
        padding: 0 50px 0 95px;
    }

    .swagger-ui .opblock .opblock-summary-path {
        font-weight: 700;
        margin: 0 0 5px;
    }

    .swagger-ui .opblock .opblock-summary-description {
        font-size: 13px;
        opacity: .9;
    }

    .swagger-ui .opblock .opblock-summary-method {
        position: absolute;
        top: 0;
        left: 0;
        padding: 8px 10px;
        margin: 10px;
    }

    .swagger-ui .opblock .authorization__btn {
        margin: 16px 5px 0;
    }
}


/* Model Accordions */
.swagger-ui section.models.is-open {
    padding: 0;
}

.swagger-ui section.models .model-container,
.swagger-ui section.models .model-container:first-child,
.swagger-ui section.models .model-container:last-child {
    margin: 15px;
}

    .swagger-ui section.models .model-container > span.model-box {
        display: flex;
        align-items: center;
        padding: 0 5px;
    }

        .swagger-ui section.models .model-container > span.model-box > span + span {
            margin: -5px 0 0 -10px;
        }

.swagger-ui section.models div.model-box {
    width: 100%;
    padding-top: 8px;
}

.swagger-ui section.models .inner-object {
    display: block;
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.swagger-ui table.model tbody tr td:first-of-type {
    padding: 0 1.5em 0 2em !important; /* Override inline styles */
}

.swagger-ui table.model tbody tr td:nth-of-type(2) {
    padding-bottom: .5em;
    min-width: 10em;
}

.swagger-ui table.model .markdown {
    min-width: 20em;
}

    .swagger-ui table.model .markdown p:last-child {
        margin: 0;
    }

.swagger-ui .model-hint {
    top: 100%;
}


/* Consistent Header */
svg.hidden {
    display: none;
}
svg.icon {
    display: block;
    width: 1em;
    height: 1em;
    min-width: 1em;
    fill: currentColor;
}

header {
    background-color: #2e4B5d;
    border-top: 3px solid #d84547;
}

    header .logo {
        width: 12em;
        min-width: 12em;
        padding: .75em;
        transition: opacity .2s ease;
    }

        header .logo:hover {
            opacity: .75;
        }

        header .logo:focus {
            outline: none;
            box-shadow: inset 0 0 0 3px #3498db;
        }

        header .logo svg {
            display: block;
            width: 100%;
        }

    header .menu-toggle {
        display: inline-flex;
        align-self: center;
        padding: .75em;
        margin: 0 .5em 0 0;
        border: 0;
        border-radius: .5em;
        line-height: 1;
        cursor: pointer;
        background: transparent;
        color: #fff;
        font-size: 1em;
        transition: background-color .25s ease;
    }

        header .menu-toggle:hover,
        header .menu-toggle:active {
            background: rgba(255, 255, 255, .05);
        }

        header .menu-toggle svg {
            font-size: 1.5em;
        }

    header input.menu-state {
        position: absolute;
        display: none;
    }

@media (min-width: 60em) {

    header .logo {
        padding: 1em;
    }

    header .menu-toggle {
        display: none;
    }
}

@media (min-width: 80em) {

    header .logo {
        margin-right: .5em;
    }
}

/* Main Nav */

.main-nav,
.main-nav *,
.main-nav *::before,
.main-nav *::after {
    box-sizing: border-box;
}

.main-nav {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 75em;
    margin: 0 auto;
}

    .main-nav ul {
        display: none;
        position: absolute;
        z-index: 1;
        top: 100%;
        left: 0;
        width: 100%;
        flex-wrap: wrap;
        padding: 0;
        margin: 0;
        list-style: none;
        font-size: 1em;
        background-color: #2e4B5d;
        max-height: calc(80vh - 70px);
        overflow-y: auto;
    }

input.menu-state:checked + ul {
    display: flex;
}

.main-nav li {
    width: 100%;
    margin: 0;
}

    .main-nav li svg {
        font-size: 1.25em;
        margin-right: .25em;
        margin-top: -0.1em;
        opacity: .5;
    }

    .main-nav li a {
        display: inline-flex;
        align-items: center;
        width: 100%;
        height: 100%;
        color: rgba(255, 255, 255, .8);
        padding: .75em;
        text-align: center;
        text-decoration: none;
        font-weight: 400;
        transition: background-color .25s ease, color .25s ease;
    }

        .main-nav li a:hover {
            background-color: #d84547;
            color: #fff;
        }

        .main-nav li a:focus {
            outline: none;
            box-shadow: inset 0 0 0 3px #3498db;
        }

        .main-nav li a.current {
            font-weight: 500;
            border-left: 5px solid #d84547;
        }

body:not(.show-optional-links) header .main-nav li.optional-link {
    display: none;
}

@media (min-width: 60em) {

    .main-nav {
        position: relative;
        flex-wrap: nowrap;
        width: auto;
        border: none;
    }

        .main-nav ul {
            position: static;
            display: flex;
            max-height: none;
            background: none;
        }

        .main-nav li {
            width: auto;
        }

            .main-nav li:first-child {
                display: none;
            }

            .main-nav li a.current {
                position: relative;
                border-left: 0;
                color: #fff;
            }

                .main-nav li a.current::after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    height: 5px;
                    background-color: #d84547;
                }
}

@media (min-width: 80em) {

    .main-nav li a {
        padding: .75em 1em;
    }

    header .main-nav li:first-child {
        display: block;
    }
}


/* Custom Footer */

.driveworks-footer {
    background-color: #d84547;
    color: white;
    padding: 1.5em;
    text-align: center;
}
