/* Lato (bold, regular) */
@font-face {
    font-display: swap;
    font-family: Lato;
    font-weight: 500;
    font-style: normal;
    src: url("https://assets.gradle.com/lato/fonts/lato-semibold/lato-semibold.woff2") format("woff2"),
    url("https://assets.gradle.com/lato/fonts/lato-semibold/lato-semibold.woff") format("woff");
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

body {
    color: #02303A;
    background-color: #f7f7f8;
    font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #1DA2BD;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

p {
    font-size: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
#toctitle,
.sidebarblock > #content > .title {
    font-family: inherit;
    font-weight: 500;
    color: inherit;
}

h1 {
    font-size: 2rem;
}
h2 {
    font-size: 1.5rem;
}
h3 {
    font-size: 1.125rem;
}
h4 {
    font-size: 1.0625rem;
}
h5, h6 {
    font-size: 1rem;
}

b, strong {
    font-weight: 500;
}

/* Layout */
.main-content > .appendix,
.main-content > .book,
.main-content > .chapter,
.main-content > .footer {
    background-color: white;
    border-radius: 5px;
    max-width: 45rem;
    padding: 1.5rem;
}

#header .details {
    /* TODO: Pretty sure there's a way to avoid Asciidoc generating details */
    display: none;
}

p {
    color: #02303A;
}

.subheader,
.admonitionblock td#content > .title,
.audioblock > .title,
.exampleblock > .title,
.imageblock > .title,
.listingblock > .title,
.literalblock > .title,
.stemblock > .title,
.openblock > .title,
.paragraph > .title,
.quoteblock > .title,
table.tableblock > .title,
.verseblock > .title,
.videoblock > .title,
.dlist > .title,
.olist > .title,
.ulist > .title,
.qlist > .title,
.hdlist > .title {
    color: inherit;
    font-family: inherit;
}

p.lead,
.paragraph.lead > p,
#preamble > .sectionbody > .paragraph:first-of-type p {
    font-size: 1.0625rem;
}

.paragraph.lead > p,
#preamble > .sectionbody > .paragraph:first-of-type p {
    color: inherit;
}

.sect1 {
    padding-bottom: 0;
}

.sect1 + .sect1 {
    border: 0 none;
}

.admonitionblock > table td.icon .title {
    font-family: "Lato", Arial, sans-serif;
}

.verseblock pre {
    font-family: "Lato", Arial, sans-serif;
}

body.book #header > h1 {
    border: 0;
}

#header > h1:only-child {
    border: 0 none;
    padding: 0;
}

#header > h1:first-child {
    margin-top: 0;
}

#content a.link {
    color: #02303A;
}

.listingblock pre.highlightjs > code {
    overflow-x: auto;
}

.listingblock pre.highlight {
    overflow-x: auto;
}

.listingblock pre.highlight > code {
    white-space: pre;
}

.conum[data-value] {
    font-family: "Lato", Arial, sans-serif;
}

.colist > table tr > td:first-of-type {
    padding-top: 0.25em;
    padding-bottom: 0.25em;
    line-height: 1.4;
    vertical-align: baseline;
}

/*
 * Multi-language selection
 */
.multi-language-selector {
    display: block;
}

.multi-language-selector .language-option {
    background-color: white;
    border: 1px solid #f7f7f8;
    border-radius: 4px 4px 0 0;
    color: #777;
    cursor: pointer;
    display: inline-block;
    font-weight: normal;
    margin: 0;
    padding: 4px 20px 0;
    min-width: 163px;
    max-width: 50%;
    text-align: center;
}

.multi-language-selector .language-option.selected {
    background-color: #f7f7f8;
    color: #02303a;
    font-weight: bold;
}

.multi-language-text.hidden,
.multi-language-selector ~ .multi-language-sample.hidden,
.multi-language-selector ~ .multi-language-sample .title {
    display: none;
}

.multi-language-sample {
    border-radius: 0 0 4px 4px;
}

