/* assets/css/free-library-activity.css */

/* --- Card Container --- */
.fl-bp-card {
    display: flex;
    flex-direction: row;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin-top: 12px;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    text-align: left;
    width: 100%;
}

/* Kill Ghost Paragraphs if PHP fix doesn't catch them all */
.fl-bp-card > p, 
.fl-bp-card-content > p {
    display: none; 
}

.fl-bp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

/* --- Image Column --- */
.fl-bp-card-thumb {
    /* Fixed width prevents squishing */
    flex: 0 0 140px; 
    width: 140px;
    /* Stretch ensures it matches content height */
    align-self: stretch; 
    position: relative;
    background-color: #f1f5f9;
    overflow: hidden;
    text-decoration: none !important;
    border: none;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 180px; /* Minimum height for visual balance */
}

/* Absolute positioning ensures cover behavior regardless of parent height */
.fl-bp-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    margin: 0;
    padding: 0;
    display: block;
    transition: transform 0.5s ease;
}

.fl-bp-card:hover .fl-bp-card-thumb img {
    transform: scale(1.05);
}

.fl-bp-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}
.fl-bp-card-placeholder .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

/* --- Content Column --- */
.fl-bp-card-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px; /* Increased padding */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns content to top */
}

/* Reset internal elements */
.fl-bp-card-content * {
    box-sizing: border-box !important;
}

/* --- Badge --- */
.fl-bp-card-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px !important;
    line-height: 1;
    align-self: flex-start;
}

.fl-bp-card-badge.recomm {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.fl-bp-card-badge.item {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* --- Typography --- */
.fl-bp-card-title {
    font-size: 18px; /* Larger title */
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 4px 0 !important;
}

.fl-bp-card-link {
    text-decoration: none !important;
    color: #1e293b !important;
    display: block;
    transition: color 0.2s;
}
.fl-bp-card-link:hover {
    color: #2563eb !important;
}

.fl-bp-card-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px !important;
    font-weight: 500;
}

/* --- Recommendation Quote (Fixed Squishing) --- */
.fl-bp-card-reason {
    font-size: 14px;
    line-height: 1.6; /* Better readability */
    color: #334155;
    font-style: italic;
    background: #f8fafc;
    border-left: 3px solid #60a5fa;
    border-radius: 0 6px 6px 0;
    padding: 12px 16px !important; /* Generous padding */
    margin-bottom: 16px !important; /* Space below quote */
    position: relative;
}

/* Add decorative quote mark */
.fl-bp-card-reason::before {
    content: "“";
    font-family: serif;
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 24px;
    color: #cbd5e1;
    line-height: 1;
}

/* --- Description & Context Label --- */
.fl-bp-card-desc-group {
    margin-top: auto; /* Push to bottom if height permits */
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.fl-bp-card-context-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px !important;
}

.fl-bp-card-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 550px) {
    .fl-bp-card {
        flex-direction: column;
        height: auto;
    }
    
    .fl-bp-card-thumb {
        width: 100%;
        flex: 0 0 200px;
        height: 200px;
    }
    
    .fl-bp-card-thumb img {
        position: relative; /* Return to relative flow */
    }
    
    .fl-bp-card-content {
        padding: 16px;
    }
}
