/* src/pages/Interactive.css */
.app>.interactive-wrapper {
    margin: 3rem 0;
}

.interactive-wrapper .info-section {
    margin-bottom: 3rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.interactive-layout {
    display: flex;
    max-height: 100vh;
    flex-direction: row;
    margin: 0;
    overflow: hidden;
}

.interactive-sidebar {
    width: 400px;
    background: #ffffff;
    border-radius: 12px;
    border-right: 1px solid #e0e0e0;
    padding: 1rem;
    overflow-y: auto;
    height: fit-content;
    /* Add this to make it fit content */
}

.interactive-content {
    flex: 1;
    padding: 0;
    padding-left: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-section h3 {
    color: #3e5488;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.field-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.field-name {
    font-size: 0.95rem;
    color: #2c3e50;
}

.field-actions {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f0f2f5;
    color: #2c3e50;
}

.action-button:hover {
    background: #e4e7eb;
}

.action-button.active {
    background: #3e5488;
    color: white;
}

.action-button.pivot-active {
    background: #4caf50;
    color: white;
}

.action-button.measure-active {
    background: #ff4081;
    color: white;
}

.selected-fields {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.field-section {
    margin-bottom: 1rem;
}

.field-section h3 {
    color: #3e5488;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.selected-fields .field-section {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.selected-fields .draggable-container {
    height: 120px;
    overflow-y: auto;
    padding: 0.5rem;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f8f8;
}

.selected-fields .field-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #666;
}

.selected-fields .draggable-container .field-item {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.selected-fields .draggable-container::-webkit-scrollbar {
    width: 6px;
}

.selected-fields .draggable-container::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.draggable-container {
    padding: 0.75rem;
    gap: 0.4rem;
    min-height: 40px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
}

.pivot-table-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #2c3e50;
    font-size: 1.1rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-section {
    margin: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    cursor: pointer;
}

.info-header h2 {
    margin: 0;
    color: #3e5488;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.info-content {
    border-top: 1px solid #e0e0e0;
    padding: 2rem 3rem;
}

.info-content h3 {
    color: #3e5488;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.info-content h3:not(:first-child) {
    margin-top: 2rem;
}

.info-content p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.info-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-content li {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-tip {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #3e5488;
    border-radius: 0 4px 4px 0;
}

.info-tip strong {
    color: #3e5488;
}

.collapse-button {
    background: none;
    border: none;
    color: #3e5488;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease;
}

.collapse-button i {
    font-size: 1rem;
}

.collapse-button:hover {
    color: #2c3e50;
}

.draggable-container {
    padding: 0.5rem;
    gap: 0.4rem;
    min-height: 32px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
}

.selected-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* Three equal columns */
    gap: 1rem;
    margin-bottom: 1rem;
}

.selected-fields .field-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-bottom: 0;
}

.selected-fields .field-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #666;
}

.selected-fields .draggable-container {
    flex: 1;
    /* Make container fill available space */
    min-height: 80px;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f8f8f8;
}

.field-item {
    padding: 0.35rem 0.5rem;
    min-height: 24px;
    display: flex;
    align-items: center;
}

.selected-fields .draggable-container .field-item {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.selected-fields .draggable-container .field-item:last-child {
    margin-bottom: 0;
}