/**
 * ITnes Custom Popup Styles
 */

/* Overlay - tło popup */
.itnes-popup-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 99999 !important;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.itnes-popup-overlay.active {
    display: flex !important;
}

/* Container popup */
.itnes-popup-container {
    position: relative !important;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 90%;
    max-height: 90vh;
    animation: slideIn 0.3s ease-out;
}

/* Przycisk zamknięcia */
.itnes-popup-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 100000 !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.itnes-popup-close:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

/* Treść popup */
.itnes-popup-content {
    /* padding: 20px; */
    overflow-y: auto;
    max-height: 90vh;
}

/* Obrazek w popup */
.itnes-popup-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* HTML w popup */
.itnes-popup-html {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    text-align: center !important;
}

.itnes-popup-html > div {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.itnes-popup-html h1,
.itnes-popup-html h2,
.itnes-popup-html h3 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    color: #2c3e50 !important;
    text-align: center !important;
}

.itnes-popup-html p {
    margin-bottom: 15px !important;
    margin-top: 10px !important;
    text-align: center !important;
}

.itnes-popup-html a {
    color: #3498db !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.itnes-popup-html a:hover {
    color: #2980b9 !important;
    text-decoration: underline !important;
}

.itnes-popup-html img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto 15px auto !important;
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .itnes-popup-container {
        max-width: 95%;
        margin: 10px;
    }
    
    .itnes-popup-content {
        /*padding: 15px;*/
    }
    
    .itnes-popup-close {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .itnes-popup-container {
        max-width: 100%;
        border-radius: 5px;
        margin: 5px;
    }
    
    .itnes-popup-content {
        /*padding: 10px;*/
    }
    
    .itnes-popup-html {
        font-size: 14px;
    }
}
