/* ========================================
   COListDialog Complete Styles
   ======================================== */

/* ========================================
   ANIMATED DIALOG STYLES
   ======================================== */

/* Core popup panel overrides - target by ID for specificity */
[id^='colist-dialog-'].gwt-PopupPanel {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Combined class selectors (fallback) */
.colist-dialog-popup.gwt-PopupPanel,
.gwt-PopupPanel.colist-dialog-popup {
    border: none !important;
    background: none !important;
    top: 45px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.colist-dialog-popup {
    z-index: 1000;
}

/* Main dialog container */
.colist-dialog-container {
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.15),
            0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 1300px;
    height: 700px;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    will-change: transform, opacity;
}

.colist-dialog-content-panel {
    width: 100%;
    padding: 0 6px;
}

/* Dialog header */
.colist-dialog-header {
    background: #f8f9fa;
    color: white;
    padding: 0px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    position: relative;
}

/* Dialog title */
.colist-dialog-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #007aa8;
}

/* Close button */
.colist-dialog-close-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: green;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 26px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.colist-dialog-close-btn:hover {
    background: #dc3545; /* Red background on hover */
    color: white; /* White text/X on hover */
    transform: translateY(-50%) scale(1.05);
}

/* Content area */
.colist-dialog-content {
    padding: 6px;
    flex: 1;
    overflow: visible !important; /* Force visible to prevent scrolling */
    height: auto;
}

/* Content scrollbar styling */
.colist-dialog-content::-webkit-scrollbar {
    width: 8px;
}

.colist-dialog-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.colist-dialog-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #dee2e6 0%, #ced4da 100%);
    border-radius: 4px;
    border: 1px solid #f8f9fa;
}

.colist-dialog-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ced4da 0%, #adb5bd 100%);
}

/* Footer area */
.colist-dialog-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Footer button styling */
.colist-dialog-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

/* ========================================
   COLIST DIALOG STYLES
   ======================================== */

/* COListDialog specific content styling */
.colist-dialog-content {
    width: 99%;  /* might be a better way to achieve right padding uniformity */
    gap: 20px;
}

/* Standard button variants */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #495057;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* ========================================
   SEARCH INPUT STYLES
   ======================================== */

/* Search panel container */
.colist-dialog-search-panel {
    margin-bottom: 20px;
    position: relative;
    padding: 0 6px;
}

.colist-dialog-search-input {
    background-image: url(/images/icons/Search_Icon.png) !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 16px) center !important;
    background-size: 16px 16px !important;
    padding-left: 16px !important; /* Remove extra left padding */
    padding-right: 40px !important; /* Add right padding for icon space */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px !important;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: white !important; /* Use background-color instead of background */
    color: #495057;
}

/* Search input placeholder styling */
.colist-dialog-search-input::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* Focus state */
.colist-dialog-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fafbff;
}

/* Hover state (when not focused) */
.colist-dialog-search-input:hover:not(:focus) {
    border-color: #ced4da;
}

/* Search input with results */
.colist-dialog-search-input.has-results {
    border-color: #28a745;
}

/* Search input with no results */
.colist-dialog-search-input.no-results {
    border-color: #dc3545;
    background: #fff5f5;
}

/* ========================================
   FILTER PANEL STYLES
   ======================================== */

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
    padding: 0 6px;
    width: calc(100% - 12px);
    justify-content: space-between;
}
.filter-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

/* Hover state for inactive buttons */
.filter-btn:hover:not(.active) {
    border-color: #71c1df;
    background: #f0f8fc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 122, 168, 0.15);
    color: #007aa8;
}

/* Active/selected state */
.filter-btn.active {
    background: linear-gradient(135deg, #007aa8 0%, #005c7a 100%);
    color: white;
    border-color: #007aa8;
    box-shadow: 0 2px 8px rgba(0, 122, 168, 0.3);
    font-weight: 600;
}

/* Active button hover */
.filter-btn.active:hover {
    background: linear-gradient(135deg, #005c7a 0%, #004862 100%);
    border-color: #005c7a;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 122, 168, 0.4);
}

/* Focus state for accessibility */
.filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 168, 0.2);
}

