/* global styles */

:root {
  /* Chrome-only for now but this will allow smooth size transitions */
  interpolate-size: allow-keywords;
}

html {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  background-color: #f0f0f0;
  color: #303030;

  font-family: Futura, "Trebuchet MS", Arial, sans-serif;
  font-style: normal;
  font-variant: normal;
}

.fill-height {
  height: -webkit-fill-available;
  height: 100vh;
}

footer,
header {
  flex: 0;
  min-height: 50px;
  height: 50px;
  display: flex;
  align-items: center;
}

header#main-head {
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid #7c0028;
}

.header-identity {
  text-decoration: none;
  color: inherit;

  h1 {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 24px;
  }
}

h1, h2, h3, h4 {
  font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
  font-variant: common-ligatures small-caps;
}

#main-head>* {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#logo {
  height: 40px;
  margin: 0 10px 0 5px;
}

#main-foot {
  border-top: 1px solid #7c0028;
  justify-content: center;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 80vh;
  max-width: 100vw;
  overflow: hidden;

  padding: 8px;
  overflow-y: auto;
  background-color: #fafafa;
}

.btn, button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.25em 1em;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-variant: common-ligatures small-caps;
  text-decoration: none;
  
  img {
    height: 2em;
    width: 2em;
  }

  &:disabled {
    cursor: not-allowed;
    img {
      opacity: 0.5;
    }
  }

  &:not(:disabled):hover,
  &:not(:disabled):focus-visible {
    outline: #7c0028 auto 1px;
    background-color: #ddbfc67a;
  }
}

a.btn {
  &:not(:disabled):hover,
  &:not(:disabled):focus-visible {
   text-decoration: underline;
  }
}

a:focus-visible {
  outline: #7c0028 auto 1px;
}

/* util classes */

.u-hidden {
  display: none !important;
}

.u-flex {
  display: flex;
}

.u-left {
  text-align: left;
}

.u-center {
  text-align: center;
}

.fill-width {
  width: -webkit-fill-available;
  width: 100%;
}

.fill-height {
  height: -webkit-fill-available;
  height: 100vh;
}


/* web component placeholders */
site-header:not(:defined) {
  width: 100vw;
  height: 4em;
  background-color: white;
  border-bottom: 2px inset;

  * {
    display: none;
  }
}

/* view transitions */

@view-transition {
  navigation: auto;
  types: slide, forwards;
}