/*
 * Copyright (C) 2013-2024 Jason Morley.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

 :root {
    --default-border-radius: 8px;
    --maximum-notification-width: 588px;

    --background-color: #fff;
    --secondary-background-color: #eee;
    --foreground-color: #111;
    --secondary-foreground-color: #777;
    --accent-color: #00344f;
    --accent-color-filter:  invert(15%) sepia(41%) saturate(2387%) hue-rotate(173deg) brightness(94%) contrast(101%);
    --button-color: #00344f;
    --button-color-hover: #001c2a;
    --destructive-button-color: red;
    --destructive-button-color-hover: rgb(196, 0, 0);
}

@media (prefers-color-scheme: dark) {

    :root {
        --background-color: #171616;
        --secondary-background-color: #222;
        --foreground-color: #eee;
        --secondary-foreground-color: #777;
        --accent-color: #285e89;
        --accent-color-filter: invert(29%) sepia(59%) saturate(589%) hue-rotate(164deg) brightness(97%) contrast(89%);
        --button-color: #285e89;
        --button-color-hover: #00344f;
        --destructive-button-color: darkred;
        --destructive-button-color-hover: rgb(96, 0, 0);
    }
}


/* General */

body  {
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 300;
    background-color: var(--background-color);
    color: var(--foreground-color);
    -webkit-text-size-adjust: 100%;
    margin: 0;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    margin: 0;
    padding: 0;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: 36px;
    letter-spacing: -1px;
    line-height: 2.0em;
    text-align: center;
}

h2 {
    font-size: 1.3em;
    font-weight: 300;
    border-bottom: 1px solid var(--secondary-background-color);
    transition: border 0.3s ease-in-out;
}

h3 {
    font-size: 1.2em;
    font-weight: 300;
}

hr {
    border: 0;
    border-bottom: 1px solid var(--secondary-background-color);
    transition: border 0.3s ease-in-out;
}

aside {
    background-color: #ff8f83;
    color: #000;
    padding: 1rem;
    border-radius: var(--default-border-radius);
}

input, textarea, select {
    box-sizing: border-box;
    font-size: 16px;
    background-color: var(--secondary-background-color);
    color: var(--foreground-color);
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    border: 0;
    border-radius: var(--default-border-radius);
    padding: 8px;
    width: 100%;
    margin: 8px 0;
    font-family: "Helvetica Neue";
    font-weight: 300;
}

pre {
    background-color: var(--secondary-background-color);
    color: var(--secondary-foreground-color);
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    padding: 8px;
    border-radius: var(--default-border-radius);
}

input:focus, textarea:focus {
    border-color: var(--accent-color);
    outline: 0;
}

input:disabled, textarea:disabled {
    background-color: var(--secondary-background-color);
    color: var(--secondary-foreground-color);
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}

button {
    font-size: 16px;
    background-color: var(--button-color);
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    border: 0;
    color: #fff;
    border-radius: var(--default-border-radius);
    padding: 8px;
    font-family: "Helvetica Neue";
    font-weight: 300;
    letter-spacing: 0.04em;
}

button.destructive {
    background-color: var(--destructive-button-color);
}

button:hover {
    background-color: var(--button-color-hover);
}

button.destructive:hover {
    background-color: var(--destructive-button-color-hover);
}

button:active {
    background-color: #ccc;
}

button:disabled {
    background-color: var(--secondary-background-color);
    color: var(--secondary-foreground-color);
}

button.danger {
    color: #fff;
    background-color: red;
    border-color: red;
}

.info {
    font-size: 0.9em;
    font-weight: 300;
    letter-spacing: 0.04em;
    padding-bottom: 10px;
    color: var(--secondary-foreground-color);
}

/* Search */

.search {
    border: 0;
}

/* Notifications */

.alert, .getting-started {
    padding: 12px;
    border-radius: var(--default-border-radius);
    max-width: var(--maximum-notification-width);
    margin: auto;
    margin-bottom: 20px;
    text-align: center;
    color: #000;
}

.alert-success {
    background-color: #badb8f;
}

.alert-danger {
    background-color: #ff8f83;
}

.getting-started {
    background-color: #bae3f2;
}

.error {
    padding: 8px;
    color: #a94442;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 6px;
    margin: 8px 0;
}

/* Actions */

.actions {
    margin: 12px 0;
}

a.action {
    padding: 12px;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 0 16px 0 0;
    color: #000;
}

a.action:hover {
    background-color: #ddd;
}

/* Navigation */

