/*
=====
DEPENDENCES
=====
*/

/* 
helper to reset default browser's styles from headings
*/

.r-title{
    margin-top: var(--rTitleMarginTop, 0) !important;
    margin-bottom: var(--rTitleMarginBottom, 0) !important;
}

/* 
helper to hide elements that are available only for screen readers. 
*/

.screen-reader{
  width: var(--screenReaderWidth, 1px) !important;
  height: var(--screenReaderHeight, 1px) !important;
  padding: var(--screenReaderPadding, 0) !important;
  border: var(--screenReaderBorder, none) !important;

  position: var(--screenReaderPosition, absolute) !important;
  clip: var(--screenReaderClip, rect(1px, 1px, 1px, 1px)) !important;
  overflow: var(--screenReaderOverflow, hidden) !important;
}

/*
=====
POPUP
=====
*/

/*
1. Creating the top and bottom gaps for the modal so that content doesn't touches window's edges
*/

.popup:not(:target){
  display: none;
}

.popup:target{
  width: 100%;
  height: 100vh;
  
  display: flex;
  justify-content: center;
 
  position: fixed;
  top: 0;
  right: 0;  
}

.popup::before{
  content: "";
  box-sizing: border-box;
  width: 100%;
  background-color: #ffffff;

  position: fixed;
  left: 0;
  top: 50%;
}

.popup::after{
  content: "";
  width: 0;
  height: 2px;
  background-color: #f0f0f0;

  position: absolute;
  top: 50%;
  left: 0;
  margin-top: -1px;
}

.popup__container{
  box-sizing: border-box;  
  color: #000000;
  height: calc(100vh - 40px); /* 1 */
  overflow: auto; /* 1 */
  overscroll-behavior: contain; /* 1 */
  padding: 20px;
  
  
}

.popup__content{
    
}

.popup__title{
  --rTitleMarginBottom: 1.5rem;
  font-size: 1.5rem;
}

.popup__close{
  width: 30px;
  height: 30px;;

  position: fixed;
  top: 3px;
  right: 3px;
  z-index: 9999;

  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  background-image: url('https://buslo.pl/new_buslo/src/img/core/close.png');
}

/*
animation
*/

.popup::before{
  will-change: height, top;
  animation: open-animation .6s cubic-bezier(0.83, 0.04, 0, 1.16) .65s both;
}

.popup::after{
  will-change: width, opacity;
  animation: line-animation .6s cubic-bezier(0.83, 0.04, 0, 1.16) both;
}

@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__container{
  animation: fade .5s ease-out 1.0s both;
  position: relative;
}

@keyframes fade{

  0%{
    opacity: 0;
  }

  100%{
    opacity: 1;
  }
}

/*
=====
DEMO
=====
*/



p{
  margin: 0;
  line-height: 1.5;
}

p:nth-child(n+2){
  margin-top: 1rem;
}



.page{
  min-height: 100vh;
  display: flex;
}

.page__container{
  max-width: 1200px;
  padding-left: .75rem;
  padding-right: .75rem;  
  margin: auto;
}


