/* BookCard component styles (moved from BookCard.razor.css) */
/* Enhanced Badge System */
.access-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 1rem;
    padding: 0.4rem 0.7rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: badgePulse 2s ease-in-out infinite;
}

.free-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: 2px solid rgba(255,255,255,0.3);
}

.premium-badge {
    background: linear-gradient(135deg, #ffc107, #ff8c00);
    border: 2px solid rgba(255,255,255,0.5);
}

.premium-book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(255,255,255,0.1) 25%,
        transparent 50%,
        rgba(255,255,255,0.1) 75%,
        transparent 100%);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1;
}

/* Audiobook Badge */
.audiobook-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* New: unified top-left chip row for audio icon + duration */
.book-card .audiobook-chip-row {
    position: absolute;
    top: 6px;
    left: 6px; /* moved from right to left */
    display: flex;
    align-items: center;
    gap: .35rem;
    z-index: 4;
}
.book-card .audiobook-chip-row .audiobook-badge {
    position: static; /* override default absolute */
    top: auto; left: auto;
    width: 26px; height: 26px;
}
.book-card .audiobook-chip-row .audiobook-duration {
    position: static; /* override bottom-right absolute */
}

/* Audiobook duration pill */
.audiobook-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.audiobook-duration-pill {
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
}

.book-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-card:hover .access-badge {
    transform: scale(1.05);
}

.book-card:hover .audiobook-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

/* Responsive badge adjustments */
@media (max-width: 768px) {
    .access-badge {
        padding: 0.3rem 0.5rem;
        top: 8px;
        right: 8px;
    }

    .access-badge span {
        font-size: 0.7rem !important;
    }

    .access-badge .rz-icon {
        font-size: 0.8rem !important;
    }

    .audiobook-badge {
        width: 24px;
        height: 24px;
        top: 8px;
        left: 8px;
    }

    .audiobook-badge .rz-icon {
        font-size: 0.7rem !important;
    }

    .book-card .audiobook-chip-row {
        top: 6px; left: 6px; gap: .3rem; /* moved from right to left */
    }
    .book-card .audiobook-chip-row .audiobook-badge { width: 24px; height: 24px; }
}