/*
 * Ensure that blocks of code do not wrap by applying the behavior of `[listing%nowrap]` by default.
 *
 * These styles are copied from a CSS ruleset in asciidoctor.css that has the same group of
 * selectors except that they end with `.nowrap`.
 */
.literalblock pre,
.literalblock pre[class],
.listingblock pre,
.listingblock pre[class] {
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
}

/*
 * This CSS ruleset solves: https://github.com/gradle/guides/issues/113#issuecomment-314826749.
 */
.literalblock pre::after,
.literalblock pre[class]::after,
.listingblock pre::after,
.listingblock pre[class]::after {
    content: "";
}

.quoteblock blockquote,
.quoteblock blockquote p {
    text-align: left;
    text-align: start;
}

div.screenshot {
    box-shadow: 0 0 20px 1px rgba(0,0,0,0.2);
    margin-left: auto;
    margin-right: auto;
    width: 90%;
}

.image.inline-icon img {
    vertical-align: sub;
}

/* TOC */
#content #toc {
    /* Asciidoc overrides */
    background: none;
    border: 0 none;
    padding: 1.25em 0 0;
}

#content #toctitle {
    margin-bottom: 0.625rem;
}

#toc {
    border: 0 none;
    padding: 1.25em;
}

#toc > ul {
    margin-left: 0;
    font-family: inherit;
}

#toc li {
    line-height: 1.0;
    margin-top: 0;
    padding-bottom: 0.625rem;
}
#toc li:last-of-type {
    padding-bottom: 0;
}

#toc a {
    color: #02303A;
}

#toc a:hover,
#toc a:focus,
#toc a:hover code,
#toc a:focus code {
    color: #1DA2BD;
}

#toc a:active {
    text-decoration: none;
}
@media screen and (min-width: 75rem) and (min-height: 48rem) {
    #toc {
        border: 0 none;
        font-size: 1rem;
        background: #f7f7f8;
        border-radius: 0;
        margin-bottom: 0;
        padding: 15px 0 0;
    }

    #toctitle {
        font-size: 1rem;
        font-weight: 700;
        margin: 0.4rem 0 0.625rem 0;
    }

    .toc a {
        color: #02303A;
    }

    .toc a.active {
        color: #1BA8C4;
    }
}

/* Site header specific styles */
.hamburger {
    background-color: transparent;
    background-image: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
    padding: 11px 10px;
}

.hamburger:focus {
    outline: 0;
}

.hamburger__bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: black;
    border-radius: 1px;
}

.hamburger__bar + .hamburger__bar {
    margin-top: 4px;
}

.site-header {
    background-color: white;
}

/* Override javadoc styles */
.site-header div {
    font-family: 'Lato', Arial, sans-serif;
}
.site-header__navigation-header a {
    align-self: center;
    border-bottom: 0 none;
    height: 36px;
}

.site-header__navigation {
    display: flex;
    flex-direction: column;
}

.site-header__navigation-header {
    display: flex;
    flex: 0 0 auto;
    margin-left: 12px;
}

.site-header__navigation-collapsible {
    flex: 1 1 auto;
    height: 210px;
    overflow: visible;
    transition: height 0.3s ease;
}

.site-header__navigation-items {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    max-height: 170px;
    margin: 0 20px;
    padding-top: 12px;
    padding-left: 0;
    list-style-type: none;
}

.site-header__navigation-item {
    flex: 0 1 auto;
    font-size: 16px;
    width: 250px;
}

.site-header__navigation-item .site-header__navigation-link {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
    padding: 5px;
    line-height: 20px;
    border: 0 none;
    color: #02303A;
    text-decoration: none;
    transition: none;
    -o-transition: none;
    -moz-transition: none;
    -webkit-transition: none;
}

.site-header__navigation-item .site-header__navigation-link:hover {
    color: #1DA2BD;
}

.site-header__navigation-item .site-header__navigation-link.active {
    font-weight: 500;
}

