.popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.75) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    -webkit-backdrop-filter: blur(5px) !important;
    backdrop-filter: blur(5px) !important;
}

.popup-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
}

.popup {
    background-color: white !important;
    padding: 32px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    width: 90% !important;
    max-width: 600px !important;
    min-width: 280px !important;
    position: relative !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: auto !important;
    animation: popupFadeIn 0.3s ease-out !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

.popup-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 10 !important;
    background: #dc3545 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5em !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, transform 0.2s !important;
}

.popup-close:hover {
    background: #b71c1c !important;
    transform: scale(1.08) rotate(12deg) !important;
}

.popup-title {
    font-size: 2em !important;
    font-weight: bold !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    text-align: left !important;
    padding-right: 40px !important;
}

.popup-content {
    width: 100% !important;
    text-align: left !important;
    color: #444 !important;
    margin-bottom: 20px !important;
}

.popup-close-bottom-btn {
    display: block !important;
    margin: 24px auto 0 auto !important;
    padding: 10px 32px !important;
    font-size: 1.05em !important;
    font-weight: bold !important;
    color: #fff !important;
    background: linear-gradient(90deg, #1e3c72 0%, #f9d423 100%) !important;
    border: none !important;
    border-radius: 24px !important;
    box-shadow: 0 0 10px 2px #f9d42399, 0 2px 8px rgba(0,0,0,0.10) !important;
    cursor: pointer !important;
    text-shadow: 0 2px 8px #fff8 !important;
    letter-spacing: 1px !important;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s !important;
    animation: shine 2s infinite linear !important;
}

.popup-close-bottom-btn:hover {
    background: linear-gradient(90deg, #f9d423 0%, #1e3c72 100%) !important;
    box-shadow: 0 0 18px 4px #f9d423cc, 0 2px 8px rgba(0,0,0,0.15) !important;
    transform: scale(1.04) !important;
}

@keyframes shine {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

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

/* Responsive design */
@media (max-width: 1024px) {
    .popup {
        width: 80% !important;
        padding: 25px !important;
    }
}

@media (max-width: 768px) {
    .popup {
        width: 90% !important;
        padding: 20px !important;
        margin: 15px !important;
    }
    
    .popup-title {
        font-size: 1.3em !important;
    }
}

@media (max-width: 480px) {
    .popup {
        width: 95% !important;
        padding: 15px !important;
        margin: 10px !important;
    }
    
    .popup-title {
        font-size: 1.2em !important;
    }
    
    .popup-close {
        top: 10px !important;
        right: 10px !important;
    }
}

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

@keyframes slideUp {
    from {
        transform: translateY(20px);
    }
    to {
        transform: translateY(0);
    }
}

/* Scrollbar styling */
.popup-container::-webkit-scrollbar {
    width: 8px;
}

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

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

.popup-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation */
.popup-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.popup-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Popolna omejitev slik v vseh popupih */
.popup-container,
.popup-content,
.popup-body,
.popup-message,
.popup-text {
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
}

.popup-container img,
.popup-content img,
.popup-body img,
.popup-message img,
.popup-text img {
    display: block;
    margin: 15px auto;
    max-width: 100% !important;
    max-height: 50vh !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* Popup centriranje in bleščeč spodnji gumb ZAPRI */
.popup-title, .popup-content {
    text-align: center;
    padding-left: 32px;
    padding-right: 32px;
}

.popup-body {
    padding: 20px 0;
}

.popup-body h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5em;
}

.popup-message {
    color: #666;
    line-height: 1.6;
    max-width: 100%;
    overflow: hidden;
}

/* Stili za slike v popupih */
.popup-message img {
    display: block;
    margin: 15px auto;
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    object-fit: contain;
}

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

@keyframes slideUp {
    from {
        transform: translateY(20px);
    }
    to {
        transform: translateY(0);
    }
} 