/* URL Tree Visualization Styles */

/* Common tree styling */
.url-tree {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.25rem;
    background-color: rgba(0, 0, 0, 0.1);
    max-height: 70vh;
    overflow-y: auto;
}

/* Horizontal tree view (default) */
.tree-view-horizontal .tree-node {
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
}

.tree-view-horizontal .tree-node:first-child {
    margin-left: 0;
}

/* Vertical tree view */
.tree-view-vertical {
    padding-left: 0.5rem;
}

.tree-view-vertical .tree-node {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--bs-border-color);
    position: relative;
}

.tree-view-vertical .tree-node:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1rem;
    height: 1px;
    background-color: var(--bs-border-color);
}

.tree-view-vertical .tree-node:last-child {
    border-left-color: transparent;
}

/* Vertical view children */
.tree-view-vertical .node-children {
    position: relative;
}

/* Node styling for both views */
.node-header {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 0.25rem;
}

.node-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.node-header.domain {
    color: var(--bs-info);
    font-weight: bold;
}

.node-header.directory {
    color: var(--bs-primary);
    font-weight: 500;
}

.node-header.page {
    color: var(--bs-success);
}

/* Tooltip enhancements */
.node-tooltip {
    position: absolute;
    top: -30px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    z-index: 1000;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.node-header:hover .node-tooltip {
    opacity: 1;
}

/* Toggle buttons */
.toggle-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.toggle-button.expanded {
    transform: rotate(90deg);
}

.toggle-spacer {
    width: 1.5rem;
    margin-right: 0.5rem;
    display: inline-block;
}

/* For improved URL display on hover */
.url-display {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bs-dark);
    color: var(--bs-light);
    padding: 0.5rem 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    border-top: 1px solid var(--bs-border-color);
    z-index: 1000;
    display: none;
}