/* Popup opisy */


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.6);
	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;
	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: 15px;
	height: 30px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

#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;
}

@media (max-width: 768px) {
	
	#popupContainer {
	width: 95%;
	height: 80%;
	}
	
}


/* Samouczek */


#tutorial-overlay,
#tutorial-welcome-popup,
#tutorial-step-popup {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0s linear 0.6s;
    position: fixed;
    z-index: 10000;
}

#tutorial-overlay.visible,
#tutorial-welcome-popup.visible,
#tutorial-step-popup.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease-in-out, visibility 0s linear 0s;
}

#tutorial-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0s linear 0.6s;
    position: fixed;
    z-index: 10000;
}

#tutorial-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease-in-out, visibility 0s linear 0s;
}

.tutorial-popup {
    background-color: #fff;
    padding: 25px;
    text-align: center;
    min-width: 300px;
    max-width: 500px;
    box-sizing: border-box;
	border-radius: 20px;
}

#tutorial-welcome-popup {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-footer {
    margin-top: 25px; 
    text-align: center;
}

.popup-footer a {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}

.tutorial-welcome-maker {
    font-size: 1.8em;
	font-weight: bold;
	margin-top: 10px;
}

.tutorial-s360 {
    font-size: 0.8em;
	margin-bottom: 5px;
}

.popup-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-10px);
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

#tutorial-welcome-popup .tutorial-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.tutorial-step-popup-layout {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    padding-top: 20px;
}

#tutorial-step-popup p {
	font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

#tutorial-welcome-popup button,
#tutorial-step-popup button {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
	font-weight: bold;
    transition: background-color 0.3s ease;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	border-radius: 10px;
}

#tutorial-start-button,
#tutorial-next-button {
    background-color: #83abcc;
    color: white;
    outline: none;
	-webkit-tap-highlight-color: transparent;
}

#tutorial-start-button:hover,
#tutorial-next-button:hover {
    background-color: #628099;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

#tutorial-skip-button {
    background-color: #6c757d;
    color: white;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

#tutorial-skip-button:hover {
    background-color: #545b62;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.tutorial-close-button {
    position: absolute;
    top: 0px; 
    right: 0px; 
    background: transparent;
    border: none;
    padding: 10px 10px !important;
    cursor: pointer;
    line-height: 1;
    font-size: 0;
    z-index: 10;
    outline: none;
	-webkit-tap-highlight-color: transparent;
}

.tutorial-close-button img {
    width: 26px;
    height: 26px;
    display: block;
}

.tutorial-close-button:hover {
    opacity: 0.8;
}


@media (max-width: 768px) {
    .tutorial-popup {
        width: 90%; 
        max-width: 90%;
        max-height: 90vh; 
        overflow-y: auto;
        padding: 20px;
        padding-top: 20px;
    }

    #tutorial-welcome-popup {
        width: 90%;
    }

    #tutorial-welcome-popup .tutorial-buttons {
        gap: 10px;
    }

    .tutorial-close-button {
        top: 0px;
        right: 0px;
    }

    .tutorial-close-button img {
        width: 28px;
        height: 28px;
		outline: none;
		-webkit-tap-highlight-color: transparent;
    }
}


/* 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: 110px;
			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;
		}
		
		/* Klasa do aktywowania fade-in */
		#preview-popup.show {
			opacity: 1;
			display: block;
		}

		/* Czarne przyciemnienie tła */
		#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;
		}

		/* Klasy aktywujące efekt fade-in */
		#overlay-dark.show {
			opacity: 1;
			display: block;
		}

		#preview-popup.show {
			opacity: 1;
			display: block;
		}

		/* Klasy do efektu fade-out */
		#overlay-dark.hide {
			opacity: 0;
		}

		#preview-popup.hide {
			opacity: 0;
		}
		/* Sekcja udostępniania */
		.share-container {
			margin-top: 15px;
		}

		.share-container p {
			font-family: 'Montserrat', sans-serif;
			font-size: 14px;
			font-weight: bold;
			margin-bottom: 12px;
		}

		/* Przyciski udostępniania */
		.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) {
            
			#popupContainer {
            width: 95%;
            height: 80%;
            }
			
			#playAudioButton {
            right: 60px;
            width: 116px;
            height: 150px;
			}
			
			#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%;
			}
			
        }