﻿.tree-table {
    width: 100%;
    border-collapse: collapse;
}

    .tree-table th,
    .tree-table td {
        padding: 10px;
        border-bottom: 1px solid #e5e5e5;
        font-size: 14px;
    }

    .tree-table th {
        background: #f8f9fa;
        text-align: left;
        font-weight: 600;
    }

.tree-row:hover {
    background: #f5f9ff;
}

/* TOGGLE */

.toggle-icon {
    cursor: pointer;
    font-size: 14px;
}

/* SWITCH */

.switch {
    position: relative;
    width: 36px;
    height: 18px;
    display: inline-block;
}

    .switch input {
        display: none;
    }

.slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 18px;
}

    .slider::before {
        content: "";
        position: absolute;
        width: 14px;
        height: 14px;
        left: 2px;
        bottom: 2px;
        background: #fff;
        border-radius: 50%;
        transition: .3s;
    }

.switch input:checked + .slider {
    background: #4CAF50;
}

    .switch input:checked + .slider::before {
        transform: translateX(18px);
    }

/* ICONS */

.icon-plus {
    color: #28a745;
    cursor: pointer;
    margin-right: 8px;
}

.icon-edit {
    color: #007bff;
    cursor: pointer;
    margin-right: 8px;
}

.icon-delete {
    color: #dc3545;
    cursor: pointer;
}

/* MOBILE */

@media (max-width: 768px) {

    .tree-table thead {
        display: none;
    }

    .tree-table,
    .tree-table tbody,
    .tree-table tr,
    .tree-table td {
        display: block;
        width: 100%;
    }

        .tree-table tr {
            border: 1px solid #ddd;
            margin-bottom: 10px;
            border-radius: 6px;
            padding: 10px;
        }

        .tree-table td {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
        }

            .tree-table td:nth-child(2)::before {
                content: "Name";
            }

            .tree-table td:nth-child(3)::before {
                content: "Stock";
            }

            .tree-table td:nth-child(4)::before {
                content: "Time Zone";
            }

            .tree-table td:nth-child(5)::before {
                content: "Currency";
            }

            .tree-table td:nth-child(6)::before {
                content: "Actions";
            }
}

.tree-table tr.parent-row {
    background-color: #ffffff;
}

.tree-table tr.child-row {
    background-color: #f2f2f2;
}

    .tree-table tr.child-row:hover {
        background-color: #e6e6e6;
    }

 