/*
Copyright (C) 2020 Jake Alaimo

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 <https://www.gnu.org/licenses/>.
*/


body {
    background-color: rgba(114, 114, 108, 1.0);
    background-image: url("img/bg.jpg");
}

h2 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1.4em;
    color: rgb(22, 24, 15);
    font-weight: bold;
    text-align: center;
}

#input {
    position: absolute;
    width: 90%;
    height: 3.5%;
    top: 4%;
    left: 5%;

    min-height: 25px;
    max-height: 65px;

    min-width: 400px;
}
#fileStyled {
    position: absolute;
    width: 40%;
    height: 100%;
    left: 26.5%;

    background-color: white;
    border-radius: 4px 0px 0px 4px;
    box-sizing:border-box;
    border: 1px solid rgb(143, 175, 27);
    box-shadow: 0px 0px 8px 1px rgb(69, 73, 60);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#fileStyled:before {
    content: '';
    vertical-align: middle;
    display: inline-block;
    height: 100%;
}

#fileStyled.dragOver, #fileStyled:hover {
    background-color: rgb(228, 228, 228);
}
#fileStyled:active {
    background-color: rgb(211, 211, 211);
}
#fileStyled span {
    font-family: Arial, Helvetica, sans-serif;

    display: inline-block;
    margin: 0;
    vertical-align: middle;

    font-size:calc(14px + 0.25vw);
    padding-left: 2%;/*40px;*/
}
#fileStyled.emptyFile span {
    color: rgb(146, 146, 146);
}

#file {
    position: absolute;
    width: 100%;
    height: 100%;

    opacity: 0.0;
    -moz-opacity: 0.0;
    filter: alpha(opacity=0);
}

#process {
    position: absolute;
    width: 7%;
    height: 100%;
    left: 66.5%;
    border: 1px solid rgb(143, 175, 27);
    border-radius: 0px 4px 4px 0px;

    font-family: Arial, Helvetica, sans-serif;
    color: white;
    font-weight: bold;
    font-size:calc(15px + 0.25vw);
    
    background-color: rgb(143, 175, 27);
    box-shadow: 0px 0px 8px 1px rgb(69, 73, 60);
}
#process:hover {
    background-color: rgb(153, 185, 37);
}
#process:active {
    background-color: rgb(123, 155, 7);
}
#process:focus {
    outline: none;
}

#dynamicElements {
    position: absolute;

    width: 90%;
    height: 80%;

    min-width: 400px;
    min-height: 400px;

    left: 5%;
    top: 11.5%;
}

#elementBody {
    position: absolute;
    width: 100%;
    height: 88%;
    top: 5%;
    background-color: #4b4b4b;
    border: 1px solid rgb(22, 22, 22);
    border-top: none;
    box-sizing: border-box;
    z-index: 3;
}

#categories {
    position: absolute;
    width: 100%;
    height: 5%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.category{
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    position: relative;
    top: 0;
    background-color: #3b3b3b; 
    color: rgb(238, 238, 238);
    font-weight: bold;

    font-size:calc(13px + 0.35vw);
    overflow: hidden;
    text-overflow: ellipsis;

    flex-basis: 0;
    flex-grow: 1;

    border: 1px solid rgb(22, 22, 22);
    z-index: 1;

    box-shadow: inset 0px -3px 8px rgb(29, 29, 29);
}
.category:focus {
    outline: none;
}
.category:hover {
    background-color: #4b4b4b;
    color:white; 
}
.category:active {
    background-color: #2b2b2b; 
}

.selectedCategory{
    height: 110%;
    top: -10%;
    background-color: #4b4b4b; 
    color: white;
    overflow: visible;
    padding: 0px 10px 0px 10px;

    border-bottom: none;

    text-decoration: underline;
    border-radius: 5px 5px 0px 0px;
    box-shadow: 2px 0px rgb(19, 19, 19);;
    z-index: 2;
}
.selectedCategory:last-of-type{
    box-shadow: -2px 0px rgb(19, 19, 19);
}
.selectedCategory:only-of-type {
    box-shadow: none;
}
.selectedCategory:active {
    background-color: #4b4b4b; 
}

#tableContainer {
    position: absolute;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;

    box-shadow:  0px 0px 15px 10px rgb(59, 59, 59);
    overflow-y: auto;
}
table {
    font-family: arial, sans-serif;

    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;

    width: 100%;

    z-index: 4;
}


thead tr {
    width: 100%;
}
thead th{
    position: sticky;

    width: 20%;
    top: 0;
    padding: 8px;
    padding-right: 0px;
    text-align: left;

    color: white;

    border: 1px solid #9c9c9c;
    background-color: #656661;  /*8b8b8b*/
    box-shadow:  0px 1px 3px 0px rgb(88, 88, 88);

    overflow: hidden;
    text-overflow: ellipsis;
}

td {
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #9c9c9c;
    text-align: left;
    padding: 8px;
    padding-right: 0px;

    overflow: hidden;
    text-overflow: ellipsis;
}

tr:nth-child(even) {
    background-color: #cbccc6; /*c7c7c7*/
}
tr:nth-child(odd) {
    background-color: #ebebeb; 
}

#tableButtons {
    position: absolute;
    top: 93%;
    width: 100%;
    height: 7%;

    display: flex;
}

.tableButton {
    border: 1px solid rgb(22, 22, 22);
    border-top: 0;

    color: white;
    background-image: linear-gradient(rgb(37,37,37), rgb(18, 18, 18));

    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: bold;
    font-size:calc(12px + 0.33vw);

    flex-grow: 1;
    flex-basis: 0;
}
.tableButton:hover {
    background-image: linear-gradient(rgb(45,45,45), rgb(26, 26, 26));
}
.tableButton:focus {
    outline: none;
}
.tableButton:active {
    background-image: linear-gradient(rgb(25,25,25), rgb(11, 11, 11));
}

#exportButton {
    border-radius: 0px 0px 0px 30px;
    border-right: 1px solid rgb(54, 54, 54);
}
#copyButton {
    border-radius: 0px 0px 30px 0px;
    border-left: 1px solid black;
}

footer {
    position: fixed;
    text-align: center;
    width: 100%;
    bottom: 17px;
    left: 0;

    font-size:calc(15px + 0.35vw);
    font-family: Arial, Helvetica, sans-serif;

    color: rgb(22, 24, 15);
}

footer a {
    color: rgb(165, 201, 36);   
    text-decoration: none;
}
footer a:hover {
    color: rgb(180, 218, 47);
    text-decoration: underline;

}
footer a:active {
    color: rgb(126, 158, 11);
}
footer a:visited {
    
}

@media only screen and (max-height: 495px) {
    #input {
      top: 15px;
    }
    #dynamicElements {
        top: 50px;
    }

    footer {
        position: relative;
        top: 460px;
        margin-bottom: 15px;
    }
}

@media only screen and (max-width: 900px) {
    #fileStyled {
      left: 0%;
      width: 80%;
    }
    #process{
        left: 80%;
        width: 20%;
    }
}

/*
  This is an (old) edge browser, which means the position: sticky on thead th has issues.
  Remove the attribute if using edge. Gross solution, but seemingly necessary.
*/
@supports (-ms-ime-align:auto) or (-ms-accelerator:true) {
    thead th {
        position: initial;
    }
}