/*
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 *
 */

@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* Standard variables */

:root {
    /* Colors */
    --body-background-color: hsl(0, 0%, 100%);
    --code-background-color: hsl(0, 0%, 97%);
    --footer-background-color: #365263;
    --text-color: hsl(0, 0%, 20%);
    --disabled-text-color: hsl(0, 0%, 40%);
    --line-color: hsl(0, 0%, 95%);
    --link-color: #306b8f;
    --accent-color-1: #5eba7d;
    --accent-color-2: #f08275;
    --selected-item-background-color: hsla(6, 80%, 70%, 0.3);
    /* Fonts */
    --body-font-family: sans-serif;
    --body-line-height: 1.5em;
    --code-font-family: monospace;
    --heading-font-family: sans-serif;
    /* Sizes */
    --page-width: 1100px;
}

/* Standard CSS reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6,
blockquote, p, pre,
dl, ol, ul,
table, figure {
    margin: 1em 0;
}

h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child,
blockquote:first-child, p:first-child, pre:first-child,
dl:first-child, ol:first-child, ul:first-child,
table:first-child, figure:first-child {
    margin-top: 0;
}

h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child, h6:last-child,
blockquote:last-child, p:last-child, pre:last-child,
dl:last-child, ol:last-child, ul:last-child,
table:last-child, figure:last-child {
    margin-bottom: 0;
}

h1:only-child, h2:only-child, h3:only-child, h4:only-child, h5:only-child, h6:only-child,
blockquote:only-child, p:only-child, pre:only-child,
dl:only-child, ol:only-child, ul:only-child,
table:only-child, figure:only-child {
    margin-top: 0;
    margin-bottom: 0;
}

article, section {
    margin: 1.5em 0;
}

article:first-child, section:first-child {
    margin-top: 0;
}

article:last-child, section:last-child {
    margin-bottom: 0;
}

article:only-child, section:only-child {
    margin-top: 0;
    margin-bottom: 0;
}

/* Standard page structure */

html {
    overflow-y: scroll;
    scroll-padding-top: 6.5em;
}

body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: minmax(2em, 1fr) calc(var(--page-width) * 0.7) calc(var(--page-width) * 0.3) minmax(2em, 1fr);
    grid-template-areas:
        "header header header header"
        ". main aside ."
        "footer footer footer footer";
    min-height: 100vh;
    color: var(--text-color);
    background-color: var(--body-background-color);
    font-family: var(--body-font-family);
    line-height: var(--body-line-height);
}

header {
    grid-area: header;
    display: flex;
    background-color: var(--body-background-color);
    border-bottom: 1px solid var(--line-color);
    align-self: start; /* Important for sticky positioning */
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 1em;
}

main {
    grid-area: main;
    padding: 2.4em 1em;
}

aside {
    grid-area: aside;
    display: flex;
    flex-direction: column;
    align-self: start; /* Important for sticky positioning */
    position: sticky;
    top: 7.5em;
    margin: 0 0 0 1em;
    padding: 0 1em 0 2em;
    border-left: 1px solid var(--line-color);
}

aside nav {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

aside nav > nav {
    padding-left: 1em;
    gap: 0.3em;
    font-size: 0.95em;
}

footer {
    grid-area: footer;
    display: flex;
    justify-content: center;
}

footer > div {
    padding: 1em;
    width: var(--page-width);
}

@media (max-width: 768px) {
    body {
        grid-template-rows: auto auto 1fr auto;
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "aside"
            "main"
            "footer";
    }

    aside {
        display: none;
    }

    footer > div {
        width: 100%;
    }
}

/* Standard styles for prose elements */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font-family);
    margin-top: 1.1em;
}

h1 {
    font-size: 1.8em;
}

h2 {
    font-size: 1.4em;
}

h3 {
    font-size: 1.2em;
}

h4 {
    font-size: 1.05em;
}

a {
    text-decoration: none;
    color: var(--link-color);
    cursor: pointer;
}

a.selected {
    color: var(--text-color);
    font-weight: 700;
}

code {
    font-family: var(--code-font-family);
    font-size: 0.8em;
    background-color: var(--code-background-color);
}

pre {
    padding: 1em;
    background-color: var(--code-background-color);
    overflow: auto;
    position: relative; /* Need relative positioning for the copy-button child */
}

/* Standard styles for lists */

/* XXX The handling of only versus multiple child elements needs work */

::marker {
    font-size: 0.9em;
}

ol, ul, dd {
    padding: 0 0 0 1em;
}

li {
    list-style-type: disc;
}

