/**

* Modern Effort Preview Styles
 */

/* Effort List Container */
.elgg-list.efforts {
    padding: 0;
    margin: 0;
}

.elgg-list.efforts .elgg-item {
    list-style: none;
    margin-bottom: 8px;
}

/* Effort Boqx Container */
.boqx.effort {
    position: relative;
    margin-bottom: 8px;
}

/* Effort Preview Header */
.effort-preview,
header.preview.effort-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 64px;
}

.effort-preview:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Expanded state */
.effort-preview:not(.collapsed) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    background: #f9fafb;
}

/* Expander Button */
.effort-expander,
.StoryPreviewItem__expander {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.effort-expander:hover {
    background: #e5e7eb;
    color: #111827;
}

.effort-expander .halo {
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.effort-expander .halo:after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #6b7280;
}

.effort-expander:hover .halo {
    background: #e5e7eb;
    border-color: #6b7280;
}

.effort-preview:not(.collapsed) .effort-expander .halo:after {
    content: '▼';
}

/* Result Badge */
.effort-result-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.effort-result-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.effort-result-badge.partial {
    background: #fef3c7;
    color: #92400e;
}

.effort-result-badge.neutral {
    background: #e5e7eb;
    color: #6b7280;
}

.effort-result-badge.warning {
    background: #fee2e2;
    color: #991b1b;
}

.effort-result-badge.progress {
    background: #dbeafe;
    color: #1e40af;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Avatar */
.effort-avatar {
    flex-shrink: 0;
}

.effort-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Title */
.effort-title-wrapper {
    flex: 1;
    min-width: 0;
}

.effort-title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.effort-title:empty:before {
    content: 'Untitled Effort';
    color: #9ca3af;
    font-style: italic;
}

/* Meta Info */
.effort-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
}

.effort-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.effort-duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

.effort-duration svg {
    opacity: 0.7;
}

/* Actions */
.effort-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.effort-preview:hover .effort-actions {
    opacity: 1;
}

.effort-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.effort-action-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Full View Variant */
.boqx.effort.full-view .effort-preview {
    border-radius: 12px;
    padding: 20px;
    min-height: 80px;
}

.boqx.effort.full-view .effort-title {
    font-size: 18px;
    font-weight: 600;
    white-space: normal;
}

.boqx.effort.full-view .effort-result-badge {
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.boqx.effort.full-view .effort-avatar img {
    width: 40px;
    height: 40px;
}

/* Responsive */
@media (max-width: 640px) {
    .effort-preview {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .effort-title-wrapper {
        flex-basis: 100%;
        order: 4;
    }
    
    .effort-meta {
        flex-basis: 100%;
        order: 5;
        padding-left: 68px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .effort-preview {
        background: #1f2937;
        border-color: #374151;
    }
    
    .effort-preview:hover {
        background: #111827;
        border-color: #4b5563;
    }
    
    .effort-title {
        color: #f3f4f6;
    }
    
    .effort-meta {
        color: #9ca3af;
    }
    
    .effort-expander {
        color: #9ca3af;
    }
    
    .effort-expander:hover {
        background: #374151;
        color: #f3f4f6;
    }
    
    .effort-action-btn {
        color: #9ca3af;
    }
    
    .effort-action-btn:hover {
        background: #374151;
        color: #f3f4f6;
    }
}

/* Edit Container */
.effort-edit-container {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #ffffff;
    padding: 16px;
}

/* Minimal/Simple Style (if you prefer simpler) */
.effort-preview.simple {
    padding: 8px 12px;
    gap: 8px;
}

.effort-preview.simple .effort-result-badge {
    width: 24px;
    height: 24px;
    font-size: 14px;
}

.effort-preview.simple .effort-avatar img {
    width: 24px;
    height: 24px;
}

.effort-preview.simple .effort-title {
    font-size: 14px;
}