/* Quarterly Status Styles */
.quarterly-status-container {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-management {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.status-title {
    color: #495057;
    font-size: 1.2em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    font-size: 0.9em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
    font-weight: normal;
}

.info-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Quarterly-specific info panel styles (inherits from unified system) */
.quarterly-info-panel {
    /* Uses .info-panel base styles from base.css */
}

.existing-statuses {
    margin-bottom: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

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

.status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.status-name {
    font-weight: 500;
    font-size: 1em;
}

.status-name-colored {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #dee2e6;
    flex-shrink: 0;
}

.status-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-controls label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.tasks-count-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
    width: 60px;
    text-align: center;
}

.tasks-count-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.delete-status-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.delete-status-btn:hover {
    background-color: #c82333;
}

.add-status-section {
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

.add-new-status-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-new-status-btn:hover {
    background-color: #218838;
}

.add-new-status-btn:before {
    content: '+';
    font-size: 1.2em;
    font-weight: bold;
}

.comment-templates-section {
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

.comment-templates-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1em;
    font-weight: 600;
}

.comment-template-group {
    margin-bottom: 1rem;
}

.comment-template-group:last-child {
    margin-bottom: 0;
}

.comment-template-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #495057;
    font-size: 0.9em;
}

.comment-template-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95em;
    margin-bottom: 0.25rem;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
}

.comment-template-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.template-help {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
}

.template-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    font-size: 0.85em;
}

.template-preview strong {
    color: #1976d2;
}

.preview-text {
    color: #424242;
    font-style: italic;
}

.apply-section {
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
    text-align: center;
}

.overflow-indicator {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
    padding: 0.4rem 0.8rem;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
}

.quarterly-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9em;
}

.control-group input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
    width: 100px;
}

.add-quarter-btn, .apply-quarterly-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-quarter-btn {
    background-color: #6c757d;
    color: white;
}

.add-quarter-btn:hover {
    background-color: #5a6268;
}

.apply-quarterly-btn {
    background-color: #007bff;
    color: white;
}

.apply-quarterly-btn:hover {
    background-color: #0056b3;
}

.grouping-toggle {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.grouping-toggle-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.grouping-toggle-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9em;
}

.grouping-toggle-buttons {
    display: flex;
    gap: 0.5rem;
}

.grouping-toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #6c757d;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.grouping-toggle-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.grouping-toggle-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.grouping-toggle-btn.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.quarterly-instructions {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.quarterly-results {
    min-height: 300px;
}

.quarterly-distribution {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quarter-section {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quarter-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f3f4;
}

.quarter-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quarter-title-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
    user-select: none;
}

.quarter-title-clickable:hover {
    opacity: 0.9;
}

.quarter-chevron {
    font-size: 0.8em;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0.25rem;
    display: inline-block;
}

.quarter-content {
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform-origin: top;
}

.quarter-title-colored {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

.quarter-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    opacity: 0.9;
}

.assignee-group-quarterly {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.assignee-header-quarterly {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assignee-header-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 6px;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.assignee-header-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.assignee-chevron {
    font-size: 0.7em;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0.25rem;
    display: inline-block;
}

.assignee-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tasks-list-quarterly {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform-origin: top;
}

.task-item-quarterly {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.task-item-quarterly:hover {
    background-color: #f8f9fa;
}

.task-rank {
    background: #6c757d;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 0.8rem;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

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

.task-name {
    flex: 1;
    font-size: 0.9em;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-status {
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}

.quarterly-export {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.export-quarterly-btn {
    background-color: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.export-quarterly-btn:hover {
    background-color: #218838;
}

.open-cios-btn {
    background-color: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.open-cios-btn:hover {
    background-color: #0056b3;
}

.export-help {
    margin: 0;
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
}

/* Responsive quarterly status */
@media (max-width: 768px) {
    .quarterly-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .control-group {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .control-group input[type="number"] {
        width: 80px;
    }
    
    .status-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .status-info {
        justify-content: center;
    }
    
    .status-controls {
        justify-content: center;
    }
    
    .tasks-count-input {
        width: 50px;
    }
    
    .quarter-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .assignee-header-quarterly {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .task-item-quarterly {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .task-name {
        white-space: normal;
        word-wrap: break-word;
    }
}