/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top of orbiting planets */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  /*
   * THE SAFE AREA, AND WHY A MODAL NEEDS IT WHEN THE PAGE DOES NOT.
   *
   * header.php sets viewport-fit=cover, so in an installed PWA the viewport
   * starts UNDER the status bar and notch. flexbox.css pays for that once,
   * with padding-top: env(safe-area-inset-top) on body -- which moves all
   * ordinary page content down into the visible area.
   *
   * A modal is position:fixed, so its containing block is the VIEWPORT, not
   * body. It never saw that padding. top:0 is therefore the true top of the
   * screen and the modal opened roughly fifty pixels above everything else,
   * with its header under the clock. Reported as modals "shifted up" in the
   * PWA, on every location and at every scroll position -- and invisible in
   * a browser tab, where every inset is 0 and these four lines do nothing.
   *
   * PADDING, NOT top/height. The dim background has to keep covering the
   * whole screen including the notch strip, or there is an undimmed band
   * above the overlay. Padding insets the CONTENT and leaves the backdrop
   * full-bleed. `* { box-sizing: border-box }` in flexbox.css is what keeps
   * height:100% honest once the padding is there.
   */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 65px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
/* Modal Header */
.modal-header {
  padding: 2px 16px;
  background-color: #000;
  color: white;
}

/* Modal Body */
.modal-body {padding: 2px 16px;}

/* Modal Footer */
.modal-footer {
  padding: 2px 16px;
  background-color: #000;
  color: white;
}

/* Modal Content */
.modal-content {
  position: relative;
  background-color: #000;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 0;
  border: 1px solid #888;
  width: 80%;
  max-width: 580px;
  min-height: 460px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
  animation-name: animatetop;
  animation-duration: 0.4s;
}

.modal-content input{
	margin-top: 10px;
}

#modal-image{
	max-width: 200px;
	float: left;
	margin-bottom: 40px;
}

#modal-text{
	position: relative;
	left: 20px;
	width: 95%;
}

#modal-text span{
	display: block;
    word-wrap:break-word;
    white-space: normal;
	padding-bottom: 12px;
}

/* Add Animation */
@keyframes animatetop {
  from {top: -300px; opacity: 0}
  to {top: 0; opacity: 1}
}

@media screen and (max-width: 700px) {
	#modal-image{
		float: none;
		width: 100%;
		max-width: none;
		margin-bottom: 0px;
	}
	#modal-text{
		position: relative;
		left: 0px;
		text-align: center;
	}
}