/* encoding: utf-8

  Copyright (C) 2020 willipink.eu
  Author Moritz Münch moritzmuench@mailbox.org

  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 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 General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program. If not, see <http://www.gnu.org/licenses/>.

*/


/* General */

html,
table,
tr,
td,
div {
    margin: 0;
    padding: 0;
}

body > div.container-fluid {
    padding: 0;
}

a,
a:hover,
a:active,
a:visited {
    text-decoration: none !important;
    color: black !important;
    cursor: pointer;
    vertical-align: inherit;
}


/* Controlbar */

button#begin_edit {
    position: fixed;
    z-index: 1060;
    right: 15px;
    bottom: 15px;
}

nav.navbar {
    display: none;
    position: fixed;
    z-index: 1031;
    bottom: 0;
    width: 100%;
    height: 64px;
    border-top: 1px solid gray;
}

nav.navbar > div#navbarColor03 > * {
    margin: 5px;
}

nav.navbar button {
    white-space: nowrap;
}

button.navbar_toggler {
    display: none;
}

div#navbar_toggler {
    line-height: 35px;
}

.form-control {
    display: inline-block !important;
    width: auto;
}

div#navbar_toggler > label {
    float: left;
    padding-right: 5px;
}

div#buttons {
    display: block;
    text-align: right;
    width: 100%;
}

div#advanced_options {
    position: fixed;
    z-index: 1030;
    right: 0;
    border-top: 1px solid gray;
    border-left: 1px solid gray;
    bottom: 63px;
    width: 200px;
    display: none;
    background-color: #f8f9fa !important;
}

div#advanced_options > label {
    float: left;
    padding: 5px;
    margin: 0;
    height: 44px;
    padding-top: 11px;
    width: 100%;
}

div#advanced_options > label:first-child {
    padding: 5px !important;
}

input#circulation,
input#found_on {
    width: 100px;
}

a.nav-link:hover {
    color: white !important;
}


/* modals */

div.modal-container {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}


/* country navigation */

li {
    padding: 0px 5px 5px 0px;
}

ul.nav {
    padding-bottom: 30px;
}


/* country table */


/* table head */

table {
    margin-bottom: 63px;
    cursor: default;
}

th {
    position: sticky;
    z-index: 1021;
}

th > img {
    max-height: 20px;
}

tr {
    height: 40px;
}

