/**
 * Scrollable Blocks CSS
 * 
 * Makes content blocks scrollable when they exceed a certain height
 */

/* Common styles for all scrollable blocks */
.lctc-scrollable {
    max-height: 300px; /* Height of approximately 10 lines of text */
    overflow-y: auto;
    padding-right: 10px; /* Add padding for scrollbar */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent; /* For Firefox */
}

/* Webkit scrollbar styling */
.lctc-scrollable::-webkit-scrollbar {
    width: 6px;
}

.lctc-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.lctc-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.lctc-scrollable::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Apply scrollable class to specific content blocks */
.lctc-collapsible-content {
    transition: max-height 0.3s ease;
}

/* Ensure the scrollable class doesn't affect collapsed state */
.lctc-collapsible-content.lctc-scrollable {
    max-height: 300px;
    overflow-y: auto;
}

/* Specific styling for different block types */
#lctc-notes.lctc-scrollable,
#lctc-translation.lctc-scrollable,
#lctc-related.lctc-scrollable,
#lctc-other-references.lctc-scrollable,
#lctc-user-feedback.lctc-scrollable,
#lctc-user-notes.lctc-scrollable {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Add a subtle fade effect at the bottom to indicate more content */
.lctc-scrollable-fade {
    position: relative;
}

.lctc-scrollable-fade::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9));
    pointer-events: none; /* Allow clicking through the fade */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease;
}

.lctc-scrollable-fade.has-overflow::after {
    opacity: 1; /* Show only when content overflows */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lctc-scrollable {
        max-height: 200px; /* Smaller height on mobile */
    }
}
