﻿/* 
    ---------------------------------------------------
    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;
    }
}

/* Auth */
.swagger-ui .auth-btn-wrapper {
    gap: 10px;
}

.swagger-ui .scheme-container .auth-wrapper,
.swagger-ui .scheme-container .schemes:not(:has(.schemes-server-container)) {
    justify-content: flex-start;
}

.swagger-ui .dialog-ux .modal-ux-content .auth-container {
    padding: 0 0 10px;
}

.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;
    padding: 10px;
}

.swagger-ui .opblock-summary-control:focus {
    outline: none;
}

.swagger-ui .opblock-summary-control:focus-visible {
    outline: auto;
}

.swagger-ui .opblock .opblock-summary-method {
    padding: 10px 0;
}

.swagger-ui .opblock .opblock-summary-path-description-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.swagger-ui .markdown code,
.swagger-ui .renderedMarkdown code {
    color: #fff;
    background: #41444e;
    font-size: 12px;
}

@media (min-width: 60em) {
    .swagger-ui .opblock .opblock-summary {
        padding: 8px;
    }
}

@media (min-width: 40em) {

    .swagger-ui .opblock .responses-inner,
    .swagger-ui .opblock .opblock-section-header,
    .swagger-ui .opblock .opblock-body .table-container {
        padding: 20px;
    }
}

/* 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;
}
