/* Ripple Effect Styles
   The magic happens by keeping 'overflow: hidden' on the parent 
   and animating a scaling span inside.
*/

.ripple-button {
    position: relative;
    padding: 1rem 2.5rem; /* A bit more horizontal padding for better proportions */
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden; /* This crops the ripple effect to the button's bounds */
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ripple-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.ripple-button:active {
    transform: translateY(0);
}

/* The ripple element created via JavaScript */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5); /* Slightly more subtle */
    transform: scale(0);
    animation: ripple-animation 0.6s linear; /* Linear usually feels more natural for ripples */
    pointer-events: none; /* Crucial so the ripple doesn't intercept clicks */
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}