/* Progressions Plugin Styles */

.progressions-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.progressions-dashboard-header {
    margin-bottom: 30px;
}

.progressions-dashboard-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

/* Tabs */
.progressions-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.progressions-tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.progressions-tab-button:hover {
    color: #0073aa;
}

.progressions-tab-button.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

/* .progressions-tab-content → fælles base i common.css */

/* Sections */
.progressions-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progressions-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progressions-view-toggle {
    display: flex;
    gap: 5px;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px;
}

.progressions-view-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 3px;
    transition: all 0.2s ease;
    color: #666;
}

.progressions-view-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.progressions-view-btn.active {
    background: #0073aa;
    color: white;
}

.progressions-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
}

.progressions-filter-select:hover {
    border-color: #0073aa;
}

.progressions-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.progressions-section-header h3 {
    margin: 0;
    font-size: 20px;
}

/* Buttons */
.progressions-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.progressions-button-primary {
    background-color: #0073aa;
    color: white;
}

.progressions-button-primary:hover {
    background-color: #005177;
}

.progressions-button-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.progressions-button-secondary:hover {
    background-color: #e0e0e0;
}

.progressions-button-danger {
    background-color: #dc3232;
    color: white;
}

.progressions-button-danger:hover {
    background-color: #a00;
}

/* Client Cards */
.progressions-clients-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* List View for Clients */
.progressions-clients-list.progressions-view-list {
    display: block;
    grid-template-columns: none;
}

.progressions-clients-list.progressions-view-list .progressions-client-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
}

.progressions-clients-list.progressions-view-list .progressions-client-card-header {
    flex: 1;
    margin-bottom: 0;
    margin-right: 20px;
}

.progressions-clients-list.progressions-view-list .progressions-client-card-body {
    flex: 2;
    margin-bottom: 0;
}

.progressions-clients-list.progressions-view-list .progressions-client-stats {
    flex-direction: row;
    gap: 30px;
}

.progressions-clients-list.progressions-view-list .progressions-client-card-footer {
    margin-top: 0;
    margin-left: auto;
}

.progressions-client-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progressions-client-card-header {
    margin-bottom: 15px;
}

.progressions-client-card-header h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.progressions-client-email {
    color: #666;
    font-size: 14px;
}

.progressions-client-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.progressions-stat {
    display: flex;
    flex-direction: column;
}

.progressions-stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.progressions-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
}

.progressions-client-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Icon Buttons */
button.progressions-icon-btn,
.progressions-icon-btn {
    background: #e0e0e0 !important;
    color: #666 !important;
    border: none !important;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    position: relative;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.progressions-icon-btn:hover,
.progressions-icon-btn:hover {
    background: #d0d0d0 !important;
    color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button.progressions-icon-btn:focus,
.progressions-icon-btn:focus {
    background: #d0d0d0 !important;
    color: #333 !important;
    outline: none;
}

.progressions-icon-btn:active {
    transform: translateY(0);
}

/* Danger variant for delete button */
button.progressions-icon-btn-danger,
.progressions-icon-btn-danger {
    background: #ff9999 !important;
    color: #990000 !important;
}

button.progressions-icon-btn-danger:hover,
.progressions-icon-btn-danger:hover {
    background: #ff7777 !important;
    color: #770000 !important;
}

/* Tooltip for icon buttons */
.progressions-icon-btn[title] {
    position: relative;
}

.progressions-icon-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    padding: 6px 10px;
    background: #333;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.progressions-icon-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: -1px;
    border: 5px solid transparent;
    border-top-color: #333;
    pointer-events: none;
    z-index: 1000;
}


/* Point Cards */
.progressions-points-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* List View for Points */
.progressions-points-list.progressions-view-list {
    display: block;
    grid-template-columns: none;
}

.progressions-points-list.progressions-view-list .progressions-point-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
}

