/* Bonus cards styling */

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced card animations */
.bonus-card {
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bonus-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(147, 51, 234, 0.25);
}

/* Featured badge pulse animation */
.bonus-card[data-featured="true"] {
    border-color: #fbbf24;
}

.bonus-card[data-featured="true"]:hover {
    box-shadow: 0 25px 50px -12px rgba(251, 191, 36, 0.35);
}

/* Expiring soon pulse animation */
@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.bonus-card[data-expiring-soon="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulse-warning 2s infinite;
}

/* Logo container enhanced */
.bonus-card img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bonus-card:hover img {
    transform: scale(1.05);
}

/* Provider type badges */
.bonus-card [class*="bg-blue-100"],
.bonus-card [class*="bg-purple-100"],
.bonus-card [class*="bg-gray-100"] {
    transition: all 0.2s ease;
}

.bonus-card:hover [class*="bg-blue-100"],
.bonus-card:hover [class*="bg-purple-100"],
.bonus-card:hover [class*="bg-gray-100"] {
    transform: translateY(-2px);
}

/* Bonus value section shimmer */
.bonus-card .bg-gradient-to-r.from-purple-100 {
    background-size: 200% 200%;
    animation: bonus-shimmer 3s ease-in-out infinite;
}

@keyframes bonus-shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Promo code section interactive */
.bonus-card .bg-gray-100:has(.font-mono) {
    transition: all 0.3s ease;
    cursor: pointer;
}

.bonus-card .bg-gray-100:has(.font-mono):hover {
    background-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* CTA buttons enhanced */
.view-btn, .claim-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-btn::before, .claim-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.view-btn:hover::before, .claim-btn:hover::before {
    left: 100%;
}

/* Specific claim button effects */
.claim-btn {
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.claim-btn:hover {
    animation-duration: 1s;
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.4);
}

/* Date info subtle animation */
.bonus-card .text-gray-500:has(i.fa-calendar) {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.bonus-card:hover .text-gray-500:has(i.fa-calendar) {
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .bonus-card {
        margin-bottom: 1rem;
    }

    .bonus-card:hover {
        transform: translateY(-4px);
    }

    .flex-col.sm\\:flex-row {
        gap: 0.75rem;
    }

    .px-4.py-2 {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* Accessibility improvements */
.view-btn:focus, .claim-btn:focus {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
}

.bonus-card [class*="rounded-full"]:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* Filter animations */
#provider-select, #type-select,
#featured-filter, #expiring-filter {
    transition: all 0.2s ease;
}

#provider-select:focus, #type-select:focus {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
    transform: scale(1.02);
}

/* Load more button pulse */
#load-more-btn {
    transition: all 0.3s ease;
}

#load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
}

#load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Print styles */
@media print {
    .bonus-card {
        transform: none !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .view-btn, .claim-btn {
        background: #7c3aed !important;
        color: white !important;
    }

    /* Hide filters on print */
    .sticky.top-16 {
        display: none;
    }
}
