* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", serif;
    background-color: #faf9f5;
}

.chat-box-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 1rem;
    height: calc(100vh - 60px);
}

h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.central-section {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e6d9c9;
    border-radius: 1rem;
    position: relative;
}

.textbox {
    font-size: 1rem;
    color: #666;
    width: 100%;
    outline: none;
    border: none;
    resize: none;
}

.server-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.prompt {
    margin: 0 0.25rem;
    background-color: #e4e2d9;
    border: 1px solid #e6d9c9;
    border-radius: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.2rem 0.7rem;
}

.prompt:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.floating-div {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: #faf9f5;
    border: 1px solid #e6d9c9;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    z-index: 2;
}

.floating-div:hover {
    background-color: #e4e2d9;
}

.workingScreen {
    display: flex;
    justify-content: center;
}

.justify-content {
    justify-content: space-between;
}

.topic {
    width: 100%;
    height:2.5rem;
    background-color: #fff;
    border-bottom: 1px solid #e6d9c9;
    padding: 0.5rem;
    align-self: flex-start;
    justify-content: center;
}

.sub-heading {
    width: 100%;
    margin-bottom: 0.8rem;
    align-self: flex-start;
    width: 100%;
    border-bottom: 1px solid #e6d9c9;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}

#chatSection {
    min-height: 100vh;
    border-right: 1px solid #e6d9c9;
    border-left: 1px solid #e6d9c9;
    gap: 0rem;
    width: 60%;
    padding: 1rem;
    padding-bottom: 7rem;
}

.caseSection {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    width: 40%;
}

#previewSection {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    width: 40%;
    min-height: 100vh;
    border-left: 1px solid #e6d9c9;
}

.userques {
    position: relative;
    align-self: flex-end;
    background: #fff;
    border: 1px solid #e6d9c9;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    max-width: 80%;
}

.userphoto {
    position: absolute;
    left: -3rem;
    border: 1px solid #e6d9c9;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.usericon {
    margin: 0.5rem;
}

.margin-top-10 {
    margin-top: 1rem;
}


.aianswer {
    font-size: 1rem;
    background: #fff;
    border: 1px solid #e6d9c9;
    padding: 1rem;
    margin: 1rem 0rem;
    border-radius: 1rem;
}

.dots::after {
    content: '';
    display: inline-block;
    animation: dotsAnimation 1.5s steps(4, end) infinite;
}

.file-tree {
    padding: 0 10px;
    position: relative;
    font-size: 1rem;
}

/* Styling for folders and files */
.folder, .file {
margin: 0.3rem 0;
position: relative;
margin-left: -0.3rem;
padding-left: 0.3rem;
}

.selected {
    font-weight: bold;
    background-color: #e4e2d9;
    border-radius: 0.3em;
}

.folder-icon,
.file-icon {
margin-right: 0.3rem;
}

/* Add a vertical line to nested items */
.nested {
    padding-left: 1.2rem; /* Indent the nested items */
    border-left: 1px solid #e6d9c9; /* Vertical line */
    margin-left: 0.4rem; /* Adjust spacing */
}

.folder::before {
content: '';
position: absolute;
left: -0.9rem; /* Line starts from the parent line */
top: 0.6rem; /* Center the line vertically */
width: 0.6rem;
height: 1px;
background-color: #e6d9c9; /* Line color */
}

.file::before {
content: '';
position: absolute;
left: -0.9rem; /* Line starts from the parent line */
top: 50%; /* Center the line vertically */
width: 0.6rem;
height: 1px;
background-color: #e6d9c9; /* Line color */
}

/* Remove the vertical line for the last child */
.nested > .folder:last-child::before,
.nested > .file:last-child::before {
border-left: none;
}

.file-tree > .folder::before {
display: none; /* Hide the line before top-level folders */
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e6d9c9;
}

.top-bar-right {
    display: flex;
    flex-direction: row;
}

.signup {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    padding: 0.5rem;
    background: #603320;
    border-radius: 0.5rem;
    border: 1px solid #603320;
    cursor: pointer;
}

.signup:hover {
    background: #ac5d3b;
}

.signin {
    font-size: 0.9rem;
    font-weight: bold;
    color: black;
    margin-right: 1.2rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.signin:hover {
    background: #f0eee7;
}

.logo-img {
    margin-top: 0.2rem;
    height: 40px;
}

.logo-text {
    margin-bottom: 0.5rem;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.reply-box {
    display: none;
    position: fixed; 
    bottom: 0px; 
    left: 5%; 
    width: 50%; 
    height: 90px; 
    background: #fff;
    border: 1px solid #e6d9c9; 
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border-bottom: none;
    z-index: 9999;
}

.reply-box-info {
    display: none;
    width: 90%;
    position: absolute;
    height: 30px;
    top:-31px;
    left: 5%;
    border: 1px solid #e6d9c9;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border-bottom: none;
    background: #f0eee7;
    font-size: 0.8rem;
    color: grey;
    padding: 0.4rem;
    text-align: center;
}

.reply-text-box {
    resize:none;
    width: 90%;
    border: none;
    outline: none;
    font-size: 1rem;
    margin: 1rem;
    position: relative;
    z-index: 1;
}

.bottom-bar {
    width: 100%;
    height: 50px;
    background: black;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    color: lightgrey;
    padding: 1rem;
    align-items: center;
    font-size: 0.7rem;
}

.clean-anchor {
    cursor: pointer;
    text-decoration: none;
    color: lightgrey;
}
.clean-anchor:hover {
    text-decoration: underline;
}

.case-snippet {
    background: #faf9f5; flex-direction: column; padding-top: 0.5rem; margin-top: 2rem;
}

.case-snippet-view-more {
    height: 30px;padding: 0.15rem; text-align: center; margin-top: 0.5rem; border-top: 1px solid #e6d9c9; color: grey;
}

@media (max-width: 480px) {
    .central-section {
        width: 100%;
    }

    #chatSection {
        width: 100%;
        position: relative;
        border: 0px;
    }

    .caseSection {
        overflow-y: auto;
    }

    .reply-box {
        width: 90%;
    }

    .prompt {
        margin: 0.25rem 0;
        margin-top: 1rem;
    }

    #suggested_prompts {
        flex-direction: column;
    }

    .bottom-bar {
        flex-direction: column;
        height: 90px;
    }
}

@keyframes dotsAnimation {
    0% {
        content: '';
    }
    25% {
        content: '.';
    }
    50% {
        content: '..';
    }
    75% {
        content: '...';
    }
    100% {
        content: '';
    }
}

.pagination {
    margin-top: 0.5rem;
    text-align: center;
}

.preview {
    background-color: #fff;
    border-radius: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    min-height: 100%;
    font-size: 1rem;
}

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.padding10 {
    padding: 1rem;
}