/**
 * GeoPopup Styles
 * Responsive and animation-ready
 */

.geopopup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.geopopup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none; /* Standard: nicht blockieren */
}

.geopopup-overlay.blocking {
    pointer-events: auto; /* Nur wenn blockieren gewünscht */
}

.geopopup-container.geopopup-active .geopopup-overlay {
    opacity: 1;
}

.geopopup-content {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    min-width: 300px;
    min-height: 150px;
    overflow: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.geopopup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.geopopup-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.geopopup-inner {
    padding: 20px;
}

/* Positions */
.geopopup-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.geopopup-position-top-center {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.geopopup-position-bottom-center {
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.geopopup-position-right-center {
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

.geopopup-position-left-center {
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

/* Animations - Initial State */
.geopopup-animation-fade-center {
    opacity: 0;
}

.geopopup-animation-slide-up-center {
    opacity: 0;
    transform: translate(-50%, 100vh);
}

.geopopup-animation-slide-up-center-auto {
    opacity: 0;
    transform: translate(-50%, 100vh);
}

.geopopup-animation-slide-up-bottom {
    opacity: 0;
    transform: translateY(100%);
}

.geopopup-animation-slide-up-bottom-auto {
    opacity: 0;
    transform: translateY(100%);
}

.geopopup-animation-slide-left-right {
    opacity: 0;
    transform: translateX(100%);
}

.geopopup-animation-slide-left-right-center {
    opacity: 0;
    transform: translateY(-50%) translateX(100%);
}

.geopopup-animation-scale-center {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}

.geopopup-animation-slide-down-top {
    opacity: 0;
    transform: translateY(-100%);
}

.geopopup-animation-bounce-center {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

/* Animations - Active State */
.geopopup-container.geopopup-active .geopopup-animation-fade-center {
    opacity: 1;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-up-center {
    opacity: 1;
    animation: slideUpToCenter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-up-center-auto {
    opacity: 1;
    animation: slideUpToCenter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-up-bottom {
    opacity: 1;
    animation: slideUpFromBottom 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-up-bottom-auto {
    opacity: 1;
    animation: slideUpFromBottom 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-left-right {
    opacity: 1;
    animation: slideFromRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-left-right-center {
    opacity: 1;
    animation: slideFromRightCenter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-scale-center {
    opacity: 1;
    animation: scaleInCenter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-slide-down-top {
    opacity: 1;
    animation: slideDownFromTop 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.geopopup-container.geopopup-active .geopopup-animation-bounce-center {
    opacity: 1;
    animation: bounceInCenter 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Keyframes */
@keyframes slideUpToCenter {
    from {
        transform: translate(-50%, 100vh);
    }
    to {
        transform: translate(-50%, -50%);
    }
}

@keyframes slideUpFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideFromRightCenter {
    from {
        transform: translateY(-50%) translateX(100%);
    }
    to {
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes scaleInCenter {
    from {
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideDownFromTop {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes bounceInCenter {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Position Styles */
.geopopup-style-fade-center,
.geopopup-style-slide-up-center,
.geopopup-style-slide-up-center-auto,
.geopopup-style-scale-center,
.geopopup-style-bounce-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.geopopup-style-slide-up-center-auto {
    width: auto;
    min-width: auto;
}

.geopopup-style-slide-up-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.geopopup-style-slide-up-bottom-auto {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
    border-radius: 8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.geopopup-style-slide-down-top {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.geopopup-style-slide-left-right {
    bottom: 20px;
    right: 0;
    top: auto;
    transform: none;
    max-width: 400px;
    height: auto;
    max-height: 90vh;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.geopopup-style-slide-left-right-center {
    top: 50%;
    right: 0;
    bottom: auto;
    left: auto;
    max-width: 400px;
    height: auto;
    max-height: 90vh;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .geopopup-content {
        max-width: 95%;
        max-height: 80%;
        min-width: 280px;
    }
    
    .geopopup-inner {
        padding: 15px;
    }
    
    .geopopup-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

/* Scrollbar styling */
.geopopup-content::-webkit-scrollbar {
    width: 8px;
}

.geopopup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.geopopup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.geopopup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}