/*
 *  brisk - brisk.css
 *
 *  Copyright (C) 2006-2014 Matteo Nastasi
 *                          mailto: nastasi@alternativeoutput.it
 *                                  matteo.nastasi@milug.org
 *                          web: http://www.alternativeoutput.it
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 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
 * Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
 */

* {
    font-family: verdana, helvetica, arial, sans-serif;
    font-size: 13px;
    line-height: 120%;
}

/* width of the big logo in the background (1014x741): its own size, smaller
   only when the window is narrower or shorter than the image, never enlarged */
:root {
    --bg-logo-w: min(1014px, 100vw, calc(100vh * 1014 / 741));
}

body {
    background-color: #ffffff;
    margin: 0px;
    /* height: 800px; */
    padding: 0px;

    align: center;
}

/* the big logo, once, centered in the width of the window; in the height
   the spare space goes one third above it and two thirds below, as for the
   pages (a percentage places that fraction of the spare space before the
   image); with no spare space it fills the height. Its edges are white.
   It is a layer fixed to the window behind the page, not the background of
   the body: Safari on iPhone and iPad ignores background-attachment: fixed,
   and the logo would scroll with the page and sit in the middle of all of it */
body::before {
    content: "";
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    z-index: -1;
    pointer-events: none;
    background-image: url('img/brisk-big-bg.jpg');
    background-position: center 33.333%;
    background-size: var(--bg-logo-w) auto;
    background-repeat: no-repeat;
}

div {
    font-size: 100%;
}

td {
    font-size: 100%;
}

img {
    position:     absolute;
    border-style: solid;
    border-width: 1px;
    border-color: gray;
}

img.unbo {
    border-width: 0px;
}

img.nobo {
    position:     relative;
    border-width: 0px;
    display: block;
    margin: auto;
}

img.inline {
    position:     relative;
    vertical-align: middle;
    border-width: 0px;
}

img.nobohide {
    position:     absolute;
    border-width: 0px;
    visibility: hidden;
    z-index: 12;
}

img.bordergray {
    border: 1px solid gray;
}

img.ib_nobo {
    border: 0px solid gray;
}

.bg_white {
    background-color: #ffffff;
}

.bg_green {
    background-color: #aaffaa;
}

.bg_ligre {
    background-color: #ddffdd;
}

.bg_red {
    background-color: #ffaaaa;
}

.bg_lired {
    background-color: #ffdddd;
}

.notify {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;

    background-image: url('img/brisk-bg-light.png');
    background-attachment: fixed;

    top: 0;
    padding: 8px;

    left: 50%;
    position: absolute;
    border-style: solid;
    border-width: 1px;
    bottom: 0;
    right: 0;
    align: center;
    text-align: center;
    background-color: white;
    z-index: 10;
    visibility: hidden;
}

.notify_opaque {
    top: 0;

    left: 50%;
    position: absolute;
    border-style: solid;
    border-width: 1px;
    bottom: 0;
    right: 0;
    align: center;
    text-align: center;
    background-color: white;
    z-index: 10;
    visibility: hidden;
}

div.notify_clo {
    position: absolute;
    align: center;
    width: 100%;
    left: 0px;
    bottom:  4px;
}

div.doc_alert {
    color: #ff5400;
    background-color: #ffd780;
    font-family: monospace;
    font-weight: bold;
    text-align: center;
    margin: 8px;
    padding: 8px;
}

.input_text {
    background-color: #f8f8f8;
    border: 1px solid gray;
    margin: 1px;
 }

.input_text:hover {
    background-color: white;
    border: 1px solid #ffae00;
 }

.input_text_hi {
    background-color: white;
    border: 2px solid #ffae00;
    margin: 0px;
 }

input.input_sub {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    border: 1px solid gray;
    margin: 0px;
    padding: 1px;
    color: black;
    background-color: #f8f8f8;
    vertical-align: middle;
    text-decoration: none;
    font-size: 100%;
    cursor: pointer;
    height: 22px ! important;
    max-height: 22px ! important;
    min-height: 22px ! important;
    display: inline;
}
input.input_sub:hover {
    border: 1px solid #ffae00;
    margin: 0px;
    padding: 1px;
 }

input.input_sub_hi {
    border: 2px solid #ffae00;
    padding: 0px;
    margin: 0px;
    color: black;
    background-color: white;
    vertical-align: middle;
    text-decoration: none;
    font-size: 100%;
    cursor: pointer;
    height: 22px ! important;
    max-height: 22px ! important;
    min-height: 22px ! important;
    display: inline;
}

