/**
 * Button Micro-Interactions
 * Professional tactile feedback for all buttons
 */

/* Base button styles with smooth transitions */
.btn,
.auth-button,
.checkout-btn,
.view-all-btn,
.hero-button,
button:not(.no-animate) {
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

/* Ripple effect on click */
.btn::before,
.auth-button::before,
.checkout-btn::before,
.view-all-btn::before,
.hero-button::before,
button:not(.no-animate)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.btn:active::before,
.auth-button:active::before,
.checkout-btn:active::before,
.view-all-btn:active::before,
.hero-button:active::before,
button:not(.no-animate):active::before {
    width: 400px;
    height: 400px;
}

/* Hover lift effect */
.btn:hover,
.auth-button:hover,
.checkout-btn:hover,
.view-all-btn:hover,
.hero-button:hover,
button:not(.no-animate):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(139, 0, 0, 0.25);
}

/* Active press effect */
.btn:active,
.auth-button:active,
.checkout-btn:active,
.view-all-btn:active,
.hero-button:active,
button:not(.no-animate):active {
    transform: translateY(0) scale(0.98);
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.auth-button:focus-visible,
.checkout-btn:focus-visible,
.view-all-btn:focus-visible,
.hero-button:focus-visible,
button:not(.no-animate):focus-visible {
    outline: 2px solid #8B0000;
    outline-offset: 2px;
}

/* Shimmer loading skeleton */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

/* Loading spinner for buttons */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading,
button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after,
button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* Link hover effects - DISABLED for cards and buttons */
/* Removed to prevent underline on card and button hovers */
a.product-card::after,
a.service-card::after,
a.bento-card::after,
a.contact-card::after,
a.officer-card::after,
a.social-link::after,
a.related-card::after,
a.btn::after,
a.btn-primary::after,
a.btn-secondary::after,
a.btn-outline::after,
a[class*="btn"]::after,
a[class*="card"]::after {
    display: none !important;
}

/* Accessibility: Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .auth-button,
    .checkout-btn,
    .view-all-btn,
    .hero-button,
    button,
    a {
        transition: none !important;
        animation: none !important;
    }

    .btn::before,
    .auth-button::before,
    .checkout-btn::before,
    .view-all-btn::before,
    .hero-button::before,
    button::before {
        display: none !important;
    }

    .btn:hover,
    .auth-button:hover,
    .checkout-btn:hover,
    .view-all-btn:hover,
    .hero-button:hover,
    button:hover {
        transform: none !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .auth-button:hover,
    .checkout-btn:hover,
    .view-all-btn:hover,
    .hero-button:hover,
    button:hover {
        transform: none;
    }
}
