/* =================================================================
   EXPANDABLE CONTENT - Collapsible long content functionality
   ================================================================= */

.expandable-content {
    position: relative;
    transition: all 0.3s ease;
}

.expandable-content.collapsed {
    max-height: 150px; /* Default max height for collapsed content */
    overflow: hidden;
}

.expandable-content.collapsed.mobile {
    max-height: 120px; /* Smaller max height for mobile */
}

.expandable-content.expanded {
    max-height: none;
    overflow: visible;
}

.expandable-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

.expand-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    backdrop-filter: blur(5px);
}

/* Container for centering the toggle button */
.expand-toggle-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
}

.expand-toggle:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-1px);
}

.expand-toggle i {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.expand-toggle.expanded i {
    transform: rotate(180deg);
}

/* Note specific styling */
.note-content.expandable-content.collapsed {
    max-height: 120px;
}

.note-content.expandable-content.collapsed.mobile {
    max-height: 100px;
}

/* To-do element specific styling */
.todo-element-content.expandable-content.collapsed {
    max-height: 80px;
}

.todo-element-content.expandable-content.collapsed.mobile {
    max-height: 60px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .expandable-content.collapsed {
        max-height: 100px;
    }
    
    .note-content.expandable-content.collapsed {
        max-height: 80px;
    }
    
    .todo-element-content.expandable-content.collapsed {
        max-height: 50px;
    }
    
    .expand-toggle {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
}

/* Animation for smooth transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expand-toggle {
    animation: fadeIn 0.3s ease;
}

/* =================================================================
   NOTES CARD LAYOUT - Keep buttons and line at bottom
   ================================================================= */

/* Make notes cards use flexbox layout */
.notes-card {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.notes-card .card-text {
    flex-grow: 1;
    margin-bottom: 0;
}

/* Container for the footer section (hr + buttons) */
.notes-card-footer {
    margin-top: auto;
    padding-top: 0.5rem;
}

.notes-card-footer hr {
    margin-bottom: 0.5rem;
    margin-top: 0;
}

/* Make sure expand toggle in notes is positioned correctly */
.notes-card .expand-toggle-container {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