button {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;

    border: 1px solid gray;
    margin: 1px;
    padding: 2px;
    color: black;
    background-color: RGB(246,246,246);
    vertical-align: middle;
    text-decoration: none;
    font-size: 100%;
    cursor: pointer;
    display: inline;
}

input.button {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;

    border: 1px solid gray;
    margin: 1px;
    padding: 2px;
    color: black;
    background-color: RGB(246,246,246);
    vertical-align: middle;
    text-decoration: none;
    font-size: 100%;
    cursor: pointer;
    display: inline;
}

input.button:hover {
    background-color: white;
}

input.button:active {
    background-color: RGB(255,255,153);
}

img.button:hover {
    cursor: pointer;
}

span.au0 span {
    font-weight: bold;
}
span.au0_off span {
    font-weight: bold;
}

span.au1 span {
    padding-left: 2px;
    padding-right: 4px;
    font-style: italic;
    background-color: #a1c8ff;
}
span.au1_off span {
    padding-left: 2px;
    padding-right: 4px;
    font-style: italic;
    background-color: #a1c8ff;
}

span.au2 span {
    background-color: #bafcba;
}
span.au2_off span {
    background-color: #bafcba;
}

span.au3 {
}

span.au3_off {
}

/* apprentices: light gold background instead of the books icon */
span.au3 span {
    padding-left: 2px;
    padding-right: 4px;
    background-color: #ffe9b3;
}

span.au3_off span {
    padding-left: 2px;
    padding-right: 4px;
    background-color: #ffe9b3;
}

div.bye_msg {
    font-weigth: bold;
}

div.apprentice {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;

    display: none;
    background-color: #ffd780;
    border: 1px solid #ffae00;
    padding: 8px;
}

/*
 *  diagnostic area of the room and of the table (watchdog, loaded images,
 *  ...): hidden at every page load, diag_toggle() (commons.js) shows it
 */
div.diagbox {
    display: none;
    text-align: left;
    font-family: monospace;
    font-size: 80%;
    padding: 2px 4px;
    margin: 2px;
    overflow-wrap: anywhere;

    /* the colors of .webstart_hilite (start, actions, ... menu), background at 50% */
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    background-color: rgba(255, 215, 128, 0.5);   /* #ffd780 */
    border: 1px solid #ffae00;
}

div.diagbox.diag_on {
    display: block;
}

img.stm_stat {
    cursor: pointer;
}

/*
 *  one-line company details ($G_company_line, company_line_render() in
 *  brisk.phh) of the login, the room and the table: the last row of the
 *  grid of the page (room.css, briskin5.css), at the bottom of the window
 *  when the page fits in it, after the page, reached by scrolling, when
 *  it does not
 */
div.company_line {
    grid-row: 4;
    text-align: center;
    font-size: 80%;
    padding: 2px 4px 2px 4px;
}

/* the orange links, without underline: in the login, the room and the
   table (here from room.css, that the table does not load) */
a.flat:link {
    color: RGB(255, 174,0);
    line-height: 20px;
    text-decoration: none;
}

a.flat:visited {
    color: RGB(255, 174,0);
    line-height: 20px;
    text-decoration: none;
}

a.flat:hover {
    color: RGB(255, 174,0);
    line-height: 20px;
    font-weight: bold;
    text-decoration: none;
}

/* in the company details the links keep the height of the line (a.flat
   sets 20px, more than the small text of the details) and the orange of
   a.flat (#ffae00); under the mouse they turn lighter, halfway between it
   and #ffd780, instead of becoming bold */
div.company_line a.flat {
    line-height: inherit;
}

div.company_line a.flat:hover {
    color: #ffc240;
    font-weight: inherit;
}

/* the header of the room and of the table (header_render() in brisk.phh) */
div.header {
    align: center;
    text-align: center;
    font-size: 100%;
    clear:left;
}

/* holds the chat and its button, placed from its bottom right corner */
div.chatt_box {
    position: relative;
}

/*
 *  the button that enlarges the chat (chatt_big_toggle() in commons.js): at
 *  the bottom right of the chat, in the room and at the table, as far
 *  from its outer edges (7 and 5 pixels, border included) as the "Exit"
 *  button of the standing players (div.esco) is from theirs; over the
 *  enlarged chat (z-index: 21 in the room, see briskin5.css for the table)
 */
input.chatt_big_btn {
    position: absolute;
    bottom: 4px;
    right: 6px;
    z-index: 22;
}
