/*
  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 <http://www.gnu.org/licenses/>.

  Flask Coolname - A simple web UI and RESTful interfae to coolname

  author: Christopher O'Brien <obriencj@gmail.com>
  license: AGPL v3
*/

:root {
    --font-size: 24px;
    --status-size: 18px;
    --line-height: 1.5em;
    --line-width: 28em;

    --body-bg: #222;
    --vprt-bg: #111;
    --shadow-color: #000;
    --border-color: #DED;
    --text-color: #DED;
    --hover-bg: #223;
    --copy-color: #59F;
    --refresh-color: #F11;
    --favorite-color: #FC1;
    --about-color: #F60;
}

html, body {
    background: var(--body-bg);
    box-sizing: border-box;
    height: 100%;
    margin: 0px;
    padding: 0px;
    border: none;
}
body {
    box-shadow: 1em 1em 2em var(--shadow-color) inset;
    padding: 100px;
    font-family: "Lucida Console", "Courier New", monospace;
    font-size: var(--font-size);
    color: var(--text-color);
}


a {
    color: var(--copy-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}
a:hover {
    background-color: var(--hover-bg);
    border-radius: 0.5em;
}


/* primary layout */

#viewport {
    display: flex;
    background: var(--vprt-bg);
    border: 8px solid var(--border-color);
    border-radius: 35px;
    box-sizing: border-box;
    min-height: 100%;
    min-width: fit-content;
    padding: 0.5em 1.5em;
    margin: auto;
    box-shadow: 1em 1em 2em var(--shadow-color);
}
#viewport div {
    margin: auto;
}

#content {
    width: var(--line-width);
    padding: 0;
    height: 100%;
    display: block;
}

#statement {
    height: 100%;
    width: 100%;
    user-select: none;
}


/* buttons */

#buttons {
    display: flex;
    width: 100%;
    margin-top: 2em;
}
#buttons div {
    cursor: pointer;
    display: flex;
    border-radius: 0.5em;
    border: 5px var(--vprt-bg);
    height: var(--line-height);
    width: var(--line-height);
    min-width: var(--line-height);
    padding: 0.25em;
    margin: 0;
}

#buttons div:hover {
    background-color: var(--hover-bg);
    border-color: var(--hover-bg);
}
#buttons div button {
    cursor: inherit;
    background-size: 100% 100%;
    background-color: var(--text-color);
    margin: auto;
    border: none;
    height: 100%;
    width: 100%;
}

#buttons div.about button {
    mask: url(about.svg) no-repeat 100% 100%;
}
#buttons div.about:hover button{
    background-color: var(--about-color);
}

#buttons div.return button {
    mask: url(return.svg) no-repeat 100% 100%;
}
#buttons div.return:hover button{
    background-color: var(--about-color);
}

#buttons div.copy button {
    mask: url(copy.svg) no-repeat 100% 100%;
}
#buttons div.copy:hover button{
    background-color: var(--copy-color);
}

#buttons div.refresh button {
    mask: url(refresh.svg) no-repeat 100% 100%;
}
#buttons div.refresh:hover button {
    background-color: var(--refresh-color);
}


/* status */

div#status {
    cursor: default;
    margin: auto;
    transition: all 1.25s ease-in;
    opacity: 0;
    display: flex;
    width: inherit;
}

div#status.showme {
    transition: opacity 0.25s ease-out;
    color: var(--text-color);
    background-color: var(--hover-bg);
    opacity: 1;
}

div#status span {
    font-size: var(--status-size);
    text-align: right;
    height: 100%;
    line-height: 2em;
    margin-left: auto;
    margin-right: auto;
    user-select: none;
}


/* sluglist */

ul.sluglist {
    user-select: none;
    list-style: none;
    margin: auto;
    min-height: calc(10 * var(--line-height));
    min-width: var(--line-width);
    white-space: nowrap;
    overflow: visible;
    padding: 0;
}
ul.sluglist > li {
    cursor: pointer;
    line-height: var(--line-height);
    height: var(--line-height);
    border-radius: 1em;
    opacity: 1;
    padding: 0 1em 0 0;
    animation: fade-in 0.8s;
}
ul.sluglist > li:hover {
    background-color: var(--hover-bg);
    border: 2px var(--hover-bg);
}
ul.sluglist > li.unwanted {
    transition: opacity 0.5s ease, height 0.8s ease-in;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
input[type=checkbox] {
    appearance: none;
    margin: 0 1.25em;
    padding: 0;
    height: var(--line-height);
}
input[type=checkbox]:after {
    display: block;
    height: 2em;
    width: 2em;
    content: "";
    mask: url(favorite.svg) no-repeat 100% 100%;
    transition: background-color 0.2s ease;
}
li > input[type=checkbox]:checked:after {
    background-color: var(--text-color);
}
li:hover > input[type=checkbox]:checked:after {
    background-color: var(--favorite-color);
}
@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 100%; }
}


/* noscript tweaks */

ul.sluglist.nojs > li {
    user-select: text;
    cursor: default;
}


/* The end. */
