/* From https://codepen.io/kristofferostlund/pen/Yqxopr/  */
/* All elements should be border-boxes */
* {
}
/*
  Hide the checkbox, as it's only works as the switch
  for the confirm-modal.
*/
#modaltext{
    margin-top:.3em;
  color: red;  
}
#modalheader{
  font: 600 175%/120% "segoe ui",helvetica,sans-serif;
}
#modalContext{
  display: none;
}
#modalData{
  display: none;
}
#ModalShow {
  display: none;
}

#modaltext, .btn {
  font-size: 1.5em;
  box-sizing: border-box;
  font: 500 150%/120% "segoe ui",helvetica,sans-serif;
  color: #8a8a8a;
}

button {
  outline: none !important;
}

/* Wraps everyting, nothing special */
#modalwrapper {
  width: 100%;
  padding: 10px;
  margin: 0 auto;
  text-align: center;
}

/*
  The sort of button-ish thingy.
  It should be wrapped by a label and
  should be followed by the checkbox.
*/
.btn {
  transition: background-color 0.2s;
  background-color: transparent;
  color: #8a8a8a;
  min-width: 3em;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  border: 1px solid #8a8a8a;
  user-select: none;
  display: inline-block;
  width: 300px;
  max-width: 90%;
  margin: 0 auto;
}
.btn:hover {
  color: #fafafa;
  background-color: #8a8a8a;
}
.btn:active, .btn:focus {
  color: #fafafa;
  background-color: #a0a0a0;
}

/*
  The modal background (the dark-ish overlay),
  which obviously could be a class instead of a form.

  For scroll to work as expected, the position is absolute,
  as position: fixed would not allow the page to scroll when the screen isn't tall enough.
*/
.confirm-modal {
  display: block;
  pointer-events: none;
  transition: opacity 0.5s;
}
.confirm-modal .btn {
  width: auto;
  max-width: auto;
  margin: auto;
}
.confirm-modal::before {
  /*
    The shadow/backdrop which also is clickable to close the modal.
  */
  content: "";
  display: block;
  background-color: rgba(0, 0, 0, 0.4);
/*  position: absolute; */
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 200px;
  z-index: 99;
  opacity: 1;
  pointer-events: none; /* none to force a button all to allow background click to close the modal */
}
.confirm-modal form {
  /*
    The actual modal.

    Note: to not have clicks inside the modal
    bleed through to the label (which would uncheck the checkbox),
    pointer-events are set to none on the modal.
  */
  position: absolute;  
  z-index: 999;
  transition: transform 0.75s;
  max-width: 90%;
  width: 22em;
  background-color: #fafafa;
  padding: 20px;
  left: 50%;
  transform: translate(-50%, 0);
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.2);
  color: #080808;
  border-radius: 5px;
  pointer-events: none;

}
/* Hide the modal when the checkbox isn't checked. */
input:not(:checked) + .confirm-modal, input:not(:checked) + .confirm-modal * {
    visibility: hidden;    
/*  opacity: 0; */
}
input:not(:checked) + .confirm-modal::before {
  height: 0;
  width: 0;
}

/* For that cute little fly down effect */
input:not(:checked) + .confirm-modal form {
  transform: translate(-50%, -100px);
}

/* Allow buttons to be clickable.*/
.confirm-modal button {
  pointer-events: all;
} 

