/* --- Styles for Expandable Collection Description --- */

.collection-description-wrapper {
    position: relative; /* Needed for button and fade positioning */
    transition: max-height 0.3s ease-in-out; /* Smooth transition for expansion */
}

/* Style for the actual rich text content within the wrapper */
.collection-description-wrapper .rte {
    margin-bottom: 0; /* Clear any default margin */
    padding-bottom: 0; /* Clear any default padding */
    line-height: 1.6; /* Improve readability */
    font-size: 0.8em !important; /* Force the font to be smaller. Adjust 0.8em as needed. */
}

/* This is the collapsed state */
.collection-description-wrapper.is-collapsed {
    max-height: 250px; /* Initial collapsed height (adjust as needed) */
    overflow: hidden; /* Hide overflowing text */
}

/* Fade effect when collapsed */
.collection-description-wrapper.is-collapsed .rte::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Height of the fade */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 80%); /* Adjust colors to match your page background */
    pointer-events: none; /* Allows clicking through gradient */
    z-index: 1; /* Ensure it's above content but below button */
}

/* Style for the toggle button */
.collection-description-toggle-button {
    display: none; /* Hidden by default, JS will show if needed */
    cursor: pointer;
    border: 1px solid #ccc; /* Example button style */
    background-color: #f9f9f9;
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
    width: fit-content;
    position: absolute; /* Position relative to .collection-description-wrapper */
    bottom: 10px; /* Distance from the bottom of the collapsed box */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2; /* Ensure it's above the fade */
    font-size: 0.9em; /* Font size for the button text */
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    min-width: 120px; /* Ensure button has some minimum width */
}

/* Show button only when the wrapper is collapsed */
.collection-description-wrapper.is-collapsed .collection-description-toggle-button {
    display: inline-block; /* Or 'block' if you want it full width */
}

/* Optional: Icon/text spacing */
.collection-description-toggle-button span {
    vertical-align: middle;
}