/**
 * Popup System CSS
 * Style dla systemu popupów na stronie głównej
 */

/* Overlay dla popupów */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Kontener popup */
.popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

/* Przycisk zamknij */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Tekst w popup'ach - obsługa linków */
.popup-text {
    line-height: 1.6;
}

.popup-text a {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.popup-text a:hover {
    color: #0056b3;
    text-decoration: none;
}

.popup-text a:visited {
    color: #6f42c1;
}

/* Pozycjonowanie popupów */
.popup-overlay.position-center {
    align-items: center;
    justify-content: center;
}

.popup-overlay.position-top {
    align-items: flex-start;
    padding-top: 50px;
}

.popup-overlay.position-bottom {
    align-items: flex-end;
    padding-bottom: 50px;
}

.popup-overlay.position-top-left,
.popup-overlay.position-top-right,
.popup-overlay.position-bottom-left,
.popup-overlay.position-bottom-right {
    background: transparent;
    pointer-events: none;
}

.popup-overlay.position-top-left .popup-container {
    position: fixed;
    top: 20px;
    left: 20px;
    max-width: 400px;
    pointer-events: all;
}

.popup-overlay.position-top-right .popup-container {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    pointer-events: all;
}

.popup-overlay.position-bottom-left .popup-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 400px;
    pointer-events: all;
}

.popup-overlay.position-bottom-right .popup-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    pointer-events: all;
}

/* Szablony designu */
.popup-content {
    padding: 2rem;
    text-align: center;
    position: relative;
}

/* Minimal template */
.popup-template-minimal {
    background: white;
    border: 1px solid #dee2e6;
}

.popup-template-minimal .popup-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.popup-template-minimal .popup-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.popup-template-minimal .popup-text a {
    color: #007bff;
    font-weight: 500;
}

.popup-template-minimal .popup-text a:hover {
    color: #0056b3;
}

.popup-template-minimal .popup-cta {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-template-minimal .popup-cta:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Glassmorphism template */
.popup-template-glassmorphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-template-glassmorphism .popup-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.popup-template-glassmorphism .popup-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.popup-template-glassmorphism .popup-text a {
    color: #007bff;
    font-weight: 500;
    text-shadow: none;
}

.popup-template-glassmorphism .popup-text a:hover {
    color: #0056b3;
}

.popup-template-glassmorphism .popup-cta {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.popup-template-glassmorphism .popup-cta:hover {
    background: rgba(0, 86, 179, 0.9);
    transform: translateY(-1px);
}

/* Gradient template */
.popup-template-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.popup-template-gradient .popup-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.popup-template-gradient .popup-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.popup-template-gradient .popup-text a {
    color: #ffeb3b;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.popup-template-gradient .popup-text a:hover {
    color: #fff59d;
}

.popup-template-gradient .popup-cta {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.popup-template-gradient .popup-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Corporate template */
.popup-template-corporate {
    background: #f8f9fa;
    border: 2px solid #007bff;
}

.popup-template-corporate .popup-title {
    color: #007bff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.popup-template-corporate .popup-text {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.popup-template-corporate .popup-text a {
    color: #007bff;
    font-weight: 600;
}

.popup-template-corporate .popup-text a:hover {
    color: #0056b3;
}

.popup-template-corporate .popup-cta {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-template-corporate .popup-cta:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Cookie Consent - specjalne style z bursztynowym przyciskiem */
[data-popup-type="cookie_consent"] .popup-cta,
.popup-type-cookie_consent .popup-cta {
    background: #FFBF00 !important;
    color: #000 !important;
    font-weight: 600;
}

[data-popup-type="cookie_consent"] .popup-cta:hover,
.popup-type-cookie_consent .popup-cta:hover {
    background: #FFA500 !important;
    color: #000 !important;
}

[data-popup-type="cookie_consent"] .popup-text a,
.popup-type-cookie_consent .popup-text a {
    color: #FFBF00 !important;
    font-weight: 600;
}

[data-popup-type="cookie_consent"] .popup-text a:hover,
.popup-type-cookie_consent .popup-text a:hover {
    color: #FFA500 !important;
}

[data-popup-type="cookie_consent"] .popup-text a:visited,
.popup-type-cookie_consent .popup-text a:visited {
    color: #D4A017 !important;
}

/* Responsywność */
@media (max-width: 768px) {
    .popup-container {
        max-width: 95%;
        margin: 0 10px;
    }
    
    .popup-content {
        padding: 1.5rem;
    }
    
    .popup-title {
        font-size: 1.25rem !important;
    }
    
    .popup-overlay.position-top-left .popup-container,
    .popup-overlay.position-top-right .popup-container,
    .popup-overlay.position-bottom-left .popup-container,
    .popup-overlay.position-bottom-right .popup-container {
        max-width: calc(100% - 20px);
        left: 10px !important;
        right: 10px !important;
    }
}

/* Animacje wejścia */
@keyframes slideInFromTop {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-animation-fade .popup-container {
    animation: fadeIn 0.3s ease-out;
}

.popup-animation-slide-top .popup-container {
    animation: slideInFromTop 0.4s ease-out;
}

.popup-animation-slide-bottom .popup-container {
    animation: slideInFromBottom 0.4s ease-out;
}
