:root {
  box-sizing: border-box;
  --dark: #263238;
  color: hsl(200, 19%, 10%);
  --header-height: 3rem;
  --accent: hsl(165, 100%, 30%);
  --accent-alt: hsl(165, 100%, 20%);
  --accent-alt2: hsl(165, 100%, 15%);
  --accent-alt2-trans: hsla(165, 100%, 15%, 0.5);
  --box-shadow: 0 0 0.75em rgba(0, 0, 0, 0.5);
  --text-shadow: 0.05em 0.05em 0.1em rgba(0, 0, 0, 0.75);
  --text-shadow-alt: 0.05em 0.05em 0.1em rgba(0, 0, 0, 0.25);
  --border-color: #EEE;
  --transition-time: 400ms;
  font-size: 19px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  :root {
    font-size: 17px;
  }
}

@media (max-width: 600px) {
  :root {
    font-size: 15px;
  }
}

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

html, body {
  height: 100%;
}

body {
  margin: 0 1rem;
  font-family: Arial, sans-serif;
  background: #F3F3F3;
}

input:not([type=checkbox]), select {
  font-size: inherit;
  box-shadow: var(--box-shadow);
  padding: 0.5rem;
  border: 0.125em solid var(--dark);
  background: #FFF;
  transition: all var(--transition-time);
  min-width: 0;
}

input:hover, select:hover {
  border-color: var(--accent-alt);
}

input:focus, select:focus {
  border-color: var(--accent);
  outline: none;
}

input[type="checkbox"] + .text {
  display: inline-block;
  transform: translateX(-1em);
  transition: all var(--transition-time);
}
input[type="checkbox"] + .text::before {
  content: " « ";
  color: var(--accent);
  font-weight: bold;
  position: relative;
  top: -2px;
  opacity: 0;
  transition: all var(--transition-time);
}
input[type="checkbox"]:focus + .text,
input[type="checkbox"]:hover + .text {
  transform: translateX(0);
}
input[type="checkbox"]:focus + .text::before,
input[type="checkbox"]:hover + .text::before {
  opacity: 1;
}

label.disabled span.text,
label.not-supported span.text {
  text-decoration: line-through;
}
label.disabled::after {
  content: "Notification permissions have been denied";
  display: block;
  font-size: 0.6em;
}
label.not-supported::after {
  content: "Notifications are not supported";
  display: block;
  font-size: 0.6em;
}

.install {
  background: var(--dark);
  color: #FFF;
  box-shadow: var(--box-shadow);
  border: 2px solid var(--border-color);
  padding: 0.5em 1em;
  font-weight: bold;
}
.install:focus {
  box-shadow: var(--box-shadow), 0 0 0.333em var(--accent);
  outline: none;
}
.install__icon {
  font-weight: bold;
  margin-right: 0.75em;
}
.install:disabled {
  color: #CCC;
}
.install--inactive {
  display: none;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}



.header {
  border-bottom: 0.1rem solid var(--border-color);
  background-color: var(--dark);
  box-shadow: var(--box-shadow);
  text-shadow: var(--text-shadow);
  color: #FFF;
  height: var(--header-height);
  margin: 0 -1rem;
  position: relative;
  z-index: 2;
}

.header__content {
  height: 100%;
  display: flex;
}

.header__container {
  display: flex;
  height: 100%;
  justify-content: space-between;
  align-items: center;
  flex: 1 1 0;
}

.header__hamburger {
  order: -1;
  width: var(--header-height);
  height: var(--header-height);
}

.header__hamburger a {
  display: block;
  font-size: calc(var(--header-height) / 2);
  width: 100%;
  height: 100%;
  line-height: var(--header-height);
  text-align: center;
}

@media screen and (min-width: 800px) {
  .header__hamburger {
    display: none;
  }
}

.header h1 {
  font-size: inherit;
  font-weight: bold;
  margin: 0;
  padding: 0 1rem;
  flex: 1 1 0;
}

.header h1 span {
  font-weight: normal;
}

@media (max-width: 640px) {
  .header h1 span {
    display: none;
  }
}

