@keyframes wave {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    75% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
}

@keyframes float {
    0% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, -45%); }
    100% { transform: translate(-50%, -50%); }
}

.dnp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #ffffff38;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 80%;
    max-width: 640px;
    box-sizing: border-box;
    border-radius: 20px;
    display: none; /* Ensure it is hidden initially */
    animation: wave 0.5s ease-in-out, float 3s ease-in-out infinite;
}

.dnp-popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    max-width: 600px;
    text-align: center;
}

.dnp-popup-corner {
    position: absolute;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Updated selectors to match the actual HTML class structure */
.dnp-popup-corner-top-left, 
.dnp-popup-corner.dnp-popup-corner-top-left {
    top: 0;
    left: 0;
}

.dnp-popup-corner-top-right, 
.dnp-popup-corner.dnp-popup-corner-top-right {
    top: 0;
    right: 0;
}

.dnp-popup-corner-bottom-left, 
.dnp-popup-corner.dnp-popup-corner-bottom-left {
    bottom: 0;
    left: 0;
}

.dnp-popup-corner-bottom-right, 
.dnp-popup-corner.dnp-popup-corner-bottom-right {
    bottom: 0;
    right: 0;
}

/* Keep the original selectors for backward compatibility */
.dnp-popup-corner.top-left {
    top: 0;
    left: 0;
}

.dnp-popup-corner.top-right {
    top: 0;
    right: 0;
}

.dnp-popup-corner.bottom-left {
    bottom: 0;
    left: 0;
}

.dnp-popup-corner.bottom-right {
    bottom: 0;
    right: 0;
}

/* Updated button container with flexbox for proper centering */
.dnp-popup-buttons {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Updated button styling with improved accessibility and consistency */
.dnp-popup-buttons button {
    padding: 10px 20px;
    background: #f60;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    min-width: 120px;
    transition: background-color 0.3s ease;
}

/* Improved hover effect */
.dnp-popup-buttons button:hover {
    background: #e55;
}

/* Add focus styles for accessibility */
.dnp-popup-buttons button:focus {
    outline: 2px solid #0078d7;
    outline-offset: 2px;
}

/* Add responsive styling for mobile devices */
@media (max-width: 480px) {
    .dnp-popup-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .dnp-popup-buttons button {
        width: 100%;
        margin-bottom: 8px;
    }
}