 
/* --- WP SU Popup Styles --- */
@import url('https://fonts.googleapis.com/css?family=Lato:400,700');

/* Popup Overlay Container */
#wp-su-popup-container {
    position: fixed; /* Fixed position to cover viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Ensure it's on top */
    font-family: "Lato", sans-serif;
    text-transform: uppercase;
    text-align: center;
    padding: 20px; /* Add padding for smaller screens */
    box-sizing: border-box;
}

/* Inner container for centering the box */
#wp-su-popup-container .wp-su-popup-inner {
    position: relative;
    width: 100%;
    max-width: 350px; /* Max width of the popup box */
    height: 280px; /* Fixed height for the box */
    box-sizing: border-box;
}

#wp-su-popup-container h1 {
    font-size: 1.2em;
    font-weight: 100;
    letter-spacing: 3px;
    padding-top: 1px;
    color: #fcfcfc;
    padding-bottom: 5px;
    text-transform: uppercase;
    margin: 0; /* Reset margin */
}

#wp-su-popup-container .wp-su-popup-alert { /* Renamed from .alert to avoid conflicts */
    font-weight: 700;
    letter-spacing: 5px;
}

#wp-su-popup-container p {
    margin-top: -5px;
    font-size: 1em; /* Slightly larger for readability */
    font-weight: 100;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: none; /* Allow normal case for messages */
    padding: 0 15px; /* Add padding */
    word-wrap: break-word; /* Wrap long messages */
    max-height: 60px; /* Limit message height */
    overflow-y: auto; /* Add scroll for long messages */
}

#wp-su-popup-container button,
#wp-su-popup-container .wp-su-popup-dot {
    cursor: pointer;
}

/* Base Box Styling (Applied to both success and error) */
#wp-su-popup-container .wp-su-popup-box {
    position: absolute;
    width: 100%; /* Take full width of inner container */
    height: 100%; /* Take full height */
    top: 0;
    left: 0;
    border-radius: 20px;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3); /* Adjusted shadow */
    perspective: 40px;
    display: none; /* Hidden by default, JS shows the correct one */
    box-sizing: border-box;
    overflow: hidden; /* Prevent animations spilling out */
}

/* Success Box Specific Styles */
#wp-su-popup-success {
    background: linear-gradient(to bottom right, #b0db7d 40%, #99dbb4 100%);
}

/* Error Box Specific Styles */
#wp-su-popup-error {
    background: linear-gradient(135deg, #df0050 0%, #a80049 50%, #800040 100%);
}

/* Close Dots */
#wp-su-popup-container .wp-su-popup-dot {
    width: 10px; /* Slightly larger */
    height: 10px;
    background: #fcfcfc;
    border-radius: 50%;
    position: absolute;
    top: 15px; /* Adjusted position */
    right: 15px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10; /* Ensure dot is clickable */
}
#wp-su-popup-container .wp-su-popup-dot:hover {
    opacity: 1;
}

/* Face Elements (Common) */
#wp-su-popup-container .wp-su-popup-face {
    position: absolute;
    width: 55px; /* Adjusted size */
    height: 55px;
    background: #fcfcfc;
    border-radius: 50%;
    border: 1px solid #777;
    top: 18%; /* Adjusted position */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    z-index: 2;
}

/* Success Face Animation */
#wp-su-popup-success .wp-su-popup-face {
    animation: wpSuPopupBounce 1s ease-in infinite;
}

/* Error Face Animation */
#wp-su-popup-error .wp-su-popup-face {
    animation: wpSuPopupRoll 3s ease-in-out infinite;
}

#wp-su-popup-container .wp-su-popup-eye {
    position: absolute;
    width: 6px; /* Adjusted size */
    height: 6px;
    background: #777;
    border-radius: 50%;
    top: 40%;
    left: 25%; /* Adjusted position */
}

#wp-su-popup-container .wp-su-popup-eye.right {
    left: 65%; /* Adjusted position */
}

#wp-su-popup-container .wp-su-popup-mouth {
    position: absolute;
    top: 43%;
    left: 41%;
    width: 10px; /* Adjusted size */
    height: 10px;
    border-radius: 50%;
}

#wp-su-popup-container .wp-su-popup-mouth.happy {
    border: 2px solid;
    border-color: transparent #777 #777 transparent;
    transform: rotate(45deg);
}

#wp-su-popup-container .wp-su-popup-mouth.sad {
    top: 49%;
    border: 2px solid;
    border-color: #777 transparent transparent #777;
    transform: rotate(45deg);
}

/* Shadow Element (Common) */
#wp-su-popup-container .wp-su-popup-shadow {
    position: absolute;
    width: 50px; /* Adjusted size */
    height: 5px;
    opacity: 0.4;
    background: #555; /* Darker shadow */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    top: 40%; /* Adjusted position */
    border-radius: 50%;
    z-index: 1;
}

/* Success Shadow Animation */
#wp-su-popup-success .wp-su-popup-shadow {
    animation: wpSuPopupScale 1s ease-in infinite;
}

/* Error Shadow Animation */
#wp-su-popup-error .wp-su-popup-shadow {
    animation: wpSuPopupMove 3s ease-in-out infinite;
}

/* Message Area */
#wp-su-popup-container .wp-su-popup-message {
    position: absolute;
    width: 100%;
    text-align: center;
    height: 40%; /* Adjust as needed */
    top: 47%; /* Position below face */
    box-sizing: border-box;
    padding-top: 10px; /* Space above text */
}

/* Button Box */
#wp-su-popup-container .wp-su-popup-button-box {
    position: absolute;
    background: #fcfcfc;
    width: 60%; /* Wider button */
    height: 45px; /* Taller button */
    line-height: 45px; /* Vertically center text */
    border-radius: 25px; /* Match height */
    bottom: 10px; /* Position from bottom */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    outline: 0;
    border: none;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    padding: 0; /* Remove padding */
}
#wp-su-popup-container .wp-su-popup-button-box h1 {
    color: #000; /* Match theme color */
    font-size: 1.5em;
    margin: 0;
    line-height: inherit; /* Inherit line height */
}

#wp-su-popup-container .wp-su-popup-button-box:hover {
    background: #eee; /* Slightly darker hover */
    transform: translateX(-50%) scale(1.05); /* Keep centered on scale */
}

/* Animations */
@keyframes wpSuPopupBounce {
    50% {
        transform: translate(-50%, -8px); /* Adjust for translateX */
    }
}

@keyframes wpSuPopupScale {
    50% {
        transform: translateX(-50%) scale(0.9); /* Adjust for translateX */
    }
}

/* Simplified Roll/Move for centered elements */
@keyframes wpSuPopupRoll {
     0%, 100% {
        transform: translateX(-50%) rotate(0deg);
    }
    50% {
         transform: translateX(-50%) rotate(180deg); /* Simpler rotation */
    }
}

@keyframes wpSuPopupMove {
      0%, 100% {
        transform: translateX(-50%); /* Shadow stays centered */
        opacity: 0.4;
    }
    50% {
         transform: translateX(-50%);
         opacity: 0.2; /* Fade slightly */
    }
}