/* Click/pressed animation */
.filter-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

/* Disabled state (if needed) */
.filter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
}

.filter-btn:disabled:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Override GWT default button styling */
.filter-btn.gwt-Button {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
    font-family: inherit !important;
    text-decoration: none !important;
}


.filter-btn.gwt-Button:hover:not(.active) {
    background: #f0f8fc !important;
    border-color: #007aa8 !important;
    color: #007aa8 !important;
}

.filter-btn.gwt-Button.active {
    background: linear-gradient(135deg, #007aa8 0%, #005c7a 100%) !important;
    border-color: #007aa8 !important;
    color: white !important;
}

.filter-btn.gwt-Button.active:hover {
    background: linear-gradient(135deg, #005c7a 0%, #004862 100%) !important;
}

/* Badge for filter counts (if you want to add counts later) */
.filter-btn .filter-count {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    min-width: 16px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ========================================
   COLIST DIALOG ITEMS STYLES
   ======================================== */

/* Main items container with scrolling */
.colist-dialog-items-container {
    height: 600px !important;
    overflow-y: auto !important; /* Only this scrolls */
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    margin: 0 6px;
}

/* Custom scrollbar for the items container */
.colist-dialog-items-container::-webkit-scrollbar {
    width: 8px;
}

.colist-dialog-items-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
    margin: 4px 0;
}

.colist-dialog-items-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #dee2e6 0%, #ced4da 100%);
    border-radius: 4px;
    border: 1px solid #f8f9fa;
    min-height: 20px;
}

.colist-dialog-items-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ced4da 0%, #adb5bd 100%);
}

/* Firefox scrollbar styling */
.colist-dialog-items-container {
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 #f8f9fa;
}

/* Items panel itself */
.colist-dialog-items-panel {
    width: 100%;
    min-height: 100px;
}

/* Loading state for the panel */
.colist-dialog-items-panel.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #6c757d;
    font-style: italic;
}

/* Empty state when no items to display */
.colist-dialog-items-panel.empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.colist-dialog-items-panel.empty .empty-icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.colist-dialog-items-panel.empty .empty-message {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
}

.colist-dialog-items-panel.empty .empty-suggestion {
    font-size: 14px;
    opacity: 0.7;
    line-height: 1.4;
}

/* Fade-in animation for loaded items */
.colist-dialog-items-panel.loaded {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container border variations based on content state */
.colist-dialog-items-container.has-results {
    border-color: #28a745;
    box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.1);
}

.colist-dialog-items-container.no-results {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.1);
}

.colist-dialog-items-container.filtered {
    border-color: #667eea;
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.1);
}

/* Loading spinner animation */
.colist-dialog-items-panel.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   LIST ITEM WIDGET STYLES
   ======================================== */

