div.status { display: inline-block; padding: 2px 6px; border-radius: 4px; }
div.green, span.green { color: #2DC483; }
div.yellow, span.yellow { color: #FEA11B; }
div.red, span.red { color: #C20707; }
div.unknown, span.unknown { color: gray; }

/* Uptime graph styles */
div.uptime-graph {
    display: grid;
    grid-template-columns: repeat(60, 1fr);
    gap: 1px;
    max-width: 45em;
}
.uptime-segment {
    background-color: gray;
    border-radius: 6px;
    height: 1.3em;
}
.uptime-segment.green {
    background-color: #2EC483;
}
.uptime-segment.yellow {
    background-color: #FEA11B;
}
.uptime-segment.red {
    background-color: #C20707;
}
div.uptime-graph > div.half {
    grid-column: span 30;
    font-size: 0.7em;
}
div.uptime-graph > div.otherhalf {
    grid-column: span 30;
    text-align: right;
    font-size: 0.7em;
}

html {
    background-color:#18191c;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16pt;
    margin: 0;
    padding: 0;
    /*background-color: #f4f4f4;*/
    background-color:#FFFFFF;
}

/* reduce top and bottom margin of headings, overriding what seems to be the default */
h1,h2,h3,h4 {
    margin-block-end: 0.2em;
}

.nowrap {
    white-space: nowrap;
}

.inline-text {
    display: inline;
}

.right-padding {
    padding-right: 2em;
}

img.text-icon {
    vertical-align: middle;
    height: 1em;
    width: 1em;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

button#edit-button {
    float: right;
    font-size: 16pt;
}

h1 {
    color: #333;
}

h1 a {
    text-decoration: none;
    color: inherit;
}
h1 a:hover {
    text-decoration: underline;
}

hr {
    margin-top: 40px;
    color: #B0B0B0;
    margin-bottom: 40px;
}

input[type="text"], input[type="password"], textarea {
    padding: 10px;
    margin: 10px 0;
    border: 2px solid #7e7e7e;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16pt;
    font-family: Arial, sans-serif;
}

label.strike {
    text-decoration: line-through;
}

input[type="submit"], button[type="submit"] {
    font-size: 16pt;
    border: 1px solid black;
    color: black;
    padding: 3px 12px;
    margin: 6px;
    background-color: white;
    cursor: pointer;
}
input[type="submit"]:hover, button[type="submit"]:hover {
    background-color: #bbb;
}

a.button-link {
    text-decoration: none;
    border: 1px solid black;
    color: black;
    padding: 3px 12px;
    margin: 6px;
    white-space: nowrap;
    display: inline-block;
}
a.button-link:hover {
    background-color:#bbb;
}

a.linkbacktoindex {
    text-decoration: none;
    color: inherit;
    font-size: 11pt;
}
a.linkbacktoindex:hover {
    text-decoration: underline;
}

select {
    /* Styles for the select box itself */
    width: 200px;
    padding: 8px;
    border: 1px solid; /* #ccc;*/
    border-radius: 4px;
    /*background-color: #f9f9f9;
    color: #333;*/
    font-family: Arial, sans-serif;
    font-size: 16pt;
}

option {
    /* Styles for individual options within the dropdown */
    /*background-color: #fff;
    color: #333;*/
    padding: 5px 8px;
    font-family: Arial, sans-serif;
    font-size: 14pt;
}

label.disabled {
    color: #888;
}

div.container.editpage {
    display: grid;
    grid-template-columns: 1.618fr 1fr;
    gap: 1em;
}

div.container.editpage > div.editform {
    border-right: 1px solid #777;
}

div.container.infobanner {
    background-color: #F4F6FE;
    padding-left: 2em;
    display: grid;
    grid-template-columns: min-content 1fr;
    gap: 1em;
}

div.container.infobanner img.infoicon {
    filter: invert(100%);
    max-width: none;
}

div.container > div.headergrid {
    display: grid;
    grid-template-columns: 1fr 9fr 1fr;
    gap: 1em;
    align-items: center;
}
div.container > div.headergrid > :nth-child(3n) {
    justify-self: end;
}

.prewrap {
    white-space: pre-wrap;
}

div.history-entry {
    border-top: 1px solid #777;
}

div.history-entry table.details td {
    white-space: pre-wrap;
    font-size: 0.8em;
    vertical-align: top;
    padding-right: 2em;
}

ul.linklist {
    padding-inline-start: 0;
}

ul.linklist li {
    display: inline;
    margin-right: 2em;
    /*list-style-type: none;*/
    white-space: nowrap;
    font-size: 0.8em;
}

/* div class that makes 3 columns inside the containing div.
Do a media query to use 2 or 1 column for narrower screens. */
div.three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
}
@media (max-width: 1100px) {
    div.three-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 750px) {
    div.three-columns {
        grid-template-columns: 1fr;
    }
    div.container > div.headergrid {
        grid-template-columns: 1fr;
    }
    div.container > div.headergrid > :nth-child(1n) {
        grid-row: 2;
    }
    div.container > div.headergrid > :nth-child(2n) {
        grid-row: 3;
    }
    div.container > div.headergrid > :nth-child(3n) {
        grid-row: 1;
    }
    ul.linklist li {
        display: block;
    }
}

div.appbox {
    border: 1px solid;
    border-color: #B0B0B0;
    border-radius: 8px;
    padding: 10px;
    /*background-color: #fafafa;*/
    background-color:#FFFFFF;
    text-align: left;
    display: grid;
    grid-template-columns: auto min-content;
}

div.appbox div.status {
    width: 1em;
    padding-right: 1.5em;
}

div.appbox a {
    text-decoration: none;
    color: #000;
}

div.appbox a:hover {
    text-decoration: underline;
}

#app-header-core button#responsive-menu-button {
    background-color: #f4f4f4;
}

.status-radio-group input[type="radio"] {
    /* Hide the default radio button visually but keep it focusable for accessibility */
    opacity: 0;
    position: fixed;
    width: 0;
}

.status-radio-group label {
    display: inline-block;
    padding: 10px 20px;
    font-family: sans-serif, Arial;
    font-size: 12pt;
    border: 2px solid #444;
    border-radius: 4px;
    cursor: pointer; /* Makes it clear the label is clickable */
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Style the label when its associated radio input is checked */
.status-radio-group input[type="radio"]:checked + label {
    background-color: #ddd; /* Change color when selected */
}

/* Add hover effect for better user experience */
.status-radio-group label:hover {
    background-color: #bbb;
    border-color: #33C;
}

/* Dark mode support */
/*@media (prefers-color-scheme: dark) {*/
body.dark-mode {
    main#app-main { background: #181a1b; color: #e0e0e0; }
    div#app-header-core { filter: invert(100%); background: #CDC7C3; /*background: #32383d; color: #e0e0e0;*/ }
    div#header-menu .collapsable-menu { background: #CDC7C3; /* will be inverted */ }
    #app-header-core { background-color: #32383d; }
    #app-header-core button#responsive-menu-button { background-color: #CDC7C3; }
    div.container.infobanner img.infoicon { filter: none; }
    div.container.infobanner { background-color: #293340; }
    .container {
        background: #1e1e1e;
    }
    h1 {
        color: #ffffff;
    }
    a {
        color: #1e90ff;
    }
    h1 > a {
        color: inherit;
    }
    div.appbox {
        background-color: #2a2a2a;
        border-color: #444;
    }
    div.appbox a {
        color: #aaa;
    }

    /* Style the label when its associated radio input is checked */
    .status-radio-group input[type="radio"]:checked + label {
        background-color: #333; /* Change color when selected */
    }

    /* Add hover effect for better user experience */
    .status-radio-group label:hover {
        background-color: #555;
        border-color: #33C;
    }

    textarea {
        background-color: #333;
        color: #e0e0e0;
        border-color: #555;
    }

    a.button-link {
        color: #e0e0e0;
        border-color: #e0e0e0;
    }
    a.button-link:hover {
        background-color: #444;
    }
    a.linkbacktoindex {
        color: #CDC7C3;
    }

    hr {
        color: #505050;
    }

    img.text-icon {
        filter: invert(100%);
    }

    input[type="submit"], button[type="submit"] {
        border-color: white;
        /*color: #1e90ff;*/
        color: #e0e0e0;
        background-color: #1e1e1e;
    }
    input[type="submit"]:hover, button[type="submit"]:hover {
        background-color: #444;
    }
}

div#dark-mode-menu {
    padding-top: 0.5em;
}

input#darkModeToggle {
    opacity: 0;
}