/* Navigation submenu styles */
.site-header__navigation-submenu-section {
    position: relative;
}

.site-header__navigation-submenu-section .site-header__down-arrow {
    width: 8px;
    height: 8px;
    margin-left: 2px;
    margin-top: 0;
}

.site-header__navigation-submenu-section .site-header__navigation-link:hover {
    color: #02303A;
}

.site-header__navigation-submenu-section .site-header__navigation-link:hover path {
    fill: none;
}

.site-header__navigation-submenu-section .site-header__navigation-submenu .site-header__navigation-submenu-item-link:hover {
    color: #1DA2BD;
}

.site-header__navigation-submenu-section .site-header__navigation-submenu {
    display: none;
    width: 170px;
    background-color: white;
    top: 40px;
    left: 21px; /* NOTE: This must match the padding of .site-header__navigation-link */
    padding: 3px 10px 6px 10px;
    z-index: 100;
}

.site-header__navigation-submenu-section .site-header__navigation-submenu .site-header__navigation-submenu-item-link {
    width: 100%;
    color: #02303A;
    white-space: nowrap;
    display: inline-block;
    padding-top: 3px;
    border: 0 none;
    transition: none;
    -o-transition: none;
    -moz-transition: none;
    -webkit-transition: none;
}

.site-header__navigation-submenu-section .site-header__navigation-submenu .site-header__navigation-submenu-item-link .site-header__navigation-submenu-item-link-text {
    display: inline-block;
    font-size: 16px;
}

.site-header__navigation-submenu-section.open .site-header__navigation-submenu {
    display: block;
}

/* Top navigation mobile styles */
@media (max-width: 1023px) {
    .site-header__navigation-collapsible--collapse {
        height: 0;
        overflow-y: hidden;
    }

    .site-header__navigation-submenu-section .site-header__navigation-submenu {
        display: block;
        top: 30px !important;
        left: 0 !important;
    }

    .site-header__navigation-item,
    .site-header__navigation-submenu-section .site-header__navigation-submenu .site-header__navigation-submenu-item-link .site-header__navigation-submenu-item-link-text {
        font-size: 18px;
    }

    .site-header-version {
        display: none;
    }

    .site-footer__navigation {
        flex-direction: column;
    }

    .site-footer__links {
        flex-wrap: wrap;
    }

    .site-footer__link-group {
        margin-bottom: 1rem;
    }
}

/* Top navigation desktop styles */
@media (min-width: 1024px) {
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        -webkit-box-shadow: 0 2px 4px 0 rgba(0,0,0,.15);
        -moz-box-shadow: 0 2px 4px 0 rgba(0,0,0,.15);
        box-shadow: 0 2px 4px 0 rgba(0,0,0,.15);
        z-index: 1;
    }

    /*
      Pushes the section headings to just below the top nav bar when a user
      navigates directly to section anchors.
     */
    .content h2[id], .content h3[id], .content h4[id] {
        padding-top: 60px;
    }
    .content h2[id] {
        /* Little extra room above h2s */
        margin-top: -44px;
    }
    .content h3[id], .content h4[id] {
        margin-top: -60px;
    }

    .site-header__navigation {
        flex-direction: row;
    }

    .site-header__navigation-button {
        display: none;
    }

    .site-header__navigation-items {
        flex-direction: row;
        align-items: center;
        float: right;
        width: auto;
        padding-top: 0;
    }

    .site-header__navigation-item {
        width: auto;
    }

    .site-header__navigation-item .site-header__navigation-link {
        padding: 15px 18px;
    }

    .site-header__navigation-item:last-of-type .site-header__navigation-link {
        padding-right: 0;
    }

    .site-header__navigation-link--button {
        padding: 6px 12px;
    }

    .site-header__navigation-collapsible {
        height: auto;
    }

    .site-header__navigation-submenu-section .site-header__navigation-submenu {
        position: absolute;
        border: 1px solid #9a9a9a;
        border-radius: 3px;
    }

    .site-header__navigation-submenu-section:hover .site-header__navigation-submenu {
        display: block;
    }
}