li, dt, dd {
    margin: 0;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

li > ul, li > ol, dd > dl {
    margin: 0;
}

li > p:last-child, dd > p:last-child {
    margin-bottom: 1em;
}

li > p + ul {
    margin-bottom: 1em !important;
}

li > table {
    margin-bottom: 1em !important;
}

li > section {
    margin-bottom: 1em !important;
}

li > pre {
    margin-bottom: 1em !important;
}

/* Standard styles for tables */

table {
    border-collapse: collapse;
}

/* Standard styles for path navigation */

.path-nav > a:not(:last-child)::after {
    content: " \00a0\003e\00a0\00a0 ";
    color: var(--text-color);
}

.path-nav > a:last-child {
    color: var(--disabled-text-color);
}

/* Nothing Skupper-specific above here! */

:root {
    --heading-font-family: "Alegreya Sans", sans-serif;
    --body-font-family: "Lato", sans-serif;
    --code-font-family: "Roboto Mono", monospace;
    --icon-font-family: "Material Symbols Outlined";
}

/* Skupper-specific styles for the page structure */

header {
    border-bottom: 3px solid var(--line-color);
}

aside {
    border-left: 3px solid var(--line-color);
}

aside h4 {
    font-size: 0.8em !important;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1em;
    margin-bottom: 1.9em;
}

footer {
    display: flex;
    border-top: 3px solid var(--line-color);
    padding: 2em 1em;
}

/* Skupper-specific styles for prose elements */

pre {
    border-radius: 0.25em;
}

/* Refdog-specific styles for prose elements */

/** Objects (resources and commands) **/

body.object h2 {
    font-size: 1.3em;
}

/* body.object main::after { */
/*     content: ""; */
/*     display: block; */
/*     height: 100vh; */
/* } */

table.objects th {
    width: 14em;
    text-align: left;
    font-weight: normal;
}

/** Attributes (resource properties and command options) **/

div.attribute {
    margin: 1em 1em 1.4em 1em;
}

div.attribute > div.attribute-heading {
    display: inline;
    margin-left: -1em;
    padding: 0.2em 0.5em;
    background-color: var(--code-background-color);
    border-radius: 0.25em;
}

div.attribute > div.attribute-heading:hover {
    cursor: pointer;
}

div.attribute > div.attribute-heading > * {
    display: inline;
    font-family: var(--body-font-family);
    font-size: 1em;
}

div.attribute > div.attribute-heading > h3 {
    margin-right: 0.2em;
}

div.attribute > div.attribute-heading > h3::before {
    margin-left: -0.2em;
    margin-right: 0.1em;
    content: "\e5c5";
    font-family: var(--icon-font-family);
    color: #999;
    vertical-align: top;
}

div.attribute > div.attribute-heading > div.attribute-type-info {
}

div.attribute > div.attribute-heading > div.attribute-flags {
    margin-left: 0.3em;
    font-style: italic;
}

div.attribute > div.attribute-body {
    margin-top: 1em;
}

div.attribute.selected > div.attribute-heading {
    background-color: var(--selected-item-background-color);
}

div.attribute.collapsed:not(.selected) > div.attribute-heading > h3::before {
    content: "\e5df";
}

div.attribute.collapsed:not(.selected) > div.attribute-body {
    display: none;
}

/** Tables **/

table.fields td, table.fields th {
    text-align: left;
    vertical-align: top;
    border-bottom: 2px solid var(--line-color);
    padding: 0.2em 0;
}

table.fields th {
    min-width: 6em;
    padding-right: 1em;
    font-weight: normal;
    font-style: italic;
}

table.choices {
    position: relative;
    top: -0.2em;
    border: none;
    font-style: normal !important;
}

table.choices th {
    width: 6em;
    padding-right: 1em;
    border: none;
    font-weight: normal;
    font-style: normal !important;
}

table.choices td {
    border: none;
    font-style: normal !important;
}

.notes {
    color: brown;
}

/* -- */

span.shell-comment {
    color: brown;
}

span.shell-command {
    font-weight: 600;
}

span.shell-output {
}

/* -- */

figure img {
    max-width: 70%;
    max-height: 20em;
    margin: 1em;
}

figure {
    text-align: center;
}

figcaption {
    margin-top: -0.8em;
    font-style: italic;
    font-size: 0.9em;
}

/* -- */

.data-table table {
    border-collapse: collapse;
    font-size: 0.9em;
}

.data-table th, .data-table td {
    padding: 0.3em 0.4em;
    text-align: left;
    border: 1px solid hsl(0, 0%, 80%);
}

/* -- */

.code-label {
    text-transform: uppercase;
    font-size: 0.7em;
    padding: 0.2em 0.6em 0 0.6em;
    color: hsl(0, 0%, 40%);
    background-color: hsl(0, 0%, 94%);
    border-bottom: 1px solid hsl(0, 0%, 80%);
}

/* .session-1 { */
/*     color: var(--code-label-fg-color-session-1); */
/*     background-color: var(--code-label-bg-color-session-1); */
/*     border-bottom: 0.1em solid var(--code-label-border-color-session-1); */
/* } */

/* .session-2 { */
/*     color: var(--code-label-fg-color-session-2); */
/*     background-color: var(--code-label-bg-color-session-2); */
/*     border-bottom: 0.1em solid var(--code-label-border-color-session-2); */
/* } */

pre {
    margin: 0;
}

/* -- */

div.examples {
    columns: 3;
}

div.examples > section {
    break-inside: avoid-column;
}

/* -- */

/* #-left-site-nav { */
/*     flex: 4; */
/* } */

/* #-left-site-nav, */
/* #-right-site-nav { */
/*     display: flex; */
/*     align-items: center; */
/*     margin: 0; */
/* } */

/* #-logo { */
/*     font-family: var(--heading-font-family); */
/*     font-size: 16pt; */
/*     font-weight: 700; */
/* } */

/* #-logo > img { */
/*     display: block; */
/*     height: 46px; */
/*     margin-right: 10px; */
/*     position: relative; */
/*     top: -2px; */
/* } */

#-menu-button {
    margin-right: 10px;
}

