/* Results display, rankings, and design layouts */

/* Split View Layout Styles */
.split-view-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 70vh;
}

.split-view-main {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.left-panel {
    flex: 1;
    min-width: 300px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    max-height: 60vh;
}

.right-panel {
    flex: 1.5;
    min-width: 400px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    max-height: 60vh;
}

.panel-resizer {
    width: 5px;
    background-color: #dee2e6;
    cursor: col-resize;
    transition: background-color 0.2s ease;
    border-radius: 2px;
}

.panel-resizer:hover {
    background-color: #007bff;
}

.split-view-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

.task-list-item {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-list-item:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    transform: translateX(2px);
}

.task-list-item.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
    border-left: 4px solid #2196f3;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.task-list-item-rank {
    background-color: #28a745;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.task-list-item-content {
    flex: 1;
    overflow: hidden;
}

.task-list-item-name {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-list-item-assignee {
    font-size: 0.8em;
    color: #6c757d;
    margin-bottom: 0.2rem;
}

.task-list-item-comment {
    font-size: 0.7em;
    color: #6c757d;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-detail-view {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.task-detail-placeholder {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.task-detail-rank {
    background-color: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
}

.task-detail-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.task-detail-assignee {
    font-size: 0.9em;
    color: #007bff;
    margin-bottom: 1rem;
    padding: 0.3rem 0.6rem;
    background-color: #e3f2fd;
    border-radius: 4px;
    border-left: 3px solid #007bff;
    display: inline-block;
}

.task-detail-description {
    font-size: 0.95em;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.task-detail-ties {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #fff3cd;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
    font-size: 0.9em;
    color: #856404;
}

.task-detail-comment-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #dee2e6;
}

.task-detail-comment-section .comment-label {
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

.task-detail-comment-section .task-comment {
    background-color: white;
    border: 1px solid #ced4da;
    min-height: 80px;
    resize: vertical;
}

.task-detail-comment-section .task-comment:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.assignee-group-header {
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.8rem 1rem;
    margin: 0 -1rem 1rem -1rem;
    border-radius: 8px 8px 0 0;
    font-size: 1em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.assignee-group-tasks {
    margin-bottom: 1.5rem;
}

.bottom-panel {
    background-color: #f8f9fa;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.bottom-panel-header {
    color: #dc3545;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

/* Collapsible sections styling */
.collapsible-container {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.section-header:hover {
    background-color: #e9ecef;
}

.section-header.collapsed {
    border-bottom: none;
}

.section-header .section-title {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.section-header .section-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9em;
    color: #6c757d;
}

.expand-indicator {
    font-size: 1.2em;
    color: #6c757d;
    transition: transform 0.3s ease;
    margin-right: 0.5rem;
}

.section-header.collapsed .expand-indicator {
    transform: rotate(-90deg);
}

.section-content {
    padding: 1.5rem;
    background-color: #ffffff;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0 1.5rem;
}

.section-count {
    background-color: #007bff;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.section-preview {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
    margin-left: 0.5rem;
}

/* Priority Rankings section styling */
.priority-rankings-section .section-header {
    background-color: #e8f5e8;
    border-bottom-color: #28a745;
}

.priority-rankings-section .section-header:hover {
    background-color: #d4edda;
}

.priority-rankings-section .section-count {
    background-color: #28a745;
}

/* By Assignee section styling */
.by-assignee-section .section-header {
    background-color: #e3f2fd;
    border-bottom-color: #007bff;
}

.by-assignee-section .section-header:hover {
    background-color: #d1ecf1;
}

.by-assignee-section .section-count {
    background-color: #007bff;
}

/* Removed Tasks section styling */
.removed-tasks-section.collapsible-container .section-header {
    background-color: #f8d7da;
    border-bottom-color: #dc3545;
}

.removed-tasks-section.collapsible-container .section-header:hover {
    background-color: #f1b0b7;
}

.removed-tasks-section.collapsible-container .section-count {
    background-color: #dc3545;
}

/* Smooth animation for collapsible content */
@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        max-height: 1000px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

.section-content.expanding {
    animation: slideDown 0.3s ease;
}

.section-content.collapsing {
    animation: slideUp 0.3s ease;
}

/* Range-based Ranking Styles */
.task-list-ranked {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-item-ranked {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.task-item-ranked:hover {
    background-color: #e9ecef;
}

.rank-range {
    background: #6c757d;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 1rem;
    min-width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
}

.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assignee-task-list-ranked {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.assignee-task-list-ranked .task-item-ranked {
    margin-left: 1rem;
}

.tied-tasks-container {
    border: 2px solid #007bff;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
}

.task-item-ranked.tied {
    border-left: none;
    background-color: white;
}

.task-item-ranked.tied .rank-range {
    background-color: #007bff;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* Result Design Selector */
.result-design-selector {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-design-selector:not(:last-child) {
    margin-bottom: 1rem;
}

.result-design-selector label {
    font-weight: 500;
    color: #495057;
}

.result-design-selector select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 0.9em;
}