/* Side Navigation styles */
/* Docs Navigation */
.docs-navigation {
    display: none;
    overflow: hidden;
    padding-left: 5px;
}

.docs-navigation a {
    color: #02303A;
    display: block;
    font-size: 1rem;
    line-height: 1.0;
}

.docs-navigation a code {
    color: #02303A;
    overflow-wrap: break-word;
    padding: 0;
    word-break: break-all;
}

.docs-navigation a.active {
    color: #1BA8C4;
}

.docs-navigation ul {
    list-style-type: none;
    margin: 0.625em 0;
    padding: 0;
}
.docs-navigation ul:last-of-type {
    margin-bottom: 0;
}

.docs-navigation li {
    margin-bottom: 0.625em;
}
.docs-navigation li:last-of-type {
    margin-bottom: 0;
}

.docs-navigation .nav-dropdown {
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNiIgdmlld0JveD0iMCAwIDE5IDExIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIHRyYW5zZm9ybT0icm90YXRlKC0xODAgOS4zNzQgNS40OTQpIiBkPSJNMTcuOTk5MSAxMC40MjI4MjVMOS4zNzQxIDAuNTY1NTc1IDAuNzQ5MSAxMC40MjI4MjUiIHN0cm9rZT0iIzAyMzAzQSIgb3BhY2l0eT0iMC43IiBzdHJva2Utd2lkdGg9IjEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+') no-repeat center right;
}

.docs-navigation > ul ul,
.docs-navigation > ul ul ul {
    display: none;
    height: 0;
    margin-left: 1rem;
}

.docs-navigation > ul ul:target,
.docs-navigation > ul ul:target ul,
.docs-navigation > ul .nav-dropdown.expanded ~ ul {
    display: block;
    height: auto;
}

.docs-navigation h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 1.5em 0 0;
}

/* NOTE: These media-specific layout styles come after the general ones to ensure they take effect */
@media screen and (min-width: 45rem) {
    .main-content {
        display: flex;
        justify-content: center;
    }
}

/* User guide navigation appears for desktops */
@media screen and (min-width: 64rem) {
    .main-content {
        padding-top: 75px;
    }

    .docs-navigation {
        display: block;
        flex: 0 0 auto;
        width: 13.75rem;
    }

    .main-content > .appendix,
    .main-content > .book,
    .main-content > .chapter {
        flex: 0 0 45rem;
        margin: 0 20px;
    }
}

/* Fixed intra-chapter navigation for desktops */
@media screen and (min-width: 75rem) and (min-height: 48rem) {
    .appendix .toc,
    .book .toc,
    .chapter .toc {
        position: fixed;
        left: calc(50% + 380px);
        top: 50px;
        width: 13.75rem;
        padding-top: 15px;
        font-size: 1rem;
        background-color: #F7F7F8;
    }

    .appendix .toc a,
    .book .toc a,
    .chapter .toc a {
        color: #02303A;
    }

    .appendix .toc a.active,
    .book .toc a.active,
    .chapter .toc a.active {
        color: #1BA8C4;
    }

    .docs-navigation {
        flex-basis: 13.75rem;
    }

    /* Sneaky way to make room for TOC */
    .secondary-navigation {
        flex: 0 0 13.75rem;
    }
}

@media screen and (min-width: 84.375rem) and (min-height: 48rem) {
    .appendix .toc,
    .book .toc,
    .chapter .toc {
        left: calc(50% + 26.25rem);
    }
}

@media screen and (min-width: 93.75rem) and (min-height: 48rem) {
    .appendix .toc,
    .book .toc,
    .chapter .toc {
        left: calc(50% + 31.25rem);
    }
}

@media screen and (max-width: 45em) {
    .footer {
        max-width: 100%;
    }
    .main-content > .appendix,
    .main-content > .book,
    .main-content > .chapter {
        margin-top: 0;
        margin-bottom: 0;
    }
}

