.popup{
 width: 100%; 
  height: 100%;
  max-height: 670px;
  display: none;
  position: absolute;
  top: 0;
  z-index: 9999999;
  border-radius: 1em;
}

#popup-article:target,
#popup-cookie:target { display: flex; }

#popup-cookie > div.popup__block > h4 { font-size: 1.2em; margin-bottom: 1em; }

#popup-cookie #cookie_details {
  display: none;
}

#popup-cookie #cookie_details > div {
  background-color: rgba(0,0,0,.05);
    padding: .8em;
}

#popup-cookie #cookie_details > div > p {
  font-size: .9em;
}

#popup-cookie #cookie_details .left,
#popup-cookie #cookie_details .right {
  width: 45%;
  font-size: .6em;
  padding: .5em;
  background-color: rgba(0,0,0,.1);
}

#popup-cookie button {
  font-family: helvetica, arial, tahoma, verdana, sans-serif;
  cursor: pointer;
  font-weight: bold;
  color: #3b3838;
  padding: 1.2em 2em;
  overflow: visible; /* sonst wird in IE 6/7 das horizontale Padding nicht beruecksichtigt */  
 	/*display: inline-block;*/
	margin: 1.2em 0 0 0;
  border-radius: 1em;
  border: 0;
  width: 100%
}

#popup-cookie button.greyb {
  background: #EAEAEA;
}

#popup-cookie button.redb {
  background: #D61539;
  color: #ffffff;
}

#popup-cookie button#policy_notwendig,
#popup-cookie button#policy_alle,
#popup-cookie button#policy_info {
  padding: 1.2em 2em 1.2em 4.5em;
  background-size: auto 50%;
  background-repeat: no-repeat;
  background-position: 1.2em center;
}


#popup-cookie button#policy_notwendig {
  background-image: url('/css/images/no.svg');
}

#popup-cookie button#policy_info {
 background-image: url('/css/images/no_dummy.svg');
}

#popup-cookie button#policy_alle {
  background-image: url('/css/images/ok.svg');
}

#popup-cookie button:hover,
#popup-cookie button:focus {
    -webkit-box-shadow: rgba(0,0,0,0.4) 0 0 0.3em;
    -moz-box-shadow: rgba(0,0,0,0.4) 0 0 0.3em;
    box-shadow: rgba(0,0,0,0.4) 0 0 0.3em;
}

.popup:before{
  content: "";
  box-sizing: border-box;
  width: 100%;
  background-color: rgba(0,0,0,.4);
  position: fixed;
  left: 0;
  top: 50%;
  will-change: height, top;
  animation: open-animation .6s cubic-bezier(0.83, 0.04, 0, 1.16) .65s both;
}

.popup:after{
  content: "";
  width: 0;
  height: 2px;
  background-color: rgba(240,240,240,1);
  will-change: width, opacity;
  animation: line-animation .6s cubic-bezier(0.83, 0.04, 0, 1.16) both;
  position: absolute;
  top: 50%;
  left: 0;
  margin-top: -1px;
}

@keyframes line-animation{
  0%{ width: 0; opacity: 1; }
  99%{ width: 100%; opacity: 1; }
  100%{ width: 100%; opacity: 0; }  
}

@keyframes open-animation{
  0%{ height: 0; top: 50%;  }
  100%{  height: 100vh; top: 0; }
}

.popup__block{
  border: 0;
  font-size: 1em;
  padding: 1em;
  margin: 0.8em;
  max-width:50em;
  border-radius: 1em;
  height:97%;
  box-sizing: border-box;
  position: relative;
  overflow: auto;
  animation: fade .5s ease-out 1.3s both;
  background-color: rgba(255,255,255,1);
}

.popup__block div.flex1 {
  height: auto;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.popup__block div.flex2 {
  height: 19em;
  width: 100%;
}


div#popup-cookie > div.popup__block {
  display: flex;
  flex-direction: column;
}

#cookie_details ul {
  padding-left: 1em;
}

#cookie_details ul li {
  font-size: .8em;
}




@keyframes fade{
  0%{ opacity: 0; }
  100%{ opacity: 1; }
}

.popup__close {
  width: 3rem;
  height: 3rem;
  text-indent: -9999px;
  -webkit-border-radius: 3em; border-radius: 3em;
  border: .1em solid rgba(255,255,255,1);
  position: fixed;
  top: 2em;
  right: 2em;
  /*
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 60%;
  background-image: url('/images/close.svg');
  */
}
.popup__close:hover {
  background-color: rgba(255,255,255,.5);;
}

@media all and (max-width: 970px) {
  .popup:before{
    background-color: rgba(0,0,0,.4);
  }
  
}

@media all and (min-width: 680px) {
   .popup{
     width: 670px;
     left: calc(50% - 335px);

   }
}

@media all and (min-height: 670px) {
   .popup{
     top: calc(50% - 330px);
   }
}