/* Button Ripple Effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.5) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.3;
    transition: 0s;
}

/* Subtle pulse animation for primary buttons */
@keyframes subtle-pulse {
    0% {
        box-shadow: 
            0 1px 3px rgba(0, 0, 0, 0.12),
            0 1px 2px rgba(0, 0, 0, 0.24),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 4px 16px rgba(69, 158, 233, 0.2);
    }
    50% {
        box-shadow: 
            0 1px 3px rgba(0, 0, 0, 0.12),
            0 1px 2px rgba(0, 0, 0, 0.24),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 4px 20px rgba(69, 158, 233, 0.25);
    }
    100% {
        box-shadow: 
            0 1px 3px rgba(0, 0, 0, 0.12),
            0 1px 2px rgba(0, 0, 0, 0.24),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 4px 16px rgba(69, 158, 233, 0.2);
    }
}

.btn-primary {
    animation: subtle-pulse 3s ease-in-out infinite;
}

.btn-primary:hover {
    animation: none;
}

/* Icon support in buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon svg {
    width: 1.125rem;
    height: 1.125rem;
    transition: transform 0.2s var(--button-transition);
}

.btn-icon:hover svg {
    transform: translateX(2px);
}

/* Button sizes */
.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.125rem 2.75rem;
    font-size: 1rem;
}

/* Loading state */
.btn-loading {
    color: transparent;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    margin-left: -0.625rem;
    margin-top: -0.625rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}