.call-exp-tree-container {
    position: relative;
    width: 100%;
    min-height: 100px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
}

.tree-node {
    display: inline-block;
    vertical-align: top;
    margin: 10px;
    position: relative;
    background-color: #EEF8FE;
    white-space: nowrap;
    margin-bottom: 10px;
}

.node-content {
    border: 1px solid #ddd;
    padding: 10px;
    padding-right: 10px;
    border-radius: 4px;
    background: #fff;
    min-width: 240px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.node-content:hover {
    filter: brightness(95%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.node-content.active {
    box-shadow: 0 0 0 2px #107EBF !important;
    /* border: 2px solid #107EBF !important; */

}

.node-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 160px;
    max-width: calc(100% - 60px);
    padding-right: 8px;
    display: inline-block;
}

.node-children {
    position: relative;
    margin-left: 40px;
    padding-left: 20px;
}

.expand-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 40%;
    background: #fff;
    border-left: 1px solid #ddd;
    transition: transform 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.side-panel.closed {
    transform: translateX(100%);
}

@media (min-width: 768px) {
    .side-panel {
        width: 40%;
    }
}

@media (max-width: 767px) {
    .side-panel {
        width: 90%;
    }
}

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

.side-panel-content {
    padding: 20px;
}

.close-panel {
    cursor: pointer;
    font-size: 20px;
}

.node-row {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 30px;
}

.digit-column {
    width: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #666;
}

.title-column {
    flex: 1;
    min-width: 0; /* Allows flex item to shrink below content size */
}

.node-row-icons {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.icons-column {
    flex: 1;
    padding-left: 0;
}

.node-icons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.node-icons img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.smvd_option_ico_mg {
    margin: 2px;
}

.smvd_option_ico_sz {
    width: 16px;
    height: 16px;
}

.node-target-type {
    margin-top: 5px;
    border-top: 1px solid #eee;
    padding-top: 5px;
}

.target-type-text {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: normal;
    line-height: 1.2;
}

/* Add a new class for connecting lines */
.tree-node:not(:last-child) > .node-children::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ddd;
}

/* Base node styling */
.node-content {
    background-color: #fff !important;
    border-color: #ddd;
}

/* Root node */
.call-exp-tree-container > .tree-node > .node-content {
    background-color: #f8f9fa !important;
    border-color: #dee2e6;
}

/* RequestGroup nodes */
.node-content.request-group {
    background-color: #e8f5e9 !important;
    border-color: #a5d6a7;
}

/* Action nodes - enabled (default) */
.node-content.action-node {
    /* background-color: #e3f2fd !important; */
    background-color: white !important;

    border-color: #107EBF;
}

/* Action nodes - disabled */
.node-content.action-node.disabled {
    background-color: #f8f8f8 !important;
    border-color: #ddd;
    opacity: 0.8;
}

/* Hover states */
.node-content.request-group:hover {
    background-color: #c8e6c9 !important;
}

.node-content.action-node:hover {
    background-color: #bbdefb !important;
}

.node-content.action-node.disabled:hover {
    background-color: #f0f0f0 !important;
}

/* Root node hover */
.call-exp-tree-container > .tree-node > .node-content:hover {
    background-color: #e9ecef !important;
}

/* Active state */
.node-content.active {
    box-shadow: 0 0 0 2px #107EBF !important;
}

/* Specific positioning for root node expand button */
.call-exp-tree-container > .tree-node > .node-content .expand-btn {
    right: 10px;
}

/* Level 1 nodes (direct children of root) */
.call-exp-tree-container > .tree-node > .node-children > .tree-node > .node-content {
    background: #e3f2fd;
    border-color: #107EBF;
}

/* Level 2 nodes */
.call-exp-tree-container > .tree-node > .node-children > .tree-node > .node-children > .tree-node > .node-content {
    background: #f3e5f5;
    border-color: #ce93d8;
}

/* Level 3 nodes */
.call-exp-tree-container > .tree-node > .node-children > .tree-node > .node-children > .tree-node > .node-children > .tree-node > .node-content {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

/* Hover states for each level */
.call-exp-tree-container > .tree-node > .node-content:hover {
    background: #e9ecef;
}

.call-exp-tree-container > .tree-node > .node-children > .tree-node > .node-content:hover {
    background: #bbdefb;
}

.call-exp-tree-container > .tree-node > .node-children > .tree-node > .node-children > .tree-node > .node-content:hover {
    background: #e1bee7;
}

.call-exp-tree-container > .tree-node > .node-children > .tree-node > .node-children > .tree-node > .node-children > .tree-node > .node-content:hover {
    background: #c8e6c9;
}

/* Style for the question mark icon */
.bi-question-circle {
    font-size: 16px;
    color: #4CAF50; /* Green to match RequestGroup color theme */
}

/* Style for the digit number */
.digit-column span {
    color: #2196F3; /* Blue to match Action node color theme */
    font-size: 16px;
    font-weight: bold;
}

/* Container for the entire view */
.container-fluid {
    position: relative;
    width: 100%;
    padding: 0;
}

/* Tree wrapper */
.tree-wrapper {
    min-width: min-content;
    display: inline-block;
    padding: 10px;
}

/* When side panel is open */
.side-panel:not(.closed) ~ .call-exp-tree-container {
    width: 55%;
}

/* Scrollbar styles */
.call-exp-tree-container {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.call-exp-tree-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.call-exp-tree-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.call-exp-tree-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.call-exp-tree-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Update the header section */
.ison24-sec-topbar {
    margin-bottom: 0 !important;
}

/* Update the network error message positioning */
/* .row.row-centered.m-t-xxl {
    margin-top: 20px !important;
} */

/* Update the row containing the tree and panel */
/* .row {
    margin: 0;
    position: relative;
} */

/* Update the column containing the tree */
[ng-class*="col-lg"] {
    padding: 15px;
    transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    [ng-class*="col-lg-7"] {
        width: 60%;
    }
    
    [ng-class*="col-lg-4"] {
        width: 40%;
    }
}

.tree-controls {
    margin: 10px 0;
    padding: 0 15px;
}

.tree-controls .btn {
    font-size: 14px;
    padding: 6px 12px;
}

.tree-controls .bi {
    margin-right: 5px;
}

.move-buttons {
    display: flex;
    gap: 4px;
    margin-right: 8px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.node-content:hover .move-buttons,
.node-content.active .move-buttons {
    opacity: 1;
}

/* Optional: add a subtle fade effect for the buttons */
.move-buttons .btn {
    transition: all 0.2s ease-in-out;
}

.move-buttons .btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Update panel-content and ce-panel-footer styles */
.panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

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

.ce-panel-footer {
    position: sticky;
    bottom: 40px;
    background-color: #fff;
    border-top: 1px solid #ddd;
    padding: 15px;
    width: 100%;
    z-index: 2;
    margin: 0;
    box-sizing: border-box;
}

.ce-panel-footer .row {
    display: flex;
    align-items: center;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Update the column widths to use flex instead of Bootstrap's grid */
.ce-panel-footer .col-xs-3 {
    flex: 0 0 auto;
    padding-left: 15px;
    display: flex;
    gap: 8px;
}

.ce-panel-footer .col-xs-9.pull-right {
    flex: 1;
    padding-right: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Update side panel styles to match contacts */
.side-panel {
    position: fixed;
    top: 40px !important;
    right: 0;
    height: 100vh;
    width: 40%;
    background: #EEF8FE;
    border-left: 1px solid #ddd;
    transition: transform 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.panel-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

.text-bold {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.samvadiTextBkgBig-1 {
    background-color: #EEF8FE;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
}

/* Button styling */
.smvd_btn_main {
    background-color: #107EBF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

.smvd_btn_main:hover {
    background-color: #0056b3;
}

.smvd_btn_main_tsp {
    background-color: transparent;
    color: #107EBF;
    border: 1px solid #107EBF;
    padding: 8px 16px;
    border-radius: 4px;
    margin-right: 10px;
    transition: all 0.2s;
}

.smvd_btn_main_tsp:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Spin animation for loading state */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
} 