@import url('https://fonts.googleapis.com/css?family=Open+Sans|Playfair+Display&display=swap');
/* Basic Style */
html, body, div, h1, h2, h3, p, form { margin: 0px; padding: 0px; }
body {
  font: 14px 'Open Sans', sans-serif;
  background: #111;
}
h1 {
  margin-bottom: 5px;
  color: #194263;
  font: bold 26px 'Playfair Display', serif;
  letter-spacing: 0.5px;
}
h2 {
  font-weight: bold;
  font-size: 18px;
}
p { margin-bottom: 1.2em; }
a {
  color: #194263;
}
a:hover { color: #2c628c; }

/* Layout */
html { height: 100%; }
body {
  min-height: 100%;
  display: grid;
  grid-template-rows: 90px auto 70px;
}
content {
  display: block;
  position: relative;
  max-width: 950px;
  margin: 0px auto;
}
header {
  background: linear-gradient(to bottom, #194263, #2c628c);
  color: #fff;
  border-bottom: 2px solid #fff;
  padding: 0 15px;
  white-space: nowrap;
}
  header content {
    display: grid;
    grid-template-columns: 320px auto repeat(4,108px);
    height: 100%;
  }
  header h1 {
    margin-top: 10px;
    font: 400 48px 'Playfair Display', serif;
    text-shadow: 2px 2px 2px #000;
  }
  header a { color: #f1f1f1; text-decoration: none; }
  header a:hover { color: #f1f1f1; }
  header a.section {
    height: 100%;
    line-height: 88px;
    font-size: 22px;
    text-align: center;
  }
  header a.section span { display: inline-block; vertical-align: middle; line-height: 22px; }
  header a.section.active { background: rgba(30, 30, 30, 0.25); }
  header a.section:hover { background: #194263; }
  header a.logout:hover { text-decoration: underline; }

page {
  padding: 20px 15px;
  background: center top repeat-x url(/img/texture_fade.jpg) #f1f1f1;
}
page a { font-weight: bold; }

footer {
  padding: 15px 0px;
  text-align: center;
  color: #f1f1f1;
  border-top: 4px solid #194263;
  font-size: 12px;
}
  footer a {
    color: #aaa;
    text-decoration: none;
  }

@media (min-width:495px) and (max-width: 782px) {
    header content {
        grid-template-columns: 320px auto repeat(2, 155px);
        grid-template-rows: repeat(2, 38px);
        margin: 10px 0;
    }
    header content h1, header content > div {
        grid-row: 1/3;
        margin: 0;
    }
    header content a.section {
        position: relative;
        height: auto;
        line-height: normal;
        font-size: 20px;
    }
    header content a.section br { display: none; }
    header a.section:nth-child(-n+4):after {
        content: '';
        position: absolute;
        left: 7%;
        width: 85%;
        height: 1px;
        bottom: 0px;
        background: #f1f1f1;
    }
    header content a:nth-child(even):before {
        content: '';
        position: absolute;
        left: 0px; top: 10%;
        width: 1px; height: 70%;
        background: #f1f1f1;
    }
}
@media (min-width: 495px) and (max-width: 669px) {
    header content { grid-template-columns: auto 10px repeat(2, 155px); }
    header content h1 { font-size:47px; }
}
@media (min-width: 635px) and (max-width: 648px) { header content h1 { font-size:45px; } }
@media (min-width: 604px) and (max-width: 634px) { header content h1 { font-size:40px; } }
@media (min-width: 573px) and (max-width: 603px) { header content h1 { font-size:35px; } }
@media (min-width: 495px) and (max-width: 572px) {
    header content { grid-template-columns: auto 10px repeat(2, 125px); }
    header content h1 { font-size:32px; }
    header content a.section { font-size: 16px; }
}

@media (max-width: 494px) { /* 450 */
  /** Phone **/
  body { grid-template-rows: 128px auto 70px; }
  header {padding: 0;}
  header content { display: block; grid-template-columns: none; padding:0px 0px 0px 4px; }
  header h1 { margin: 0px; text-align: center; font-size:40px; }
  header a.section br { display:none; }
  header a.section {
    display: block;
    float: left;
    padding: 3px 0px 6px 0px;
    width: 49%;
    height: auto;
    margin: -1px 0px 0px -1px;
    font-size: 19px;
    line-height: normal;
    position: relative;
  }
  header a.section:nth-child(-n+4):after {
    content: '';
    position: absolute;
    left: 7%;
    width: 85%;
    height: 1px;
    bottom: -1px;
    background: #f1f1f1;
  }
  header a.section:nth-child(even):before {
    content: '';
    position: absolute;
    top: 17%;
    height: 70%;
    width: 1px;
    left: 0px;
    background: #f1f1f1;
  }
  page {
    padding: 10px 10px;
  }
  
} /** Phone **/


/* Sections */
table.table {
  border: 1px solid #000;
  border-spacing: 2px;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
table.table th {
  background: #d0d0d0;
  color: #194263;
  text-align: left;
}
table.table th, table.table td {
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  padding: 2px 4px;
}
table.table tr:last-child td { border-bottom: none; }
table.table th:last-child, table.table td:last-child { border-right: none; }
table.table.striped tbody tr:nth-child(even) td { background: #e6e6e6; }
table.table a.button { padding: 2px 6px; top: 0px; }

.clear { clear: both; }
.text-right { text-align:right; }
.text-center { text-align: center; }

.credit {
  font-size: 0.9em;
  margin-bottom: 0.5em;
  margin-top: -0.5em;
  font-style: italic;
}

/* Form Layout */
div.row { margin-bottom: 4px; }
div.row label:first-child {
  display: block;
  float: left;
  clear: both;
  width: 25%;
  max-width:150px;
  margin: 4px 4px 0px 0px;
  text-align: right;
}
div.row label:not(:first-child) {
  display: inline-block;
  margin-top: 4px;
}

input[type=text], input[type=password], input[type=email], input[type=phone] {
  font: inherit;
  padding: 4px;
  width: 250px;
  border: 1px solid #666;
}
select {
  font: inherit;
  padding: 4px;
  width: 260px;
  border: 1px solid #666;
  background-color: #fff;
}
textarea {
  font: inherit;
  padding: 4px;
  width: 68%;
  height: 5.25em;
  border: 1px solid #666
}
input[type=file] {
  font: inherit;
  padding: 4px;
}
input[type=radio] {
  vertical-align: text-top;
}

*.button {
  font: inherit;
  padding: 4px 12px;
  min-width: 120px;
  border: 1px solid #666;
  border-radius: 6px;
  background: #f0f0f0;
  cursor: pointer;
  margin-right: 10px;
}
  a.button {
    display: inline-block;
    min-width: auto;
    position: relative;
    top: -0.25em;
    font-size: 1rem;
    text-decoration: none;
    font-family: sans-serif;
    font-weight: normal;
  }
*.button[type=submit], *.button.default {
  background: #2c628c;
  color: #fff;
}
  h1 a.button { margin-left: 10px; }
*.button.delete {
  background: #c33;
  color: #f0f0f0;
}

.error {
  color: #f00;
  background: #fcc;
  padding: 4px 12px;
  margin: 1em;
  border: 2px solid #f00;
  border-radius: 6px;
}

/* https://www.w3schools.com/css/css_tooltip.asp */
.tooltip { position: relative; display: inline-block; }
.tooltip .tooltiptext {
  position: absolute;
  z-index: 1;
  visibility: hidden;
  width: 120px;
  bottom: 100%;
  left: 50%;
  margin-left: -60px; /* Use half of the width (120/2 = 60), to center the tooltip */
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
}

.tooltip:hover .tooltiptext { visibility: visible; }
.tooltip .tooltiptext::after {
  content: " ";
  position: absolute;
  top: 100%; /* At the bottom of the tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}
