#popup {
    position: fixed;
    bottom: 0px;
    left: 0px;
    display: none;
    width: 75%;
    padding: 2em;
    z-index: 5000;
    background: rgba(0, 0, 0, .4);
}

#popup-image {
    background: url("../images/warsztaty/popup.jpg") no-repeat top center;
    background-size: contain;
}

img.popupimage {
    display: none;
}

#popup, #popup h2, #btn {
    color: white !important;
}

#popup h2 {
    text-align: center !important;
    font-family: Pauline, serif;
}

#btn {
    margin-top: 1em;
    margin-right: 2em;
    float: right;
    padding: 10px 30px;
    background: rgba(255, 255, 255, .2);
    cursor: pointer;
}

a:hover #btn {
    background: rgba(255, 255, 255, .5);
}

#popup div.row, #popup-text {
    display: flex;
}

#popup-text {
    height: 100%;
    flex-flow: column nowrap;
    align-content: space-between;
}

.popupimage {
    width: 100%;
    height: auto;
/*    display: none;*/
}

#popup-text h2 {
    margin-bottom: 5px;
}

.centered {
    display: flex;
    justify-content: center;
}

.by-text {
    font-style: italic;
    font-size: 16px;
    opacity: .9;
}

.close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  opacity: 0.6;
  cursor: pointer;
}
.close:hover {
  opacity: 1;
}
.close:before, .close:after {
  position: absolute;
  left: 11px;
  content: ' ';
  height: 23px;
  width: 2px;
  background-color: #FFF;
}
.close:before {
  transform: rotate(45deg);
}
.close:after {
  transform: rotate(-45deg);
}

@media only screen and (max-width: 850px) {
    #popup {
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, .7);
    }

    #btn-parent {
        display: flex;
        justify-content: center;
    }

    #popup-txt {
        text-align: center !important;
    }

    #popup h2 {
        text-align: center !important;
    }

#btn {
    float: none;
    margin: 1em auto 0em auto;
    display: inline-block;
}

    #popup div.row {
        flex-wrap: nowrap;
        flex-direction: column-reverse;
        justify-content: space-around;
        align-content: space-around;
        height: 100%;
    }    

    #popup-info {
        width: 100% !important;
    }

    #popup-image {
        width: 100% !important;
        height: 40%;
    }

}