/* CSS for the weewx Seasons skin
 * Copyright (c) Tom Keffer, Matthew Wall
 * Distributed under terms of GPLv3.  See LICENSE.txt for your rights.
 */

:root {
    /*--background-color:#ffffff; */
    --background-color: #000000;
    --title-background-color: #dddddd;
    --button-background-color: #bbbbbb;
    --element-background-color: #d2e8e8;
    --section-border-color: #aaaaaa;
    --cell-border-color: #dddddd;
    --highlight-color: #4282b4;
    --link-color: #FFFF00;
    --visited-color: #FFFF00;
    --hover-color: #FFFF00;
    --timestamp-color: #aaaaaa;
    --hival-color: #aa4444;
    --loval-color: #4444aa;
    --ok-color: #44aa44;
    --low-color: #aa4444;
    --unknown-color: #dfdfdf;
    --cyan: #00FFFF;
    --yellow: #FFFF00;
    --green: #00FF00;
    --red: #FF0000;
    --blue: #0000FF;
    --magenta: #FF00FF;
}

/* use the fonts from google */
/* @import url('https://fonts.googleapis.com/css?family=Open+Sans'); */

/* use the local fonts */
@font-face {
    font-family: 'Open Sans';
    src: url('font/OpenSans.woff2') format('woff2'),
    url('font/OpenSans.woff') format('woff');
}

@font-face {
    font-family: 'Comic Neue';
    src: url('font/ComicNeue-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Comic Neue';
    src: url('font/ComicNeue-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Comic Neue';
    src: url('font/ComicNeue-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Comic Neue';
    src: url('font/ComicNeue-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: 'Comic Neue';
    src: url('font/ComicNeue-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Comic Neue';
    src: url('font/ComicNeue-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

body {
    margin: 0;
    padding: 0;
    border: 0;
    color: #00FFFF;
    font-family: 'Open Sans', arial, sans-serif;
    background-color: var(--background-color);
}

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

a:link {
    color: var(--link-color);
}

a:visited {
    color: var(--visited-color);
}

a:hover {
    color: var(--hover-color);
}

hr {
    margin: 0 30px 30px 30px;
}

#widget_group {
    float: left;
    margin-right: 40px;
}

#plot_group {
    overflow: hidden;
}

#title_bar {
    overflow: auto;
    margin-bottom: 5px;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Left (empty), Center (title), Right report*/
    align-items: center;
    width: 100%;
}

#contents {
    clear: both;
    margin: 20px;
    /* Added this to contain the floated #widget_group so later sections can't overlap it */
    display: flow-root;
}

/* Ensure that the tomorrow widget and other sections stay to the right of the widget group */
#tomorrow-widget, #contents section {
    overflow: hidden;
}

#title {
    float: left;
    margin-left: 10px;
}

#rss_link {
    float: right;
    margin-top: 6px;
    margin-right: 20px;
    padding-left: 8px;
    padding-right: 8px;
    background-color: var(--background-color);
    border: 1px solid var(--section-border-color);
    border-radius: 5px;
}

#reports {
    justify-self: end;
    margin-top: 5px;
    margin-right: 10px;
    margin-bottom: 5px;
    text-align: right;
}

.footnote {
    font-size: 80%;
    font-style: italic;
    clear: both;
}

.center {
    text-align: center;
}

.comic-sans {
    font-family: "Comic Neue", "Comic Sans MS", "Comic Sans", cursive;
}

.cyan {
    color: var(--cyan);
}

.yellow {
    color: var(--yellow);
}

.green {
    color: var(--green);
}

.red {
    color: var(--red);
}

.blue {
    color: var(--blue);
}

.magenta {
    color: var(--magenta);
}

.small {
    font-size: 0.8em;
}

.large {
    font-size: 1.2em;
}

.larger {
    font-size: 1.5em;
}

.widget-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.button-link {
    display: inline-block;
    padding: 5px 15px;
    margin: 5px;
    background-color: var(--button-background-color);
    color: #000000 !important;
    border: 2px solid var(--section-border-color);
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    min-width: 150px;
}