@media screen and (min-width: 84.375rem) {
    .main-content > .appendix,
    .main-content > .book,
    .main-content > .chapter {
        flex-basis: 50rem;
        max-width: 50rem;
    }
}

@media screen and (min-width: 93.75rem) {
    .main-content > .appendix,
    .main-content > .book,
    .main-content > .chapter {
        flex-basis: 60rem;
        max-width: 60rem;
    }
}

/* Footer styles */
.site-footer {
}

.site-footer__navigation {
    display: flex;
    max-width: 75rem;
    margin: 3rem auto 2.5rem auto;
    padding: 0.5rem 0.75rem;
}

.site-footer__links {
    display: flex;
    flex: 1 1 auto;
}

.site-footer__links .site-footer__links-list {
    list-style-type: none;
    margin: 0;
}

.site-footer__links .site-footer__links-list a {
    color: #666;
}

.site-footer__link-group {
    flex: 1 1 auto;
    flex-basis: 175px;
}

.site-footer__link-group header {
    color: #555;
}

.site-footer__subscribe-newsletter {
    flex: 0 0 350px;
}

.site-footer__subscribe-newsletter p {
    font-size: 0.875rem;
    margin: 2px 0 0 2px;
    opacity: 0.7;
}
.site-footer__subscribe-newsletter .disclaimer {
    font-size: 0.75rem;
    opacity: 0.55;
}

.site-footer__subscribe-newsletter .newsletter-form {
    padding-top: 6px;
    display: flex;
    justify-content: flex-start;
}

.site-footer__subscribe-newsletter .email,
.site-footer__subscribe-newsletter .submit {
    height: 40px;
}

.site-footer__subscribe-newsletter .email {
    line-height: 40px;
    width: 250px;
    color: #1DA2BD;
    font-size: 16px;
    padding-left: 20px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border-style: none;
}

.site-footer__subscribe-newsletter .submit {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    width: 100px;
    background-color: #1BA8CB;
    color: white;
    font-weight: 500;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-style: none;
    cursor: pointer;
    transition: all .3s ease;
}

/* Secondary footer (below) */
.site-footer-secondary {
    background-color: white;
}

.site-footer-secondary__contents {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/*
 * 1. Value is the largest computed width among 'site-footer__copy' and 'site-footer__links'.
 */
.site-footer__copy,
.site-footer__secondary-links {
    flex-grow: 0;
    flex-basis: 280px;
    /* 1. */
}

/*
 * 1. 'flex-shrink: 1' is applied to the element with the smallest computed width among
 *    'site-footer__copy' and 'site-footer__links'.
 */
.site-footer__copy {
    flex-shrink: 1;
    /* 1. */
}

.site-footer__logo {
    flex: 0 0 auto;
    margin-right: 10px;
    margin-left: 10px;
}

.site-footer__logo svg {
    width: 35px;
    height: 35px;
}

/*
 * 1. 'flex-shrink: 0' is applied to the element with the largest computed width among
 *    'site-footer__copy' and 'site-footer__links'.
 */
.site-footer__secondary-links {
    flex-shrink: 0;
    /* 1 */
    text-align: right;
    white-space: nowrap;
}

.site-footer-secondary a {
    color: #999;
}

.site-footer-secondary__links a:not(:last-child) {
    padding-right: 10px;
}

.site-footer-secondary__links a:not(:first-child) {
    padding-left: 10px;
}

@media all and (max-width: 29.99rem) {
    .site-footer__rights,
    .site-footer-secondary__links {
        display: none;
    }

    .site-footer__logo {
        order: 1;
        text-align: left;
    }

    .site-footer__copy {
        order: 2;
        text-align: right;
    }
}

/* Avoid the footer taking up much of the screen on short displays */
@media all and (max-height: 56.25rem) {
    .site-footer__navigation {
        margin: 1.5rem auto 1.5rem auto;
        padding-top: 0;
        padding-bottom: 0;
    }
}
