body {
  background-color: #000000;
  background-image: url("./content/bg-tree.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  font-family: "Marcellus","Cormorant Infant",sans-serif;
  font-size: 14pt;
}

@media screen and (max-width: 480px) {
  body {
    font-size: 8pt !important;
  }
}

table {
  border-collapse: collapse;
}

tr.hdr {
  font-weight: bold;
}

tr.first {
  border-top: 2px solid #66aaff;
}

tr.first > td {
  border-top: 1px solid #66aaff;
}

td {
  padding: 0.3em 1.2em;
}

tr.frist > td {
  padding-top: 1.5em;
}

nav {
  display: flex;
  max-width: 38em;
  margin: 2em auto 1.5em auto; /* 2em 20% 1.5em 20%;*/
  padding: 0.5em;
  background-color: rgba(255,255,255,0.75);
  border-radius: 0.75em;
}

@media (min-width: 481px) {
  nav {
    min-width: 32em;
  }
}

nav a:hover {
  background-color: rgba(0,0,0,0.25);
  color: #ffffff;
}

nav a, nav a:visited {
  flex: 1 0 auto;
  margin: 0 0.2em;
  border-radius: 0.4em;
  text-align: center;
  color: black;
  text-decoration: none;
}

nav a.selected {
  background-color: rgba(0,0,0,0.5);
  color: #ffffff;
}

/* Pop-up Dialog Box */

div.dlg {
  position: fixed;
  text-align: center;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.dlg:before {
  display:inline-block;
  width:0;
  height:100%;
  vertical-align:middle;
  content:"";
}

div.login,div#rsvp {
  display: inline-block;
  vertical-align: middle;
  margin: 2em;
  padding: 2em;
  border-radius: 0.5em;
  box-shadow: 0 0 5em 1em rgba(255,255,255,0.9);
  color: #ffffff;
}

div.login {
  background-color: rgba(0,0,0,0.25);
  max-width: 50%;
}

div#rsvp {
  background-color: rgba(0,0,0,1);
  width: 28em;
  max-width: 75%;
  max-height: calc(100vh - 8em);
  overflow-y: auto;
}

div#rsvp input[type="radio"], div#rsvp label {
  vertical-align: sub;
}

/* Main Content Window */

div.content {
  max-width: 40em;
  margin: 5em auto; /* 5em 8em;*/
  padding: 1em 2em;
  background-color: rgba(255,255,255,0.92);
  border-radius: 0.5em;
  box-shadow: 0 0 5em 1em rgba(0,0,0,0.9);
}

@media (min-width: 481px) {
  div.content {
    min-width: 32em;
  }
}

div.content.test {
  max-width: 80em;
  margin: 5em 2em;
  font-family: sans-serif;
  font-size: 12pt;
}

div.sechdr {
  font-size: 120%;
  text-align: center;
  font-style: italic;
  letter-spacing: 2pt;
  margin-bottom: 2em;
}

div.event {
  margin-bottom: 2em;
}

div.event:last {
  margin-bottom: 0;
}

div.two {
  display: grid;
  grid-template-columns: 12em auto;
}

div.two.small {
  grid-template-columns: 6em auto !important;
}

div#rsvp div.two.small {
  grid-template-columns: 4em auto !important;
}

div.three {
  display: grid;
  grid-template-columns: 3em auto 10em;
}

div.left {
  grid-column-start: 1;
  padding: 1em;
  text-align: right;
}

div.mid {
  grid-column-start: 2;
  padding: 1em;
}

div.two div.right {
  grid-column-start: 2;
  padding: 1em;
  text-align: left;
}

div.three div.right {
  grid-column-start 3;
  padding: 1em;
  text-align: left;
}

div#rsvp div.two div.left, div#rsvp div.two div.right {
  padding: 0.2em;
}

div.indent {
  margin-left: 2em;
}

div.faq {
  display: none;
}

a.faq {
  font-style: italic !important;
  color: #909090 !important;
}

img.icon {
  width: 1.5em;
  height: 1.5em;
}

h3 {
  font-size: 120%;
  font-weight: bold;
  margin: 0;
}

h4 {
  margin-top: 0;
  margin-bottom: 0.75em;
  font-size: 100%;
  font-weight: bold;
  text-decoration: underline;
}

p.nick,p.him {
  margin-left: 1em;
  margin-right: 5em;
  font-family: "Caveat";
  font-size: 1.2em;
}

p.rainbow,p.her {
  margin-left: 4em;
  margin-right: 1em;
  font-family: "Handlee";
  font-size: 1.1em;
}

a, a:visited {
  color: #66cc88;
}

.login input[type="text"] {
  margin: 0.5em;
  width: 5em;
  border: none;
  border-radius: 0.25em;
  background-color: rgba(255,255,255,0.75);
  color: #000000;
  font-family: inherit;
  font-size: 1.5em;
  text-align: center;
}

