/* common.css */
/*The styles here are applied regardless of the design*/

html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

header {
  background-color: rgb(66, 70, 74);
  background-image: url("/static/img/forex_graph.webp");
  background-size: cover;
  background-blend-mode: soft-light;
  color: lightgray;
}

footer {
  background: #1e2022;
  margin-top: 25px;
  padding: 15px;
  text-align: center;
  /*flex 0 1 40px;*/
  color: white;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #f8f8f8;

}

.sub-heading {
  margin: 0px;
  font-size: 1.0rem;
  font-weight: 300;
}

.banner {
  margin-right: auto;
  margin-left: auto;
  width: 100%;
  text-align: center;
}

.heading {
  line-height: 1.2;
  margin: 0px;
  margin-bottom: .5rem;
}

.layout{
  display: grid;
  grid-column-gap: 10px;
  margin: 50px 125px 0px 125px;
}

.rates {
  display: grid;
  grid-column-gap: 5px;
}

.rates-failures {
  display: grid;
  grid-column-gap: 5px;
}

td {
  font-family: "Retina Narrow,Helvetica,Arial,sans-serif";
  padding: 8px 5px 6px 5px;
}

.institution-name {
  text-align: center;
  padding: 5px;
}

.institution-name > h2 {
  margin: 0px;
  font-variant: small-caps;
}

.institution-rates {
  width: auto;
  padding: 7px 0px 0px;
}

.institution {
  display: grid;
  margin: 0px 20px 50px 20px;
  width: auto;
}

.institution-rates-table {
  text-align: center;
}

.last-updated {
  color: darkslategray;
  text-align: right;
  font-style: italic;
  padding-top: 5px;
  padding-right: 5px;
}

.fx-instrument {
  font-variant: small-caps;
}

.fx-spacer {
  background-color: #f8f8f8;
}

.version {
  font-size: 10px;
}

.failed-institution {
  text-align: center;
}

tbody tr:hover {
  background-color: #e8eef5;

}

td.currency {
   font-weight: bold;
}

table {
  border-spacing: 4px 0px;
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.institution {
  border-radius: 5px;
}

tr {
  border-bottom: #aeaaaa solid thin;
}

td.currency {
  border-right: #f8f8f8 solid 10px;
}

th {
  font-variant: small-caps;
  vertical-align: bottom;
}

a {
  outline: none;
  text-decoration: none;
  padding: 2px 1px 0;
  padding-right: 25px;
}

a:link {
  color: black;
}

.institution-name a:visited {
  color: black;
}

a:focus, a:hover {
  background: url('https://mdn.mozillademos.org/files/12982/external-link-52.png') no-repeat 100% 50%;
  background-size: 16px 16px;
}

a.error-link {
  outline: none;
  text-decoration: none;
  background: url('https://mdn.mozillademos.org/files/12982/external-link-52.png') no-repeat 100% 50%;
  background-size: 16px 16px;
  padding: 2px 15px 0 0;
  margin-right: 7px;
  margin-left: 2px;
}

ul#operation, ul#instrument {
  list-style-type: none;
  display: inline flex;
  margin-top: 0px;
  margin-bottom: 0px;
}

.calculator-fields {
  display: grid;
  grid-column-gap: 5px;
  grid-template-columns: auto;
  margin: 10px 300px;
}

.field-wrapper {
  display: grid;
  grid-template-columns: 45% auto;
  margin: 5px 0px;
}

.submit-calculate {
  margin: 0px 550px;
}

#calculator-results {
  margin: 0px 50px;
}

#calculator {
  margin: auto;
  width: 1024px;
}

.heading > a {
  color: inherit;
}

.heading a:visited, .heading a:hover {
  color: inherit;
  background: none;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  background-color: #dddddd;
}

nav {
  background-color: rgb(66, 70, 74);
  background-size: cover;
  color: white;
}

nav li {
  float: left;
}

li a {
  display: block;
  padding: 8px;
  color: white;
}

nav li a:focus, nav li a:hover{
  background: none;
  background-color: grey;
}

button.filter, button.clear-filter {
  /*background-color: green;*/
  background-color: rgb(66, 70, 74);
  border: none;
  border-radius: 0px 10px;
  color: white;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
}

button.filter:hover, button.clear-filter:hover {
  background-color: #02b802;
  color: #333333;
}

button.clear-filter.disabled {
  color: rgb(66, 70, 74);
}

button.clear-filter.disabled:hover {
  color: rgb(66, 70, 74);
  background-color: rgb(66, 70, 74);
}

#filter-buttons {
  font-size: 0;
  display: inline-block;
}

.filter-buttons {
  display: flex;
  flex-direction: row;
}

.currency-filter-submit {
  background-color: #42464a;
  border: 5px groove #207889;
  color: lightgray;
  padding: 0px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
  transition-duration: 0.5s;
}

.currency-filter-submit:hover {
  background-color: #207889;
  color: white;
}

.currency-filter-reset {
  background-color: #42464a;
  border: 2px solid #d65d45;
  color: white;
  padding: 0px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
  transition-duration: 0.5s;
}

.currency-filter-reset:hover {
  background-color: #d65d45;
  color: black;
}
.currency-filter {
  background-color: rgb(66, 70, 74);
  background-size: cover;
  color: white;
}

.currency-filter > label {
  padding: 8px 8px;
}

/* adapted from
 * https://stackoverflow.com/a/19928234/7961686
 * to style filter checkboxes as buttons
 * */

.currency-filter-option {
  position: absolute;
  visibility: hidden;
  opacity: 0;
}

/*.currency-filter-option-label {*/
  /*border: 2px solid black;*/
/*}*/

input[type=checkbox]+label:hover {
  border: 2px solid #4CAF50;
}

input[type=checkbox]+label {
  background-color: rgb(66, 70, 74);
  border: 2px solid rgba(66, 70, 74, 0);
  border-radius: 0px 5px;
  color: white;
  display: inline-block;
  font-size: 16px;
  font-style: italic;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  transition-duration: 0.4s;
}

input[type=checkbox]:checked+label {
  background-color: #4CAF50;
  color: lightgray;
}