.progressions-points-list.progressions-view-list .progressions-point-card-header {
    flex: 1;
    margin-bottom: 0;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progressions-points-list.progressions-view-list .progressions-point-card-footer {
    margin-top: 0;
    margin-left: auto;
}

.progressions-point-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progressions-point-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progressions-point-card-header h4 {
    margin: 0;
    font-size: 16px;
}

.progressions-point-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.progressions-point-badge-global {
    background-color: #e3f2fd;
    color: #1976d2;
}

.progressions-point-badge-own {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.progressions-point-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.progressions-point-readonly {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Questionnaire Cards */
.progressions-questionnaires-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.progressions-questionnaire-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progressions-questionnaire-card-header {
    margin-bottom: 10px;
}

.progressions-questionnaire-card-header h4 {
    margin: 0;
    font-size: 16px;
}

.progressions-questionnaire-card-body {
    margin-bottom: 10px;
}

.progressions-questionnaire-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Client Dashboard */
.progressions-client-dashboard-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.progressions-form-wrapper {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.progressions-form-header {
    margin-bottom: 30px;
    text-align: center;
}

.progressions-form-header h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.progressions-form-header p {
    margin: 0;
    color: #666;
}

.progressions-form-points {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progressions-form-point {
    padding-bottom: 10px;
}

.progressions-form-point:last-child {
    padding-bottom: 0;
}

.progressions-form-point-label {
    display: block;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.progressions-form-point-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progressions-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.progressions-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.progressions-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
}

.progressions-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    border: none;
}

.progressions-slider-value {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
}


/* Button Group (replaces radio buttons) */
.progressions-button-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    padding: 5px 0;
    margin: 0;
}

.progressions-button-option {
    flex: 1;
    display: flex;
    align-items: stretch;
    cursor: pointer;
    margin: 0;
    min-width: 0;
    position: relative;
}

.progressions-button-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.progressions-button-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 8px;
    user-select: none;
    box-sizing: border-box;
    margin: 0;
}

.progressions-button-input:checked + .progressions-button-label {
    background-color: #0073aa;
    border-color: #0073aa;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
}

.progressions-button-label:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.progressions-button-input:checked + .progressions-button-label:hover {
    background-color: #005177;
    border-color: #005177;
}


.progressions-form-footer {
    margin-top: 30px;
    text-align: center;
}

.progressions-submit-btn {
    padding: 12px 40px;
    font-size: 16px;
}

/* History Section */
.progressions-history-section {
    margin-top: 40px;
}

.progressions-history-header h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.progressions-history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progressions-log-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.progressions-log-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.progressions-log-card-header:hover {
    background: #f9f9f9;
    border-radius: 4px;
    padding: 5px;
    margin: -5px;
}

.progressions-log-card-header h4 {
    margin: 0;
    font-size: 18px;
    color: #0073aa;
    flex: 1;
}

.progressions-log-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    transition: transform 0.2s ease;
}

.progressions-log-toggle:hover {
    color: #0073aa;
}

.progressions-log-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.progressions-log-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.progressions-log-data {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progressions-log-data-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.progressions-log-data-item:last-child {
    border-bottom: none;
}

.progressions-log-data-label {
    font-weight: 600;
}

.progressions-log-data-value {
    color: #0073aa;
    font-weight: 600;
}

/* Messages */
.progressions-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.progressions-message-info {
    background-color: #e3f2fd;
    border-left: 4px solid #1976d2;
    color: #1976d2;
}

.progressions-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Admin Client Selector */
.progressions-admin-client-selector {
    margin: 20px 0;
}

.progressions-client-select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.progressions-client-select:hover {
    border-color: #0073aa;
}

.progressions-client-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.progressions-admin-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #856404;
}

.progressions-admin-notice strong {
    color: #856404;
}

/* Modal Styles */
.progressions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progressions-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.progressions-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100001;
    font-size: 16px;
}

.progressions-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.progressions-modal-header h3 {
    margin: 0;
    font-size: 24px;
}

.progressions-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.progressions-modal-close:hover {
    color: #000;
}

