/* Brand Hero */

#playAudioButton {
    position: absolute;
    bottom: 0px;
    right: 100px;
    z-index: 4000 !important;
    width: 220px;
    height: 285px;
    background: url('../images/pause.gif') no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, background-image 0.6s ease-in-out;
    visibility: hidden;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#playAudioButton.show {
    opacity: 1;
    visibility: visible;
}

#playAudioButton:focus {
    outline: none;
}

@media (max-width: 768px) {

#playAudioButton {
    right: 60px;
    width: 116px;
    height: 150px;
}
}



/* Popup iframe */

body {
    margin: 0;
	font-family: Roboto, sans-serif;
}
        
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out;
    z-index: 4099;
}

#popupContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60%;
    height: 70%;
    background: white;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    z-index: 4100;
}

#popupHeader {
    background: white;
    padding: 10px;
    height: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#popupHeader button {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

#popupContent {
    flex-grow: 1;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

@media (max-width: 768px) {

#popupContainer {
    width: 95%;
    height: 80%;
}
}



/* Popup zdjecie */


#imagePopupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 4099;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
}

#imagePopupContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 20px;
    z-index: 4100;
    /* Usunięto padding z container, aby to content zarządzał przestrzenią */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    max-width: 95vw;
    max-height: 90vh; /* Zwiększona max-height dla większej elastyczności */
    box-sizing: border-box;
    display: flex; /* Dodano flexbox */
    justify-content: center; /* Wyśrodkowanie w poziomie */
    align-items: center; /* Wyśrodkowanie w pionie */
    padding: 20px; /* Dodano padding bezpośrednio do kontenera */
}

#closeImagePopup {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: url('../images/close-2.png') no-repeat center center;
    background-size: 100% 100%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 2;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#imagePopupContent {
    /* Usunięto padding i ustawienia wysokości/szerokości, ponieważ teraz container jest flex i ma padding */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Upewnij się, że zawartość zajmuje całą dostępną szerokość */
    height: 100%; /* Upewnij się, że zawartość zajmuje całą dostępną wysokość */
}

#popupImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain; /* Kluczowa właściwość - obraz będzie skalowany w dół, zachowując proporcje i nie będzie ucinany */
    border-radius: 10px;
    display: block;
}

@media (max-width: 768px) {
    #imagePopupContainer {
        width: 95vw !important;
        max-height: 90vh; /* Zwiększona max-height dla urządzeń mobilnych */
    }
}




/* Wirtualna pocztowka */

#postcard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    pointer-events: none;
}

#capture-btn {
	position: fixed;
	bottom: 4vh;
	left: 50%;
	transform: translateX(-50%);
	background: none;
	border: none;
	cursor: pointer;
	pointer-events: all;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

#capture-btn img {
    width: 100px;
	height: auto;
}

#close-btn {
    position: absolute;
    top: 13px;
    right: 13px;
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: all;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

#close-btn img {
    width: 64px;
    height: 64px;
}

#close-preview {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

#close-preview img {
	width: 44px;
	height: 44px;
}
#preview-popup {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 20px;
	border-radius: 20px;
	opacity: 0;
	transition: opacity 0.6s ease-in-out;
	display: none;
	z-index: 999;
	max-width: 90%;
	width: 60%;
	text-align: center;
}

#preview-popup.show {
    opacity: 1;
}

#preview-popup img {
    max-width: 100%;
    max-height: 100%;
}

#preview-img {
	max-width: 100%;
	border-radius: 10px;
}

#capture-btn, #close-btn {
	opacity: 0;
	transition: opacity 0.6s ease-in-out;
}

#capture-btn.show, #close-btn.show {
	opacity: 1;
}

#capture-btn.hide, #close-btn.hide {
	opacity: 0;
}

#preview-popup.show {
	opacity: 1;
	display: block;
}

#overlay-dark {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.6s ease-in-out;
	display: none;
	z-index: 998;
}

#overlay-dark.show {
	opacity: 1;
	display: block;
}

#preview-popup.show {
	opacity: 1;
	display: block;
}

#overlay-dark.hide {
	opacity: 0;
}

#preview-popup.hide {
	opacity: 0;
}

.share-container {
	margin-top: 15px;
}

.share-container p {
	font-size: 14px;
	font-weight: bold;
	margin-bottom: 12px;
}

.share-buttons {
	display: flex;
	justify-content: center;
	gap: 13px;
	-webkit-tap-highlight-color: transparent;
}

.share-buttons img {
	width: 44px;
	height: 44px;
	cursor: pointer;
}

#watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 10%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}

#watermark.show {
	opacity: 1 !important;
	pointer-events: auto;
}

#watermark.hide {
	opacity: 0 !important;
	pointer-events: none;
}

@media (max-width: 768px) {

#capture-btn {
    bottom: 2vh;
}

#capture-btn img {
    width: 64px;
}

#close-btn img {
    width: 44px;
    height: 44px;
}

#close-btn {
    top: 10px;
    right: 10px;
}

#watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 20%;
}
}



/* Popup mieszkania */

.popup {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: 9999;
    padding: 24px;
    width: 100%;
    max-width: 600px;
    min-width: 400px;
    box-sizing: border-box;
}

.popup.show {
    transform: translateX(-50%) translateY(0%);
    opacity: 1;
}

.popup.hidden {
    display: none;
}

.popup-content {
    position: relative;
    padding-top: 0;
}

.popup-body {
    display: flex;
    gap: 16px;
    align-items: center;
}

.popup-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.popup-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-content li {
    margin-bottom: 6px;
    font-size: 1rem;
}

.popup-close {
    position: absolute;
    top: -24px;
    right: -14px;
    font-size: 34px;
    cursor: pointer;
    color: #d90000;
    z-index: 10000;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.popup-close:hover {
    color: #333;
}

.popup a {
    color: #0066cc;
    text-decoration: underline;
}

.popup-plan {
    width: 300px;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 768px) {

.popup {
    left: 10px;
    right: 10px;
    transform: translateY(100%);
    width: auto;
    max-width: none;
    margin: 0 auto;
}

.popup.show {
    transform: translateY(0%);
}

.popup-body {
    flex-direction: column;
    align-items: center;
}

.popup-plan {
    width: 100%;
    max-height: 180px;
}

.popup-details {
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.popup-content ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 8px;
    justify-content: space-between;
}

.popup-content li {
    width: 48%;
    font-size: 0.75rem;
    margin-bottom: 0px;
}

.popup-close {
    position: absolute;
    top: -28px;
    right: -10px;
    font-size: 54px;
    cursor: pointer;
    color: #d90000;
    z-index: 10000;
}
		  
.popup-content h2 {
    font-size: 1rem;
    text-align: center;
}
}