button,input[type="button"],input[type="submit"] {
  padding: 0.3em 1em;
  border: none;
  border-radius: 0.25em;
  background-image: linear-gradient(#20a230, #324200);
  font-family: inherit;
  font-size: 1em;
  color: #c0e0a0;
}

button,input[type="button"]:hover,input[type="submit"]:hover {
  background-image: linear-gradient(#40c250, #425210);
}

button,input[type="button"]:active,input[type="submit"]:active {
  background-image: linear-gradient(#00a200, #123200);
}

div.invite {
  text-align: center;
}

div.frame {
  display: inline-block;
  padding: 0.1em;
  background-color: #000000;
  line-height: 0;
}

img.invite {
  width: 30em;
  background-color: #000000;
  border: 0.1em solid #ffffff;
  padding: 0.2em;
  margin: 0;
}

.saved {
  animation-name: anim-saved;
  animation-duration: 1.5s;
}

@keyframes anim-saved {
  0%   { background-color: rgba(0,255,0,0.75); }
  100% { background-color: rgba(0,0,0,0); }
}

/* Dynamic Loading Progress */

div#loading {
  display: none;
  width: 100%;
  x-height: 100%;
  margin: auto 0;
  color: #cccccc;
}

span.loading {
  display: block;
  margin: initial auto;
  font-size: 150%;
  letter-spacing: 0.1em;
  text-align: center;
  animation: expand 10s ease-in-out infinite;
}

@keyframes expand {
  0% {
    opacity: 0%;
    filter: blur(1em);
    letter-spacing: 0.25em;
  }
  20% {
    opacity: 100%;
    filter: blur(0);
    letter-spacing: 0.25em;
  }
  95% {
    opacity: 66%;
    filter: blur(0.5em);
    letter-spacing: 1em;
  }
  100% {
    opacity: 0%;
    filter: blur(3em);
    letter-spacing: 1.5em;
  }
}

div.prog {
  position: relative;
  width: 0.25in;
  height: 0.25in;
  margin: 0.25in auto;
  border: 0.25em dotted #aaaaaa;
  border-radius: 50%;
  animation: rotation 2s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Gallery */

div#gallery {
  display: none; /* flex */
  position: fixed;
  top: 0;
  left: 0;
  flex-wrap: wrap;
  width: 100%;
  height: 100dvh;
}

div#imv, div#fs {
  display: flex;
}

div#imv {
  width: 100%;
  padding: 0.1em;
  background-color: rgba(0, 0, 0, 0.85);
}

div#imv img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

div#fs {
  min-width: calc(1in + 1.5em + 0.7em + 0.5em + 1.5em);
  min-height: calc(1in + 1.5em + 0.7em + 0.5em + 1.5em);
  scrollbar-gutter: stable;
  background-color: rgba(0, 0, 0, 0.75);
}

div.fsth {
  flex: none;
  height: 1in;
  width: 1in;
  float: left;
  margin: 1em;
  border: 0.25em solid rgba(255, 255, 255, 0.45);
  border-radius: 0.25em;
  padding: 0.35em;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #000000;
  box-shadow: 0.4em 0.4em 0.6em rgb(0, 0, 0, 0.75);
}

div.fsth.sel {
  border-color: #ffffff;
}

div.fsth:hover {
  border-color: #cccc00;
}

@media (orientation: landscape) {
  div#imv, div#fs {
    flex-direction: column;
  }
  
  div#imv {
    width: calc(100% - (1in + 1.5em + 0.7em + 0.5em + 1.5em + 0.2em));
    height: calc(100% - 0.2em);
  }
  
  div#fs {
    height: 100%;
    float: right;
    overflow-y: scroll;
  }
  
  div.fsth {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  }
}

@media (orientation: portrait) {
  div#imv, div#fs {
    flex-direction: row;
    width: 100%;
  }
  
  div#imv {
    height: calc(100dvh - (1in + 1.5em + 0.7em + 0.5em + 1.5em + 0.2em));
  }
  
  div#fs {
    overflow-x: scroll;
  }
  
  div.fsth {
    margin-left: 0.5em;
    margin-right: 0.5em;
  }
  
  div#gallery {
    padding-bottom: 1.7em;
  }
}

div#imnav {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
}

img#imgv {
  display: none;
}

div#imx, div#imp, div#imn {
  position: absolute;
  display: inline-block;
  text-align: center;
  font-family: sans-serif;
  font-size: 0.25in;
  font-weight: bold;
  background-color: #000000;
  x-border: 0.1em solid rgba(255, 255, 255, 0.5);
  opacity: 10%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transition: opacity 0.66s;
  cursor: default;
}

div#imx {
  right: 0%;
  top: 0;
  height: 0.5in;
  width: 0.5in;
  margin: 0.125in;
  background-image: url('content/navx.svg');
}

div#imp, div#imn {
  width: 0.75in;
  height: 100%;
  max-height: 1.5in;
  top: calc((100% - min(100%, 1.5in)) / 2);
}

div#imp {
  left: 0%;
  background-image: url('content/navl.svg');
  border-top-right-radius: 0.1in;
  border-bottom-right-radius: 0.1in;
}

div#imn {
  right: 0%;
  background-image: url('content/navr.svg');
  border-top-left-radius: 0.1in;
  border-bottom-left-radius: 0.1in;
}

div#imx:hover, div#imp:hover, div#imn:hover {
  opacity: 50%;
}

div#imx.dis, div#imp.dis, div#imn.dis {
  opacity: 10%;
}