#-menu-button > span {
    vertical-align: -0.2em;
}

#-logo {
    font-family: var(--heading-font-family);
    font-size: 16pt;
    font-weight: 700;
}

#-logo > img {
    display: block;
    height: 46px;
    margin-right: 10px;
    position: relative;
    top: -2px;
}

/* -- */

span.fab,
span.fas {
    margin-right: 0.2em;
    vertical-align: -0.11em;
}

/* -- */

header {
    padding: 0 1em;
    display: flex;
}

header a {
    color: inherit;
    display: flex;
    align-items: center;
    height: 70px;
}

/* Logo */
header > a {
    flex: 0 0 calc(max(2em, (100% - var(--page-width)) / 2)) ;
    padding-right: 1em;
}

/* Container for tabs and GitHub link */
header > div {
    display: flex;
    justify-content: space-between;
    flex: 1;
    padding: 0 1em;
}

/* Tabs */
header > div > nav {
    display: flex;
    flex: 1;
}

header > div > nav > a {
    border-bottom: 3px solid transparent;
    position: relative;
    top: 3px;
    margin-right: 2em;
}

header > div > nav > a.selected {
    color: inherit;
    font-weight: 400;
    border-bottom: 3px solid var(--accent-color-2);
    cursor: default;
}

header > div > nav > a:not(.selected):hover {
    color: hsla(0, 0%, 0%, 0.6);
    border-bottom: 3px solid hsla(0, 0%, 0%, 0.1);
}

/* -- */

nav.links {
    display: flex;
    gap: 1em;
    margin: 1em 0;
}

/* nav.links > a { */
/*     color: gray; */
/* } */

nav.links > a::before {
    font-family: "Material Icons";
    content: "\e5c8";
    color: inherit;
    vertical-align: -2px;
    margin: 0 3px 0 0;
}

/* -- */

ul.column-list {
    columns: 2;
}

/* -- */

a.button {
    display: inline-block;
    font-weight: 700;
    padding: 0.6em 1.1em;
    color: white;
    background-color: var(--accent-color-2);
    border-radius: 0.2em;
    cursor: pointer;
}

a.button > span.material-icons {
    margin-left: -0.1em;
    margin-right: 0.2em;
    vertical-align: -0.25em;
}

nav.button-group {
    margin-top: 2em;
    margin-bottom: 2em;
}

nav.button-group > a {
    margin-right: 1em;
}

/* -- */

a.copy-button {
    color: transparent;
    background-color: transparent;
    cursor: pointer;
    position: absolute;
    z-index: 1;
    top: 3px;
    right: 3px;
    padding: 1em;
    line-height: 1em;
}

a.copy-button:active {
    top: 5px;
    right: 2px;
}

pre:hover > a.copy-button {
    color: var(--code-foreground-color);
    background-color: inherit;
}

a.copy-button > span {
    font-size: 1em;
}

/* -- */

footer {
    border: 0;
    background-color: var(--footer-background-color);
    color: white;
}

footer a {
    color: white;
}

footer > div {
    display: flex;
    gap: 2em;
}

footer > div > div {
    flex: 1;
}

footer > div > div:first-child {
    flex: 0;
    min-width: 10em;
}

/* -- */

nav.path-nav {
    font-size: 0.95em;
}

/* -- */

hr {
    margin: 1em 0;
    border: 0;
    height: 3px;
    background-color: var(--line-color);
}

/* -- */

.file-label {
    font-family: var(--code-font-family);
    font-size: 0.7em;
    padding: 0.2em 0.6em 0 0.6em;
    color: hsl(0, 0%, 40%);
    background-color: hsl(0, 0%, 94%);
    border-bottom: 1px solid hsl(0, 0%, 80%);
}

/* -- */

div.index {
    font-size: 0.95em;
    margin-left: 1em;
}

/* -- */
