/* BookCard component styles (ported for UnQbdWeb2 landing rails) */

.book-card {
    transition: all 0.2s ease-out;
    overflow: visible;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.book-card-cover-container {
    position: relative !important;
    aspect-ratio: 5 / 8;
    overflow: hidden;
}

.book-card-cover-container img,
.book-card-cover-container .rz-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.book-card-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    background: linear-gradient(135deg, rgba(0, 180, 255, 0.78), rgba(0, 86, 179, 0.78));
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 10;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.book-card:hover .book-card-hover-overlay,
.book-card-cover-container:focus-visible .book-card-hover-overlay,
.book-card-cover-container:focus .book-card-hover-overlay {
    opacity: 1;
    pointer-events: none;
}

.book-card-hover-content {
    width: 100%;
    padding: 1rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: none;
}

.book-card-hover-title {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-hover-author {
    opacity: 0.9;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-hover-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
    pointer-events: auto;
}

.book-card-hover-btn {
    border-radius: 0.75rem !important;
    font-weight: 800 !important;
}

.book-card-hover-read {
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    border: none !important;
    color: #000 !important;
}

.book-card-hover-listen {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(0, 86, 179, 0.35) !important;
}

.book-card-top-right-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 11;
    pointer-events: auto;
}

.book-card-top-left-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 11;
    pointer-events: none;
}

/* FreeTier "FREE" pill (TopRightBadge) */
.book-card-free-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35);
    text-transform: uppercase;
}

.book-card-free-pill .rz-icon {
    font-size: 0.9rem;
}

/* Audio chip row */
.book-card .audiobook-chip-row {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    align-items: center;
    gap: .35rem;
    z-index: 4;
}

.audiobook-badge {
    width: 26px;
    height: 26px;
    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;
}

.audiobook-duration {
    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;
}

@media (max-width: 768px) {
    .book-card {
        max-width: none !important;
        padding: 0.25rem !important;
    }

    .book-card-hover-overlay {
        display: none;
    }

    .book-card .audiobook-chip-row {
        top: 6px;
        left: 6px;
        gap: .3rem;
    }

    .audiobook-badge {
        width: 24px;
        height: 24px;
    }
}