/* Base list item container */
.colist-item {
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.colist-item:last-child {
    border-bottom: none;
}

.colist-item:hover {
    background: #DDE7EE;
}

/* Dynamic accent colors based on item type - match badge colors */
.colist-item.activeItem {
    background: linear-gradient(90deg, #f8f9ff 0%, #ffffff 100%);
    border-left: 4px solid #72be44; /* Default green for reports */
    box-shadow: inset 0 0 0 1px rgba(114, 190, 68, 0.1);
}

/* Reports - Green accent */
.colist-item.activeItem .colist-item-type-badge-REPORTS {
    border-left-color: #72be44 !important;
}
.colist-item.activeItem:has(.colist-item-type-badge-REPORTS) {
    border-left-color: #72be44 !important;
    box-shadow: inset 0 0 0 1px rgba(114, 190, 68, 0.1) !important;
}

/* Charts - Green accent (same as reports) */
.colist-item.activeItem:has(.colist-item-type-badge-CHARTS) {
    border-left-color: #72be44 !important;
    box-shadow: inset 0 0 0 1px rgba(114, 190, 68, 0.1) !important;
}

/* FO Tables - Purple accent  */
.colist-item.activeItem:has(.colist-item-type-badge-FO_TABLES) {
    border-left-color: #9c63a3 !important;
    box-shadow: inset 0 0 0 1px rgba(114, 190, 68, 0.1) !important;
}

/* Input Managers - Purple accent */
.colist-item.activeItem:has(.colist-item-type-badge-INPUT_MANAGERS) {
    border-left-color: #9c63a3 !important;
    box-shadow: inset 0 0 0 1px rgba(156, 99, 163, 0.1) !important;
}

/* Scenarios - Teal accent */
.colist-item.activeItem:has(.colist-item-type-badge-SCENARIOS) {
    border-left-color: #0fcaa3 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 202, 163, 0.1) !important;
}

/* Text - Blue accent */
.colist-item.activeItem:has(.colist-item-type-badge-TEXT) {
    border-left-color: #0b2c71 !important;
    box-shadow: inset 0 0 0 1px rgba(11, 44, 113, 0.1) !important;
}


/* List item header */
.colist-item-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 10px;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.colist-item-header:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Clickable elements indicator */
.colist-item-clickable {
    cursor: pointer;
    user-select: none;
}

/* Expand/collapse icon */
.colist-item-expand-icon {
    margin-right: 12px;
    font-weight: bold;
    color: #2d7a00;
    font-size: 14px;
    transition: transform 0.2s ease;
    width: 16px;
    text-align: center;
}

.colist-item.activeItem .expandIcon {
    transform: rotate(90deg);
}

/* Item name/title */
.colist-item-name {
    flex-grow: 1;
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    line-height: 1.4;
    margin-right: 12px;
}

/* Selected/expanded item name color */
.colist-item.activeItem .colist-item-name,
.colist-item.expandedItem .colist-item-name {
    color: #007aa8;
    font-weight: 600; /* Optional: make it slightly bolder when selected */
}

/* Type badges with color coding */
.colist-item-type-badge {
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.colist-item-type-badge-REPORTS {
    background: linear-gradient(135deg, #72be44 0%, #8dbd6f 100%);
}

.colist-item-type-badge-CHARTS {
    background: linear-gradient(135deg, #72be44 0%, #72be44 100%);
}

.colist-item-type-badge-FO_TABLES {
    background: linear-gradient(135deg, #9c63a3 0%, #9c63a3 100%);
}

.colist-item-type-badge-INPUT_MANAGERS {
    background: linear-gradient(135deg, #9c63a3 0%, #9c63a3 100%);
}

.colist-item-type-badge-SCENARIOS {
    background: linear-gradient(135deg, #0fcaa3 0%, #0fcaa3 100%);
}

.colist-item-type-badge-TEXT {
    background: linear-gradient(135deg, #0b2c71 0%, #0b2c71 100%);
}

/* Show add button on hover or when expanded */
.colist-item:hover .colist-item-header-add-btn,
.colist-item.expandedItem .colist-item-header-add-btn {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.colist-item:hover .colist-item-header-add-btn.colist-item-disabled[disabled] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    background: #6c757d !important; /* Dark gray background */
    color: #e9ecef !important; /* Light text for contrast */
    border: 1px solid #888b8f !important; /* Subtle border */
}

/* Header-level add button */
.colist-item-header-add-btn {
    background: linear-gradient(135deg, #2d7a00 0%, #2d7a00 100%);
    color: white;
    border: none;
    padding: 5px 11px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
    margin-right: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
}

.colist-item-header-add-btn:hover:not(.colist-item-disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

/* Disabled add button state */
.colist-item-header-add-btn.colist-item-disabled,
.colist-item-header-add-btn:colist-item-disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.2) !important;
}

.colist-item-header-add-btn.colist-item-disabled:hover,
.colist-item-header-add-btn:colist-item-disabled:hover {
    transform: none !important;
    background: #6c757d !important;
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.2) !important;
}

.colist-item-disabled .colist-item-header-add-btn,
.colist-item-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #6c757d !important;
}

.colist-item-disabled .colist-item-header-add-btn:hover,
.colist-item-disabled {
    transform: none !important;
    box-shadow: none !important;
    background: #6c757d !important;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Expanded content area */
.colist-item-expanded-content {
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    max-height: 480px;
    border-top: 1px solid #e9ecef;
    padding: 0;
    animation: slideDown 0.3s ease-out;
    overflow: auto;
    position: relative;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Path panel (if used) */
.pathPanel {
    padding: 16px 20px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-bottom: 1px solid #e9ecef;
}

.pathLabel {
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
    line-height: 1.4;
}

/* DISABLED STATES */
.colist-item-disabled {
    opacity: 0.5;
    background: #f8f9fa !important;
    pointer-events: none;
    position: relative;
}

.colist-item-disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(108, 117, 125, 0.1);
    z-index: 1;
    pointer-events: none;
}

.colist-item-disabled .colist-item-name {
    color: #6c757d !important;
}

.colist-item-disabled .colist-item-type-badge {
    opacity: 0.6;
    filter: grayscale(50%);
}

.colist-item-disabled .expandIcon {
    color: #2d7a00 !important;
    opacity: 0.5;
}

.colist-item-header-disabled {
    cursor: not-allowed !important;
}

.colist-item-disabled:hover {
    background: #f8f9fa !important;
}

/* Main preview panel container */
.colist-item-framework-preview {
    background: white;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

/* ========================================
   FRAMEWORK PANEL STYLES
   ======================================== */

/* Content container with framework + preview layout */
.framework-panel-content-container {
    display: flex;
    gap: 24px;
    min-height: 440px;
    height: 440px;
    max-height: 440px;
}

/* Framework selection panel */
.framework-panel-selection {
    min-width: 280px;
    max-width: 320px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.framework-panel-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.framework-panel-count {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Framework options container */
.framework-panel-options {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    flex-shrink:0;
}

/* Custom scrollbar for framework options */
.framework-panel-options::-webkit-scrollbar {
    width: 6px;
}

.framework-panel-options::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.framework-panel-options::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.framework-panel-options::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}

/* Individual framework rows */
.framework-panel-row {
    display: block;
    margin: 0;
}

/* Framework option base styles */
.framework-panel-option {
    display: block;
    padding: 12px 16px;
    color: #495057;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.framework-panel-option:last-child {
    border-bottom: none;
}

/* Available (clickable) framework options */
.framework-panel-option-available {
    cursor: pointer;
    transition: all 0.2s ease;
}

.framework-panel-option-available:hover {
    background: #f8f9ff !important;
    color: #667eea !important;
    transform: translateX(2px);
}

/* Selected framework option */
.framework-panel-selected-framework-option {
    background: linear-gradient(135deg, #667eea 0%, #5a6fd8 100%) !important;
    color: white !important;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.framework-panel-selected-framework-option:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #4c63d2 100%) !important;
    transform: translateX(0);
}

/* Disabled (already used) framework options */
.framework-panel-framework-option-disabled {
    background: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    font-style: italic;
}

.framework-panel-framework-option-disabled:hover {
    background: #f8f9fa !important;
    color: #6c757d !important;
    transform: none !important;
}

/* Status messages */
.framework-panel-all-frameworks-used-label {
    padding: 20px;
    text-align: center;
    color: #28a745;
    font-style: italic;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 1px solid #d4edda;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.framework-panel-no-frameworks-label {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    margin: 0;
}

/* Preview content area */
.framework-panel-preview-content {
    flex-grow: 1;
    background: none;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #e9ecef;
    height: 100%;
    width: 600px;  /* setting the width to a lower value to ensure breakpoints work for lower media queries. */
    max-width: 875px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Framework info display */
.framework-panel-framework-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    color: #27ae60;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.4;
    flex-shrink: 0;
}

/* Preview container for actual widgets */
.framework-panel-preview-container {
    border-radius: 6px;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

/* Generic framework placeholder */
.framework-panel-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: none;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-sizing: border-box;
}

.report-preview {
    width: 100%;
    height: 100%;
    overflow: auto;
    border: none;
    background: white;
    position: relative;
    border-radius: 6px;
}

.framework-panel-preview-container .tabbedReport,
.framework-panel-preview-container .tabbed-report {
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.framework-panel-preview-container .report-content,
.framework-panel-preview-container .tabbed-report-content {
    overflow: auto !important;
    max-height: 100% !important;
    max-width: 100% !important;
}

.framework-panel-preview-container table {
    max-width: none !important;
    width: auto !important;
}

.report-preview::-webkit-scrollbar,
.framework-panel-preview-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.report-preview::-webkit-scrollbar-track,
.framework-panel-preview-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.report-preview::-webkit-scrollbar-thumb,
.framework-panel-preview-container::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.report-preview::-webkit-scrollbar-thumb:hover,
.framework-panel-preview-container::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}

/* Type-specific preview placeholders */
.chart-preview, .table-preview, .text-preview,
.report-preview, .input-preview, .scenario-preview, .generic-preview {
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #6c757d;
    border-radius: 8px;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}

/* Chart Preview Container Styles */

.chart-preview-container {
    width: 100%;
    height: 440px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-preview-wrapper {
    height: 440px !important;
    overflow: hidden !important;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Ensure HighChart elements are properly constrained */
.chart-preview-wrapper .highcharts-container {
    height: 440px !important;
    overflow: hidden !important;
}

.chart-preview-wrapper .highcharts-root {
    height: 440px !important;
}

/* Override any existing chart preview styles */
.chart-preview {
    height: 440px !important;
    background: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure the chart doesn't break out of its container */
.colist-item-framework-preview .chart-preview-container * {
    max-width: 1180px !important;
    box-sizing: border-box;
}

/* Loading state for chart preview */
.chart-preview-container.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}

.chart-preview-container.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #007aa8;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

/* Specific preview type styling */
.chart-preview {
    border-color: #3498db;
    background: linear-gradient(135deg, #ebf3fd 0%, #ffffff 100%);
    color: #3498db;
}

.table-preview {
    border-color: #9b59b6;
    background: linear-gradient(135deg, #f4f1f8 0%, #ffffff 100%);
    color: #9b59b6;
}

.text-preview {
    border-color: #7f8c8d;
    background: linear-gradient(135deg, #f2f3f3 0%, #ffffff 100%);
    color: #7f8c8d;
}

.report-preview {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    color: #27ae60;
}

.input-preview {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fdf2e1 0%, #ffffff 100%);
    color: #f39c12;
}

.scenario-preview {
    border-color: #8e44ad;
    background: linear-gradient(135deg, #f3f0f6 0%, #ffffff 100%);
    color: #8e44ad;
}

/* Type buttons in the info panel */
.typeButton {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    color: white;
    font-size: 12px;
    cursor: default;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.typeButton-REPORTS {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.typeButton-CHARTS {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
}

.typeButton-FO_TABLES {
    background: linear-gradient(135deg, #9b59b6 0%, #bb6bd9 100%);
}

.typeButton-INPUT_MANAGERS {
    background: linear-gradient(135deg, #f39c12 0%, #f5b041 100%);
}

.typeButton-SCENARIOS {
    background: linear-gradient(135deg, #8e44ad 0%, #a569bd 100%);
}

.typeButton-TEXT {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
}

/* Loading animation for preview */
.preview-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    color: #667eea;
    font-style: italic;
}

.preview-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

/* ========================================
   RESPONSIVE COLIST DIALOG MEDIA QUERIES
   ======================================== */

/* Base dialog container - for very large screens (1920x1080 and above) */
.colist-dialog-container {
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.15),
            0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 1300px;
    height: 770px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    will-change: transform, opacity;
}

.colist-dialog-items-container {
    height: calc(88vh - 200px) !important;
    max-width: 1265px;
    min-height: 440px;
}

.colist-item-expanded-content {
    max-width: 1265px;
}

.colist-item-framework-preview {
    max-width: 1265px;
}


.colist-item-header {
    max-width: 1265px;
}


/* Large desktop screens (1536x864 and similar) */
@media screen and (max-width: 1600px) and (max-height: 900px) {
    .colist-dialog-container {
        width: 85vw;
        height: 88vh;
        max-width: 1200px;
        max-height: 825px;
    }

    .colist-dialog-items-container {
        height: calc(88vh - 200px) !important;
        max-width: 1165px;
        min-height: 440px;
    }

    .colist-item-expanded-content {
        max-width: 1165px;
    }

    .colist-item-framework-preview {
        max-width: 1165px;
    }


    .colist-item-header {
        max-width: 1165px;
    }
}

/* Standard laptop screens (1366x768, 1280x720, 1280x800) */
@media screen and (max-width: 1400px) and (max-height: 800px) {
    .colist-dialog-container {
        width: 90vw;
        height: 94vh;
        max-width: 1100px;
        max-height: 715px;
        border-radius: 8px;
    }

    .colist-dialog-items-container {
        height: calc(94vh - 180px) !important;
        max-width: 1065px;
        min-height: 385px;
    }

    .colist-item-expanded-content {
        max-width: 1065px;
    }

    .colist-item-framework-preview {
        max-width: 1065px;
    }

    .colist-item-header {
        max-width: 1065px;
    }

    .colist-dialog-header {
        padding: 12px 20px;
    }

    .colist-dialog-title {
        font-size: 16px;
    }

    .framework-panel-content-container {
        gap: 16px;
    }

    .framework-panel-selection {
        min-width: 240px;
        max-width: 280px;
    }
}

/* Smaller laptop screens (1280x720, 1280x800) */
@media screen and (max-width: 1300px) and (max-height: 820px) {
    .colist-dialog-container {
        width: 92vw;
        height: 97vh;
        max-width: 1000px;
        max-height: 660px;
    }

    .colist-dialog-items-container {
        height: calc(97vh - 160px) !important;
        max-width: 965px;
        min-height: 352px;
    }

    .colist-item-expanded-content {
        max-width: 965px;
    }

    .colist-item-framework-preview {
        max-width: 965px;
    }

    .colist-item-header {
        max-width: 965px;
    }

    .colist-dialog-content {
        padding: 4px;
    }

    .colist-dialog-search-panel {
        margin-bottom: 16px;
    }

    .filter-buttons {
        margin-bottom: 16px;
        gap: 12px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 32px;
    }
}

/* Very small laptop screens and large tablets (1024x768 and similar) */
@media screen and (max-width: 1100px) {
    .colist-dialog-container {
        width: 95vw;
        height: 99vh;
        max-width: 950px;
        max-height: 605px;
        border-radius: 6px;
    }

    .colist-dialog-items-container {
        height: calc(99vh - 140px) !important;
        max-width: 915px;
        min-height: 308px;
    }

    .colist-item-expanded-content {
        max-width: 915px;
    }

    .colist-item-framework-preview {
        max-width: 915px;
    }

    .colist-item-header {
        max-width: 915px;
    }

    .colist-dialog-header {
        padding: 10px 16px;
    }

    .colist-dialog-content {
        padding: 3px;
    }

    .colist-dialog-content-panel {
        padding: 0 4px;
    }

    /* Framework panel adjustments for smaller screens */
    .framework-panel-content-container {
        flex-direction: column;
        gap: 12px;
    }

    .framework-panel-selection {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .framework-panel-options {
        max-height: 150px;
    }

    /* Filter button adjustments */
    .filter-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-height: 28px;
    }

    /* List item adjustments */
    .colist-item-header {
        padding: 12px 16px;
    }

    .colist-item-name {
        font-size: 15px;
    }

    .colist-item-type-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Tablet screens (768px width and below) */
@media screen and (max-width: 768px) {
    .colist-dialog-container {
        width: 97vw;
        height: 97vh;
        max-width: none;
        max-height: none;
        margin: 0;
        border-radius: 4px;
    }

    .colist-dialog-items-container {
        height: calc(97vh - 120px) !important;
        min-height: 275px;
    }

    .colist-item-expanded-content {
        max-width: none;
    }

    .colist-dialog-header {
        padding: 8px 12px;
    }

    .colist-dialog-title {
        font-size: 14px;
    }

    .colist-dialog-close-btn {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }

    .colist-dialog-content {
        padding: 2px;
    }

    .colist-dialog-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 12px !important;
    }

    .filter-buttons {
        justify-content: center;
        gap: 4px;
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-height: 24px;
        flex: 0 1 auto;
        min-width: 60px;
    }

    /* List items for mobile */
    .colist-item-header {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .colist-item-name {
        font-size: 14px;
        margin-right: 8px;
        flex: 1 1 100%;
        order: 1;
    }

    .colist-item-expand-icon {
        order: 0;
        margin-right: 8px;
    }

    .colist-item-header-add-btn {
        order: 2;
        padding: 4px 8px;
        font-size: 11px;
    }

    .colist-item-type-badge {
        order: 3;
        font-size: 10px;
        padding: 3px 6px;
    }

    /* Framework panel for mobile */
    .framework-panel-content-container {
        flex-direction: column;
        gap: 8px;
    }

    .framework-panel-selection {
        padding: 12px;
    }

    .framework-panel-options {
        max-height: 120px;
    }

    .framework-panel-option {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Small mobile screens (480px and below) */
@media screen and (max-width: 480px) {
    .colist-dialog-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }

    .colist-dialog-items-container {
        height: calc(100vh - 100px) !important;
        min-height: 220px;
        border-radius: 0;
    }

    .colist-dialog-header {
        padding: 6px 10px;
    }

    .colist-dialog-title {
        font-size: 13px;
    }

    .filter-btn {
        padding: 3px 6px;
        font-size: 10px;
        min-height: 20px;
        min-width: 50px;
    }

    .colist-item-name {
        font-size: 13px;
    }

    .colist-item-type-badge {
        font-size: 9px;
        padding: 2px 4px;
    }
}

/* Height-specific adjustments for very short screens */
@media screen and (max-height: 600px) {
    .colist-dialog-container {
        height: 98vh;
        max-height: none;
    }

    .colist-dialog-items-container {
        height: calc(98vh - 120px) !important;
        min-height: 220px;
    }

    .colist-dialog-header {
        padding: 6px 16px;
    }

    .colist-dialog-content {
        padding: 2px;
    }

    .colist-dialog-search-panel {
        margin-bottom: 8px;
    }

    .filter-buttons {
        margin-bottom: 8px;
    }

    .framework-panel-options {
        max-height: 100px;
    }
}

/* Landscape mobile adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .colist-dialog-container {
        height: 98vh;
    }

    .colist-dialog-items-container {
        height: calc(98vh - 80px) !important;
    }

    .colist-dialog-header {
        padding: 4px 12px;
    }

    .filter-buttons {
        margin-bottom: 4px;
    }

    .colist-dialog-search-panel {
        margin-bottom: 4px;
    }
}