.button-link:hover {
    background-color: var(--highlight-color);
    color: #FFFFFF !important;
}

.button-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.cam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cam-item {
    text-align: center;
    margin-bottom: 20px;
}

.cam-item img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--section-border-color);
}

.graph-item {
    margin: 40px 0;
}

.graph-item img {
    max-width: 100%;
    height: auto;
}

.page_title {
    font-size: 140%;
    line-height: 50%;
}

.lastupdate {
    font-size: 80%;
    line-height: 50%;
}

.widget {
    margin-bottom: 30px;
    clear: both;
}

.widget_title {
    font-weight: bold;
    padding: 2px 10px 2px 10px;
    /* underlined titles */
    border-bottom: 2px solid var(--section-border-color);
    /* outlined titles */
    /*
        background-color: var(--title-background-color);
        border: 1px solid var(--section-border-color);
    */
}

.label {
    font-size: 80%;
    vertical-align: top;
    text-align: right;
    padding-top: 4px;
    padding-right: 5px;
}

.data {
    font-weight: bold;
    font-size: 80%;
    vertical-align: top;
    text-align: left;
    padding-top: 4px;
}

.units {
    font-size: 80%;
    vertical-align: top;
    padding-top: 4px;
}

.timestamp {
    font-size: 80%;
    font-weight: normal;
}

.hival {
    color: var(--hival-color);
}

.loval {
    color: var(--loval-color);
}

.status_ok {
    color: var(--ok-color);
}

.status_low {
    color: var(--low-color);
}

.status_unknown {
    color: var(--unknown-color);
}

.button {
    cursor: pointer;
    padding: 0px 10px;
    /* rounded box buttons */
    /*
        border: 1px solid var(--section-border-color);
        webkit-radius: 3px;
        moz-radius: 3px;
        border-radius: 3px;
    */
}

.button_selected {
    cursor: pointer;
    padding: 0px 10px;
    /* underlined buttons */
    border-bottom: 5px solid var(--highlight-color);
    /* rounded box buttons */
    /*
        background-color: var(--button-background-color);
        border: 1px solid var(--section-border-color);
        webkit-radius: 3px;
        moz-radius: 3px;
        border-radius: 3px;
    */
}

.widget_control {
    float: right;
    cursor: pointer;
    margin-left: 20px;
    margin-right: 5px;
}

.widget img {
    width: 350px;
    border: 1px solid var(--section-border-color);
    margin-top: 4px;
}

.new_row {
    border-top: 1px solid var(--cell-border-color);
}

.celestial_body {
    margin-bottom: 30px;
    float: left;
}

.widget table th {
    font-weight: normal;
    text-align: right;
    border-bottom: 1px solid var(--cell-border-color);
}

#hilo_widget table th {
    font-size: 80%;
    text-align: right;
    border-bottom: none;
}

#hilo_widget .data {
    font-weight: bold;
    font-size: 80%;
    text-align: right;
    padding-left: 10px;
}

#totals_widget table th {
    font-size: 80%;
    text-align: right;
    border-bottom: none;
}

#totals_widget .data {
    font-weight: bold;
    font-size: 80%;
    text-align: right;
    padding-left: 10px;
}

#sensors_widget table th {
    padding-top: 10px;
}

#history_widget img {
    border: none;
    margin-bottom: 10px;
    width: 500px; /* should match the image width in skin.conf */
}

#history_widget.widget_title {
    min-width: 500px;
}

.plot_container {
    margin-top: 4px;
}

#map_canvas {
    width: 350px;
    height: 350px;
    margin-top: 4px;
}


@media (max-width: 800px) {
    #plot_group {
        overflow: visible;
        float: left;
    }
}

@media (min-width: 801px) {
    #plot_group {
        overflow: hidden;
        float: none;
    }
}

/* Big images should be scrollable on small screens */
#radar-satellite > p {
    overflow: auto;
}