body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

#app {
    display: flex;
    height: 100%;
}

#directory-tree {
    min-width: 250px;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    box-sizing: border-box;
}

#content {
    flex-grow: 1;
    display: flex;
    height: 100%;
    overflow: hidden;
}

#source-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 50%; /* Set to 50% of the content area */
    border-right: 1px solid #ccc;
}

#original-content, #definitions {
    width: 100%; /* Take up full width of the source column */
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

#original-content {
    height: 100%; /* Changed from 75% to 100% */
    border-bottom: none; /* Remove the border if it's no longer needed */
}

/* Keep the scrollbar hiding styles */
#original-content::-webkit-scrollbar {
    display: none;
}

#original-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* For Webkit browsers (Chrome, Safari, etc.) */
#original-content::-webkit-scrollbar {
    display: none;
}

/* Remove all the previous scrollbar styling */
#original-content::-webkit-scrollbar-thumb,
#original-content::-webkit-scrollbar-track {
    display: none;
}

/* Remove any forced visibility styles */
#original-content {
    overflow-y: scroll !important;
}

/* Hide scrollbar for IE, Edge and Firefox */
#original-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Show scrollbar for WebKit browsers */
#original-content::-webkit-scrollbar {
    display: block;
}

#html-view {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

.html-view-item {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.html-view-item:hover,
.html-view-item:hover > span {
    border: 1px solid #ccc;
    cursor: pointer;
}

/* Remove the border from html-view-item div */
#html-view div {
    padding: 5px;
    border-radius: 3px;
}

/* Add dashed left border to all descendant divs within html-view-item */
.html-view-item div {
    border-left: 1px dashed #ccc;
    padding-left: 10px;
    margin-left: 5px;
}

/* Increase left margin for nested divs */
.html-view-item div div {
    margin-left: 15px;
}

.ticker > span, .filing > span, .attachment > span {
    cursor: pointer;
}

.ticker > span:hover, .filing > span:hover, .attachment > span:hover {
    text-decoration: underline;
}

ul {
    list-style-type: none;
    padding-left: 10px;
}

.ticker > span::before {
    content: '📁 ';
}

.filing > span::before {
    content: '📄 ';
}

.attachment > span::before {
    content: '📎 ';
}

.highlighted {
    background-color: yellow;
    transition: background-color 0.3s ease;
}

.tree-view-item {
    cursor: pointer;
}

.tree-view-item:hover {
    background-color: #f0f0f0;
}

.primary-company  { 
    background-color: #bff;
    box-shadow: 1px 1px 2px;
    border: solid 1px;
}

.third-party-company {
    background-color: #6f7; 
    box-shadow: 1px 1px 2px;
    border: solid 1px;
}

.numbers-percentages-and-dates { 
    background-color: #ff7; 
}
.important-phrase { 
    background-color: #fdd; 
}



/* Update active-highlight rules */
.html-view-item div.active-highlight,
.html-view-item > span.active-highlight,
.html-view-item div.active-highlight > span {
    background-color: #ffffdd;
}

/* Add these new styles at the end of the file */

[data-defined-term] {
    text-decoration: underline;
    text-decoration-color: #0ca4ff;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    cursor: pointer;
}

[data-defined-term]:hover {
    background-color: #f0f0f0;
}

.definition-tooltip {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 5px;
    z-index: 1000;
    max-width: 300px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
}


#directory-tree-container {
    min-width: 250px;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    box-sizing: border-box;
}

#directory-tree-container h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.ticker, .filing, .attachment {
    margin-bottom: 5px;
}

.ticker > span, .filing > span, .attachment > span {
    display: block;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
}

.ticker > span:hover, .filing > span:hover, .attachment > span:hover {
    background-color: #f0f0f0;
}

.active-ticker > span {
    background-color: #e6f3ff;
    font-weight: bold;
}

.active-filing > span {
    background-color: #e6ffe6;
    border-color: #b3d9b3;
}

.active-attachment > span {
    background-color: #fff0e6;
    border-color: #ffd1b3;
    font-weight: bold;
}

.filing > span {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 2px 0;
    padding: 0;
}

.filing-name {
    flex-grow: 1;
    background-color: #fff;
    border: none;
    font-size: inherit;
    font-family: inherit;
    padding: 5px;
    margin: 0;
    width: calc(100% - 100px); /* Adjust width to make room for the date */
    cursor: text;
    border-radius: 0 3px 3px 0;
}

.filing-date {
    width: 100px;
    text-align: right;
    padding: 5px;
    font-size: 0.8em;
    color: #666;
}

.filing-name:focus {
    outline: none;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
}

.filing > span::before {
    content: '📄 ';
    padding: 5px;
    color: #888;
    background-color: #f0f0f0;
    border-right: 1px solid #ddd;
}

.attachment > span {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 2px 0;
    padding: 0;
    transition: all 0.3s ease;
}

.attachment > span:hover {
    background-color: #f0f0f0;
}

.attachment-name {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    font-size: inherit;
    font-family: inherit;
    padding: 5px;
    margin: 0;
    width: 100%;
    cursor: text;
    border-radius: 0 3px 3px 0;
    transition: all 0.3s ease;
}

.attachment-name:focus {
    outline: none;
    background-color: #fff;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
}

.active-attachment .attachment-name {
    background-color: #fff;
}

.attachment > span::before {
    content: '📎 ';
    padding: 5px;
    color: #888;
    background-color: #f0f0f0;
    border-right: 1px solid #ddd;
}

.active-attachment > span::before {
    background-color: #ffe0cc;
    color: #ff8c1a;
}