.logo {
    filter: var(--accent-color-filter);
}

.accented {
    filter: var(--accent-color-filter);
}

img.centered {
    display: block;
    margin: auto;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
}

.navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
}

.navigation a {
    text-decoration: none;
    padding: 16px;
    color: var(--accent-color);
    display: inline-block;
}

.navigation > ul > li {
    display: inline;
    white-space: nowrap;
    position: relative;
    display: inline-block;
}

.navigation > ul > li > a {
    text-decoration: none;
    padding: 16px;
    display: inline-block;
    color: var(--accent-color);
}

.navigation li:hover, .navigation > ul > li a:hover, .navigation > ul > li a.active {
    color: var(--foreground-color);
}

.navigation > ul > li .avatar {
    width: 30px;
    height: 30px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0 0 16px;
}

.navigation > ul.header {
    flex-grow: 1;
}

/* Page */

.page {
    /* padding: 16px 8px; */
}

.page-content {
    max-width: 680px;
    padding: 0 16px;
    margin: auto;
}

/* Clocks */

ul.clocks {
    background: linear-gradient(to top, #111520, #4d76b3);
    background: #324B72;
    list-style: none;
    text-align: center;
    padding: 0;
    margin: 0;
}

ul.clocks > li {
    display: inline-block;
    padding: 40px;
    vertical-align: top;
}

/* Clock */

.clock-container {
    margin-bottom: 12px;
}

.clock-body {
    position: relative;
    height: 200px;
    width: 200px;
    border: 8px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3), inset 0 0 5px rgba(0, 0, 0, 0.3);
    margin: 8px;
}

.clock-type-night {
    background-color: rgba(0, 0, 0, 0.3);
}

.clock-type-day {
    background-color: rgba(255, 255, 255, 0.3);
}

.clock-hours {
    box-sizing: border-box;
    background-color: #fff;
    position: absolute;
    width: 8px;
    height: 50px;
    border-radius: 4px;
    bottom: 96px;
    left: 96px;
    transform-origin: 4px 46px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.clock-minutes {
    box-sizing: border-box;
    background-color: #fff;
    position: absolute;
    width: 6px;
    height: 80px;
    border-radius: 4px;
    bottom: 97px;
    left: 97px;
    transform-origin: 3px 77px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.clock-center-shadow {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    left: 91px;
    top: 91px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.clock-center {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    left: 91px;
    top: 91px;
}

.clock-seconds {
    box-sizing: border-box;
    background-color: #aaa;
    position: absolute;
    width: 2px;
    height: 100px;
    border-radius: 4px;
    bottom: 89px;
    left: 99px;
    transform-origin: 1px 89px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.clock-center-seconds {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #aaa;
    border-radius: 50%;
    left: 96px;
    top: 96px;
}

.clock-details {
    position: absolute;
    bottom: 18px;
    width: 100%;
}

.clock-day {
    display: inline-block;
    text-transform: uppercase;
    font-size: 12px;
    color: #fff;
    margin-right: 4px;
}

.clock-date {
    display: inline-block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.clock-digital {
    color: #aaa;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    font-size: 20px;
}

/* Contacts */

.contact {
    margin: 0.8rem;
    font-weight: bold;
    color: #fff;
}

.contact-current {
    font-style: italic;
}

/* Contacts */

ul.contacts {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.contacts > li {
    padding: 8px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--secondary-background-color);
    transition: border 0.3s ease-in-out;
    display: flex;
}

ul.contacts > .contact-current-user {
}

ul.contacts > li .contact-fullname {
    font-size: 1.2em;
    font-weight: 400;
}

ul.contacts > li .contact-offset {
    color: var(--secondary-foreground-color);
    font-size: 0.9em;
}

ul.contacts > li .contact-time {
    flex-grow: 1;
    text-align: right;
    font-size: 36px;
    font-weight: 300;
}

/* Account */

table.details {
    width: 100%;
    margin: auto;
}

table.details th {
    text-align: right;
    padding: 0 8px;
    font-weight: 400;
}

table.details th.section-header {
    text-align: left;
    font-size: 24px;
    font-weight: 300;
}

table.details td {
    padding: 0 8px;
}

p.value {
    margin: 0;
    padding: 8px 0;
}

.footer {
    margin: 4rem 0;
    text-align: center;
    font-size: 0.9em;
}

.footer p, .footer ul {
    margin: 0;
    margin-bottom: 0.2em;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    display: inline;
    margin: 0 4px;
}

.privacy-policy ul {
    list-style-type: lower-norwegian;
}