.progressions-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.progressions-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.progressions-points-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.progressions-point-checkbox-label,
.progressions-questionnaire-point-checkbox-label,
.progressions-edit-questionnaire-point-checkbox-label {
    display: block;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.progressions-point-checkbox-label:hover,
.progressions-questionnaire-point-checkbox-label:hover,
.progressions-edit-questionnaire-point-checkbox-label:hover {
    background-color: #f5f5f5;
}

/* Global points styling - grey and non-clickable */
.progressions-point-checkbox-label.progressions-point-global,
.progressions-questionnaire-point-checkbox-label.progressions-point-global,
.progressions-edit-questionnaire-point-checkbox-label.progressions-point-global {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.progressions-point-checkbox-label.progressions-point-global:hover,
.progressions-questionnaire-point-checkbox-label.progressions-point-global:hover,
.progressions-edit-questionnaire-point-checkbox-label.progressions-point-global:hover {
    background-color: #f5f5f5;
}

.progressions-point-checkbox-label.progressions-point-global span,
.progressions-questionnaire-point-checkbox-label.progressions-point-global span,
.progressions-edit-questionnaire-point-checkbox-label.progressions-point-global span {
    color: #999;
}

.progressions-point-checkbox,
.progressions-questionnaire-point-checkbox,
.progressions-edit-questionnaire-point-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.progressions-point-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.progressions-point-checkbox-label span,
.progressions-questionnaire-point-checkbox-label span,
.progressions-edit-questionnaire-point-checkbox-label span {
    flex: 1;
    user-select: none;
}

/* Ensure checkbox labels display as flex containers */
.progressions-questionnaire-point-checkbox-label,
.progressions-edit-questionnaire-point-checkbox-label {
    display: flex;
}

/* Points Group (Foldable Sections) */
.progressions-points-group {
    margin-bottom: 20px;
}

.progressions-points-group-header {
    cursor: pointer;
    padding: 12px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.progressions-points-group-header:hover {
    background: #e8e8e8;
}

.progressions-points-group-header strong {
    font-size: 16px;
    color: #333;
}

.progressions-group-toggle {
    font-size: 16px;
    color: #666;
    transition: transform 0.3s ease;
    user-select: none;
}

.progressions-group-toggle.expanded {
    transform: rotate(180deg);
}

.progressions-points-group-content {
    padding-left: 10px;
    transition: all 0.3s ease;
}

/* Debug Window */
.progressions-debug-window {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.progressions-debug-window h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

#progressions-debug-content {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#progressions-debug-content .debug-entry {
    margin-bottom: 8px;
    padding: 5px;
    border-left: 3px solid #0073aa;
    padding-left: 10px;
}

#progressions-debug-content .debug-entry.error {
    border-left-color: #dc3232;
    background: #ffeaea;
    color: #a00;
}

#progressions-debug-content .debug-entry.success {
    border-left-color: #46b450;
    background: #eafaea;
    color: #0a0;
}

#progressions-debug-content .debug-entry.warning {
    border-left-color: #ffb900;
    background: #fffbea;
    color: #856404;
}

#progressions-debug-content .debug-entry.info {
    border-left-color: #0073aa;
    background: #eaf4ff;
    color: #0073aa;
}

#progressions-debug-content .debug-timestamp {
    color: #666;
    font-size: 11px;
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .progressions-clients-list,
    .progressions-points-list {
        grid-template-columns: 1fr;
    }
    
    .progressions-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .progressions-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .progressions-button-group {
        gap: 5px;
    }
    
    .progressions-button-label {
        height: 36px;
        font-size: 13px;
        padding: 0 6px;
    }
}

/* Custom Legend - Separate Section Above Charts */
.progressions-chart-legend {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    background: #f9f9f9;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Collapsible legend header */
.progressions-legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

.progressions-legend-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.progressions-legend-toggle-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.progressions-chart-legend.expanded .progressions-legend-toggle-icon {
    transform: rotate(180deg);
}

/* Collapsible body */
.progressions-legend-body {
    padding: 8px 12px 10px 12px;
    display: none !important;
}

.progressions-chart-legend.expanded .progressions-legend-body {
    display: block !important;
}

.progressions-custom-legend,
ul.progressions-custom-legend,
.progressions-chart-legend ul.progressions-custom-legend,
#progressions-timeline-line-chart-legend ul.progressions-custom-legend,
#progressions-timeline-bar-chart-legend ul.progressions-custom-legend,
#progressions-timeline-line-chart-backend-legend ul.progressions-custom-legend,
#progressions-timeline-bar-chart-backend-legend ul.progressions-custom-legend,
#progressions-client-logs-chart-legend ul.progressions-custom-legend {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 8px 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    align-items: start !important;
    justify-items: start !important;
    column-gap: 30px !important;
    row-gap: 8px !important;
}

/* Force grid layout - ensure items flow into two columns */
.progressions-custom-legend > li {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Ensure canvas elements have proper spacing after legend section */
#progressions-timeline-line-chart,
#progressions-timeline-bar-chart,
#progressions-timeline-line-chart-backend,
#progressions-timeline-bar-chart-backend {
    margin-top: 0 !important;
    display: block !important;
}

/* Ensure chart containers have proper structure */
#progressions-timeline-charts > div,
#progressions-timeline-charts-backend > div {
    position: relative !important;
}

/* Ensure legend items are visible and properly styled */
.progressions-custom-legend li {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    font-size: 11px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    max-width: none !important;
    width: 100% !important;
    cursor: pointer;
    text-align: left !important;
    box-sizing: border-box !important;
}

.progressions-custom-legend li:hover {
    opacity: 0.8;
}

/* Make sure legend text is fully visible */
.progressions-custom-legend li span {
    display: inline-block !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: left !important;
}

/* Ensure text span takes available space and aligns left */
.progressions-custom-legend li span:last-child {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: left !important;
}

/* Ensure legend color dots are visible */
.progressions-custom-legend li span:first-child {
    flex-shrink: 0 !important;
}
}

/* Responsive: Single column on small screens */
@media (max-width: 768px) {
    .progressions-custom-legend {
        grid-template-columns: 1fr !important;
    }
}