thead > tr:first-child > th {
    background-image: linear-gradient(0, #9fc5e8, white);
    background-position: 100% 100%;
    padding: 5px;
    text-align: left;
    top: 0;
    cursor: w-resize;
}

thead div.total_coins {
  float:right;
}

thead > tr:nth-child(2) > th {
    background-color: white;
    top: 40px;
}

tr:nth-child(2) > th:nth-child(10):after,
tr:nth-child(2) > th:nth-child(11):after,
tr:nth-child(2) > th:nth-child(12):after {
    position: absolute;
    z-index: 1020;
    left: 0;
    top: -1px;
    width: 40px;
    height: 42px;
    line-height: 40px;
}

tr:nth-child(2) > th:nth-child(10):after {
    content: '2 €*';
}

tr:nth-child(2) > th:nth-child(11):after {
    content: '2 €*';
}

tr:nth-child(2) > th:nth-child(12):after {
    content: '2 €*';
}

tbody > tr:first-child > td {
    border-top: 4px solid white;
}

thead > tr:nth-child(3) {
  height: 1.2px;
}

thead > tr:nth-child(3) > th {
    background-color: #636263;
    left: 0;
    top: 80px;
    padding: 0;
    box-shadow: 0 3px 10px black;
}

/* table body */

thead > tr:nth-child(2) > th,
table > tbody > tr > td {
    text-align: center;
    font-weight: normal;
}

td > * {
    vertical-align: middle;
    overflow: hidden;
}


/* coin background colors */

td.coin {
    background-color: #cec6ca;
    font-size: 1.1rem;
    border: 2px solid white;
}

.brass {
    background-color: #dec1a8 !important;
}

.buy_only {
    background-color: #af6464 !important;
}

.rare {
    background-color: #edb453 !important;
}

.found {
    background-color: white !important;
}

.exist, .year {
    background-color: white !important;
}

.year_complete {
    background-color: #00ff00 !important;
}

.noexist {
    background: rgba(74, 63, 85, 0.43) !important;
}


/* coin div text style */

.ec {
    color: #dc3545;
    font-weight: bold;
}

.checked {
    color: #28a745;
    font-weight: bold;
}


/* spacer tr row in between years */

tr.spacer {
    border: 0;
    background-color: white;
}

div.coin {
    position: relative;
    z-index: 1000;
    height: 40px;
    width: 40px;
    text-align: inherit;
    line-height: 40px;
    float: left;
}

div.found {
    position: absolute;
    z-index: 1001;
    top: 0;
    height: 40px;
    width: 40px;
    clip-path: polygon(100% 70%, 100% 100%, 70% 100%);
}


/* special coins */

div.special_name {
    display: none;
    height: 40px;
    width: 146px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 40px;
    color: black;
    text-align: left;
    word-wrap: anywhere;
    word-break: break-all;
    white-space: break-spaces;
}

div.three_lines {
    font-size: 0.8rem !important;
    line-height: 13px !important;
}

div.two_lines {
    font-size: 0.9rem !important;
    line-height: 20px !important;
}


/* device width specific */


/* smallest view 12 * 28 = 336px */

@media (max-width: 480px) {
    body {
        font-size: 0.86rem;
    }
    table {
        width: 336px;
        table-layout: fixed;
    }
    tr {
        height: 28px;
    }
    thead > tr:first-child {
        height: 35px;
        font-size: 1rem;
    }
    thead > tr:nth-child(2) > th {
        top: 35px;
        width: 28px;
    }
    thead > tr:nth-child(3) > th {
        top: 63px;
    }
    tr:nth-child(2) > th:nth-child(10):after,
    tr:nth-child(2) > th:nth-child(11):after,
    tr:nth-child(2) > th:nth-child(12):after {
        height: 28px;
        width: 28px;
        line-height: 28px;
    }
    tbody > tr > td > div.coin {
        height: 26px;
        width: 26px;
        line-height: 26px;
    }
    div.found {
        height: 26px;
        width: 26px;
        clip-path: polygon(100% 60%, 100% 100%, 60% 100%);
    }
}


/* 1st special coin: 11 * 40 + 200 = 640px */

@media (min-width: 655px) {
    table {
        width: 640px;
    }
    tr:nth-child(2) > th:nth-child(10) {
        width: 200px;
        text-align: left;
    }
    tr:nth-child(2) > th:nth-child(10):after {
        width: 200px;
        padding-left: 5px;
        content: 'Sondermünze 1';
    }
    div.special1_name {
        display: block;
    }
}


/* 2nd special coin 10 * 40 + 400 = 800px */

@media (min-width: 815px) {
    table {
        width: 800px;
    }
    tr:nth-child(2) > th:nth-child(11) {
        width: 200px;
        text-align: left;
    }
    tr:nth-child(2) > th:nth-child(11):after {
        width: 200px;
        padding-left: 5px;
        content: 'Sondermünze 2';
    }
    div.special2_name {
        display: block;
    }
}


/* 3rd special coin 9 * 40 + 600 = 960px */

@media (min-width: 975px) {
    table {
        width: 960px;
    }
    tr:nth-child(2) > th:nth-child(12) {
        width: 200px;
        text-align: left;
    }
    tr:nth-child(2) > th:nth-child(12):after {
        width: 200px;
        padding-left: 5px;
        content: 'Sondermünze 3';
    }
    div.special3_name {
        display: block;
    }
}
