/* Frontend Modal Overlay with smooth animation fix */
#shadymail-popup-overlay {
    display: flex; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(14, 8, 22, 0.75); /* Rich dark purple tint overlay */
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#shadymail-popup-overlay.shadymail-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Elegant, smaller, optimized card container (Exactly 440px x 600px bounds) */
.shadymail-popup-container {
    position: relative;
    width: 90%;
    max-width: 440px;
    height: 600px;
    padding: 0;
    box-sizing: border-box;
    /* Drop-down and scaling spring animation on load */
    transform: translateY(-50px) scale(0.96);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

#shadymail-popup-overlay.shadymail-show .shadymail-popup-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close Button refined */
#shadymail-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(22, 12, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#shadymail-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.08) rotate(90deg);
}

/* Rich deep dark-purple frosted glass backdrop (Exact 600px Height Fit) */
.shadymail-inner-glass {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns content cleanly */
    background: rgba(22, 12, 38, 0.72) !important; /* Premium semi-transparent dark purple */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(180, 120, 255, 0.22) !important; /* Soft glowing purple border */
    border-radius: 20px;
    padding: 30px 24px !important; /* Tightened layout spacing */
    box-shadow: 0 30px 60px -15px rgba(10, 2, 20, 0.95), 
                0 0 30px rgba(138, 43, 226, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Dark Glass Input Styling */
#shadymail_frontend_email {
    background-color: rgba(14, 8, 22, 0.65) !important;
    color: #fff !important;
    border: 1px solid rgba(180, 120, 255, 0.25) !important;
    border-radius: 12px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#shadymail_frontend_email:focus {
    outline: none;
    border-color: rgba(180, 120, 255, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.25) !important;
}

#shadymail_frontend_email::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-family: Montserrat, sans-serif;
}

/* Submit Button Hover Animation */
#shadymail_frontend_submit {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.35);
}

#shadymail_frontend_submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 0, 0.55);
}