/* Scrollable Text Editor Widget Styles */

.scrollable-text-wrapper {
    position: relative;
    width: 100%;
}

.scrollable-text-container {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.scrollable-text-content {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.scrollable-text-fade {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scrollable-text-fade-top {
    top: 0;
}

.scrollable-text-fade-bottom {
    bottom: 0;
}

.scrollable-text-fade.visible {
    opacity: 1;
}

/* Custom Scrollbar Styles - Minimal and Hover Only */
.scrollable-text-container::-webkit-scrollbar {
    width: 4px;
}

.scrollable-text-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0);
    border-radius: 10px;
}

/* Hide scrollbar thumb by default */
.scrollable-text-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    transition: background var(--scrollbar-transition, 300ms) ease;
}

/* Show scrollbar thumb on hover */
.scrollable-text-wrapper:hover .scrollable-text-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

.scrollable-text-wrapper:hover .scrollable-text-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Firefox Scrollbar - Minimal */
.scrollable-text-container {
    scrollbar-width: thin;
    scrollbar-color: transparent rgba(0, 0, 0, 0);
    transition: scrollbar-color var(--scrollbar-transition, 300ms) ease;
}

.scrollable-text-wrapper:hover .scrollable-text-container {
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

/* Ensure content formatting is preserved */
.scrollable-text-content p:last-child {
    margin-bottom: 0;
}

.scrollable-text-content h1,
.scrollable-text-content h2,
.scrollable-text-content h3,
.scrollable-text-content h4,
.scrollable-text-content h5,
.scrollable-text-content h6 {
    margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scrollable-text-container::-webkit-scrollbar {
        width: 6px;
    }
}
