/*!
 * (c) 2021 newfire.com
 * html/index.css
 */
/*
 * SAFARI: 
 * no rgb(x y z / opacity)
 */

:root{
  --color: white;
  --color-rgb: 255, 255, 255;
  --highlight: #efd;
  --body-width: 800;
  --background-rgb: 125 168 38;
  --background-color: #7DA826;
  --background: #7DA826;

  --box-shadow: 1px 1px 3px 0px rgb(0, 0, 0, .3);
}

body {
  border: 0;
  margin: 0;
  font-family: Trebuchet MS, FreeSans, sans-serif; // mac & windows, linux
  //font-size: 16px;
  color: var(--color);
  background: var(--background);
  text-align: center;

  /* hide scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
/* hide scrollbar for chrome, safari, opera */
body::-webkit-scrollbar {
  display: none;
}

/* chrome: make autofilll box transparent */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active  {
  transition: background-color 5000s;
  -webkit-text-fill-color: var(--color) !important;
}


:focus{
  outline: unset;
}


/* 
 * menubar 
 */

menubar{
  position: relative;
  display: block;
  text-align: left;
}

/*
 * Menu Item
 * <mi>
 *   <img>
 *   <label>
 */
mi{
  position: relative;
  display: block;
  //do not force color, color: rgba(255,255,255,.5);
  cursor: pointer;

  margin: 0;
  padding: 0;
  vertical-align: text-top;
  text-align: left;
  border-radius: 1em;
  white-space: nowrap;

  //overflow: hidden;
}
mi[title]:after{
  //content: " " attr(title) " ";
  content: attr(title);
  white-space: pre;
  margin: 5;
}
mi:hover{
  background: rgba(255,255,255,.1);
}
mi[hidden] {
  display: none;
}

/* img.mi, */
mi img {
  //width: 25;
  height: 25;
  vertical-align: middle;
  margin: 0;
  //border-radius: 50%;
  //box-shadow: var(--box-shadow);
  pointer-events: none; /* so we can click mi which is the target */

  object-fit: cover;
  object-position: center;
}

mi#user{
  filter: unset;
}

/* 
 * apps menu
 */
.menu,
apps-menu{
  z-index: 2;
  //border-radius: 1em;
}

.menu:hover,
apps-menu[open=true]{
  background: var(--background);
  box-shadow: var(--box-shadow);
}

apps-menu mi:first-child {
  background: unset;
}

apps-menu[open=false] mi:first-child ~ mi {
  display: none;
}



/*
 * appmenu
 */
app {
  display: flex;
}

app-menu {
  display: inline-table;
  margin: 4 9 4 0;

  position: -webkit-sticky; /* safari */
  position: sticky;
  top: 0;

  align-self: flex-start; /* fix for brave browser inside flex display */
}

app-menu mi{
  display: flex; /* block has unknown indent */
  cursor: pointer;
  margin: 2;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
}

app-menu mi img{
  width: 16;
  height: 16;
}

appcenter >table {
  table-layout: fixed;
  //margin: 0 0 0 35;
  //width: calc(100% - 35px);
  width: 100%;
}


/*
 * table


table th[name=from],
table th[name=to] {
  width: 20%;
}
table th[name=subject] {
  width: 50%;
}
table th[name=status], table attr[name=status],
table th[name=spam], table attr[name=spam],
table th[name=date], table attr[name=date] {
  text-align: right;
}
 */


@media screen and (max-width: 600px) {
  /* hide menu label, width to size of img */
  app-menu mi {
    width: 25;
    overflow: hidden;
  }
}



/*
 * form
 */

input{
  display: block;
  border-bottom: 1px solid silver;
  font-size: unset; /* input default is 13px */
  margin: 0;
  //color: var(--color);
}

input.password,
input.username {
  background: url(/images/user.svg) no-repeat left / 20px auto;
  text-align: center;
  //width: 100%;
  padding: 4;
  border: 0;
  border-bottom: 1px solid gray;
  margin: 10;

  color: var(--color);
}

input.password{
  background: url(/images/key.svg) no-repeat left / 20px auto;
}


input[type=search]{
  background: rgba(200,200,200,.3);
  height: 20;
  border: 1px solid silver;
  margin: 4 0;
  width: 50%;
}
input[type=search]:hover{
  background: rgba(200,200,200,.5);
}
input[type=search][value=""]{
  display: none;
}

::placeholder {
  color: var(--color);
  opacity: .5;
}

tab,
button{
  color: var(--color);
  border: 0;
  background: transparent;
  border-radius: 1em;
  box-shadow: var(--box-shadow);
  padding: 2 10;
  cursor: pointer;
  font: unset;
  white-space: nowrap;
}
button[default]{
  //background: rgba(255 255 255/.2);
  color: var(--background-color);
  background: var(--color);
}
button:focus,
button:hover{
  //background: rgba(222,222,222,.3);
  filter: brightness(1.2);
}

button[disabled] {
  opacity: .2;
  pointer-events: none;
}


center {
  display: block;
  //max-width: 600px;
  padding: 0;
  margin: 0 auto;
  position: relative;
}

hr{
    border: 0;
    height: 1px;
    //background: #333;
    //background-image: linear-gradient(to right, gray, white, gray);
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(222,222,222,.5), rgba(0, 0, 0, 0));
}

H1, H2, H3 { 
  color: var(--color);
  font-size: larger;
  font-weight: unset;

  opacity: .9;
  text-align:center;
  text-transform: uppercase;
  white-space: wrap;
  clear: both;
}
H2 { 
  font-size: large;
  opacity: .8;
}

H3 { 
  font-size: medium;
  text-transform: unset;
  opacity: .7;
}

H4 { 
  color: var(--color);
  font-size: medium;
  text-transform: uppercase;
  text-align: left;
  white-space: wrap;
  opacity: .8;
  margin: 0;
  font-weight: unset;
}

a {
  color: var(--color);
}


/*
 * searchbox
 */
searchbox {
  display: block;
  text-align: center;
}
searchbox >form {
  display: inline-block;
  //float: right;
  margin: 10 4;
}
searchbox >form input{
  display: inline-block;
  border: solid 1px transparent;
  border-bottom: solid 1px silver;
}
searchbox >form input:focus,
searchbox >form:hover input{
  border: solid 1px silver;
}
searchbox >form button{
  border: 0;
  padding: 2;
  vertical-align: bottom;

  display: inline-block;
}
searchbox >form button img{
  width: 20;
}

searchbox >result{
  display: block;
  clear: both;
  margin: 20 0;
}

