/* GlivMED Promo Popup - Styles */

/* Overlay - ciemne tło */
.glivmed-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    align-items: flex-end;
    justify-content: flex-end;
    padding-bottom: 20px;
    padding-right: 20px;
    will-change: opacity;
    contain: layout style paint;
}

.glivmed-popup-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Modal - główne okno popupu */
.glivmed-popup-modal {
    position: relative;
    background: #ffffff;
    border-radius: 12px 0 0 12px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    contain: layout style paint;
    margin-right: 0;
    margin-bottom: 0;
}

.glivmed-popup-overlay.active .glivmed-popup-modal {
    transform: translateX(0);
    opacity: 1;
}

/* Rozmiary popupu */
.glivmed-popup-small {
    width: 500px;
}

.glivmed-popup-medium {
    width: 700px;
}

.glivmed-popup-large {
    width: 900px;
}

.glivmed-popup-full {
    width: 1200px;
}

/* Przycisk zamknięcia */
.glivmed-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: Arial, sans-serif;
}

.glivmed-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.glivmed-popup-close:focus {
    outline: 2px solid #C4A57B;
    outline-offset: 2px;
}

/* Wrapper treści */
.glivmed-popup-content-wrapper {
    display: flex;
    padding: 40px;
    gap: 30px;
}

/* Pozycje obrazka - Top */
.glivmed-popup-image-top .glivmed-popup-content-wrapper {
    flex-direction: column;
}

.glivmed-popup-image-top .glivmed-popup-image {
    width: 100%;
}

.glivmed-popup-image-top .glivmed-popup-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Pozycje obrazka - Left */
.glivmed-popup-image-left .glivmed-popup-content-wrapper {
    flex-direction: row;
}

.glivmed-popup-image-left .glivmed-popup-image {
    flex: 0 0 40%;
}

.glivmed-popup-image-left .glivmed-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.glivmed-popup-image-left .glivmed-popup-text {
    flex: 1;
}

/* Pozycje obrazka - Right */
.glivmed-popup-image-right .glivmed-popup-content-wrapper {
    flex-direction: row-reverse;
}

.glivmed-popup-image-right .glivmed-popup-image {
    flex: 0 0 40%;
}

.glivmed-popup-image-right .glivmed-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.glivmed-popup-image-right .glivmed-popup-text {
    flex: 1;
}

/* Pozycja obrazka - Background */
.glivmed-popup-image-background .glivmed-popup-content-wrapper {
    position: relative;
    background-size: cover;
    background-position: center;
}

.glivmed-popup-image-background .glivmed-popup-text {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
}

/* Tekst w popupie */
.glivmed-popup-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glivmed-popup-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: inherit;
}

.glivmed-popup-description {
    font-size: 16px;
    line-height: 1.6;
}

.glivmed-popup-description p {
    margin: 0 0 15px;
}

.glivmed-popup-description p:last-child {
    margin-bottom: 0;
}

/* Przycisk */
.glivmed-popup-button {
    display: block;
    margin: 20px auto 0;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 300px;
    width: 100%;
}

.glivmed-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* Responsive - tablet */
@media (max-width: 1024px) {
    .glivmed-popup-small,
    .glivmed-popup-medium,
    .glivmed-popup-large,
    .glivmed-popup-full {
        width: 90%;
        max-width: 700px;
    }
}

/* Responsive - mobile */
@media (max-width: 768px) {
    .glivmed-popup-overlay {
        padding: 0;
    }
    
    .glivmed-popup-modal {
        max-width: 100%;
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
    }

    .glivmed-popup-content-wrapper {
        padding: 30px 20px;
        gap: 20px;
    }

    .glivmed-popup-image-left .glivmed-popup-content-wrapper,
    .glivmed-popup-image-right .glivmed-popup-content-wrapper {
        flex-direction: column;
    }

    .glivmed-popup-image-left .glivmed-popup-image,
    .glivmed-popup-image-right .glivmed-popup-image {
        flex: 0 0 auto;
        width: 100%;
    }

    .glivmed-popup-title {
        font-size: 24px;
    }

    .glivmed-popup-description {
        font-size: 14px;
    }

    .glivmed-popup-button {
        padding: 12px 30px;
        font-size: 14px;
        width: 100%;
    }

    .glivmed-popup-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

/* Animacja wejścia */
@keyframes popupSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Scrollbar dla długiego contentu */
.glivmed-popup-modal::-webkit-scrollbar {
    width: 8px;
}

.glivmed-popup-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.glivmed-popup-modal::-webkit-scrollbar-thumb {
    background: #c4a57b;
    border-radius: 10px;
}

.glivmed-popup-modal::-webkit-scrollbar-thumb:hover {
    background: #b39569;
}