.header p {
  padding: 0 1rem;
}

.header a {
  cursor: pointer;
  text-decoration: none;
}

.header a span {
  border-bottom: 0.1em solid rgba(255, 255, 255, 0.5);
}

.header a:hover span { border-bottom-color: rgba(255, 255, 255, 0.8); }
.header a:focus span,
.header a:active span { border-bottom-color: var(--accent); }



.sidebar {
  background: #FFF;
  box-shadow: var(--box-shadow);
  flex: 0 0 320px;
  order: -1;
  margin: 0 1rem 0 -1rem;
}

@media screen and (max-width: 800px) {
  .sidebar {
    position: absolute;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 1;
    margin: 0;
    width: 320px;
    transition: transform var(--transition-time),
                box-shadow var(--transition-time);
  }
  body:not(.sidebarOpened) .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
}

.sidebar h2 {
  font-size: 1.2rem;
  margin: 1rem;
}

.sidebar p {
  margin: 1rem;
}

.swstatus {
  font-size: 0.8em;
}

.sidebar a {
  text-decoration: none;
}

.sidebar a:link,
.sidebar a:visited {
  color: var(--accent-alt2);
  border-bottom: 2px solid var(--accent-alt2-trans);
}
.sidebar a:hover {
  border-bottom-color: transparent;
}
.sidebar a:focus,
.sidebar a:active {
  border-bottom-color: transparent;
  background: var(--accent);
  color: #FFF;
  outline: 1px solid var(--accent);
}



.overlay {
  background: rgba(0, 0, 0, 0.75);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  transition: opacity var(--transition-time),
              z-index var(--transition-time);
}
@media screen and (min-width: 800px) {
  .overlay {
    display: none;
  }
}
body:not(.sidebarOpened) .overlay {
  opacity: 0;
  z-index: -1;
}



.content {
  display: flex;
  height: calc(100% - var(--header-height));
}

.calculator {
  margin: 0;
  flex: 1 1 auto;
  max-width: 768px;
}

.main {
  display: flex;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0 1rem 1rem 1rem;
  background: var(--accent-alt);
  border: 0.1rem solid var(--border-color);
  box-shadow: var(--box-shadow);
  position: relative;
  opacity: 0;
  transition: opacity var(--transition-time);
}

body.loaded .main {
  opacity: 1;
}

.currency {
  flex: 1 1 0;
}
.currency__select {
  width: 100%;
}
.currency:first-child {
  margin-right: 1rem;
}
.currency:last-child {
  margin-left: 1rem;
}

@media
  (min-width: 800px) and (max-width: 900px),
  (max-width: 500px) {
  .main {
    display: block;
  }
  .currency:first-child {
    margin-right: 0;
  }
  .currency:last-child {
    margin-left: 0;
  }
}

.currency h2 {
  font-size: inherit;
  font-weight: normal;
  color: #FFF;
  text-shadow: var(--text-shadow);
}

.result {
  margin-top: 2rem;
  padding: 0 1.25rem;
  display: flex;
  opacity: 0;
  transition: opacity var(--transition-time);
}

body.loaded .result {
  opacity: 1;
}

.result section {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
}
.result section:first-child {
  margin-right: 1rem;
}
.result section:last-child {
  margin-left: 1rem;
}

@media
  (min-width: 800px) and (max-width: 900px),
  (max-width: 500px) {
  .result {
    display: block;
  }
  .result section:first-child {
    margin-right: 0;
  }
  .result section:last-child {
    margin-left: 0;
  }
}

.amount--home {
  font-size: 1.6rem;
}
.amount__input--travel {
  flex: 1 1 0;
  margin-right: 0.5rem;
}
.amount__output--home {
  display: inline-block;
  padding: 0.1em;
  font-weight: bold;
  background: hsl(98, 42%, 82%);
  margin-right: 0.5ch;
}

@media
  (min-width: 800px) and (max-width: 900px),
  (max-width: 500px) {
  .result {
    flex-wrap: wrap;
  }
  .amount--home {
    margin-top: 1.5rem;
    width: 100%;
    font-size: 2rem;
  }
}