
body {
    height: 100dvh;
    width: 100dvw;
    overflow: hidden;
    position: fixed;
}


.chat-layout {
    height: 100dvh;
    width: 100dvw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed;
}

/* Chat Page Layout */
.chat-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    flex: 1;
}

.chat-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1rem 1.5rem;
    background: linear-gradient(0deg, rgba(248,250,255,1) 0%, rgba(248,250,255,0.9) 70%, rgba(248,250,255,0) 100%);
    z-index: 10;
}

/* Chat Header - Enhanced with subtle branding */
.chat-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    /* background-color: rgba(255, 255, 255, 0.9); */
    /* backdrop-filter: blur(20px); */
    -webkit-backdrop-filter: blur(20px);
    /* border-bottom: 1px solid rgba(229, 231, 235, 0.6); */
    /* position: sticky; */
    top: 0;
    /* z-index: 10; */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.chat-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-header .logo img {
    width: 2.3rem;
    height: 2.3rem;
}

.chat-header h1 {
    font-size: 1.25rem;
    margin: 0;
    color: #1a1a1a;
    font-weight: 700;
    background: var(--Gradient, linear-gradient(90deg, #6e48e0 0%, #4b27c3 100%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.new-chat-button {
    height: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    /* border: none; */
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    /* font-weight: 500; */
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 200px;
    background: #484848;
    /* box-shadow: 0px 4px 12px 0px rgba(255, 255, 255, 0.4) inset,
        0px 4px 20px -6px rgba(118, 88, 214, 0.4); */
}

.new-chat-button img {
    width: 1.25rem;
    height: 1.25rem;
}

.new-chat-button:hover {
    transform: scale(1.02);
    /* box-shadow: 0px 6px 14px 0px rgba(255, 255, 255, 0.5) inset,
        0px 6px 24px -6px rgba(118, 88, 214, 0.5); */
    /* opacity: 0.9; */
    background: #514c58;
}

.new-chat-button:active {
    transform: translateY(0px);
}

.chat-content-wrapper {
    padding-bottom: 2rem;
    flex: 1;
    flex-shrink: 3;
    overflow: auto;
}

.chat-content {
    overflow: auto;
    min-height: 100%;
    display: flex;
}

/* Message List Improvements */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100%;
    width: 100%;
    max-width: 736px;
    margin: 0 auto 80px;
    padding: 2.5rem 1rem;
    padding-bottom: 0;
    margin-bottom: 0;
}

.no-messages {
    text-align: center;
    font-size: 1.25rem;
    color: #999;
    margin-top: calc(40vh - 18rem);
}

/* Message Bubbles - Fixed */
.user-message {
    background: linear-gradient(271deg, rgb(73, 37, 193) 1.64%, rgb(121, 83, 233) 102.71%);
    align-self: flex-end;
    min-width: 120px;
    max-width: calc(100% - 4rem);
    padding: 1rem 1.25rem;
    border-radius: 18px 4px 18px 18px;
    color: white;
    box-shadow: 0 4px 15px rgba(63, 63, 229, 0.15);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    margin-right: 1rem;
    transform-origin: bottom right;
    animation: messagePopIn 0.3s ease-out;
    font-weight: 400;
}

.assistant-message {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.875rem;
    background: white;
    padding: 1.25rem;
    border-radius: 4px 18px 18px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: calc(100% - 4rem);
    margin-left: 1rem;
    position: relative;
    transform-origin: top left;
    animation: messagePopIn 0.3s ease-out;
    min-width: 120px;
}

.assistant-message-text {
    grid-column-start: 2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.2px;
    color: #374151;
}

.assistant-message-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    width: 2.5rem;
    height: 2.5rem;
    color: white;
    background: linear-gradient(303deg, rgb(73, 37, 193) 1.64%, rgb(121, 83, 233) 102.71%);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
    flex-shrink: 0;
}

/* Input Box - Fixed */
.input-box {
    background: white;
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 24px;
    padding: 0.75rem 1.25rem;
    margin: 1rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.input-box:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.12);
    transform: translateY(-2px);
}

.tools {
    display: flex;
    margin-top: 0.75rem;
    align-items: center;
    justify-content: space-between;
    /* width: 100%; */
}

/* Enhanced Send Button */
.send-button {
    background: linear-gradient(271deg, rgb(73, 37, 193) 1.64%, rgb(121, 83, 233) 102.71%);
    color: white;
    border: none;
    height: 36px;
    width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* cursor: pointer; */
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
    margin-left: auto;
    flex-shrink: 0;
}

.send-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.send-button:active {
    transform: translateY(0) scale(0.98);
}

/* Citations Enhancement */
.citation {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(79, 70, 229, 0.15);
    gap: 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
}

.citation img {
    padding-top: 0.1rem;
}

.citation[href]:hover {
    /* border-color: #4f46e5; */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15); */
}

.citation-icon {
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.citation-content {
    display: flex;
    flex-direction: column;
}

.citation-file {
    font-weight: 600;
    font-size: 0.875rem;
    color: #424242;
}

.citation-file span {
    color: #424242;
    font-weight: 400;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.citation-location {
    color: #424242;
    font-weight: 400;
    font-size: 0.75rem;
    font-style: italic;
}

.citation-quote {
    font-size: 0.85rem;
    color: #696969;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Markdown Content Enhancements */
.markdown-content {
    line-height: 1.7;
    color: #374151;
    font-size: 0.95rem;
}

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content a {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px dotted rgba(79, 70, 229, 0.4);
    transition: all 0.2s ease;
}

.markdown-content a:hover {
    border-bottom: 1px solid rgba(79, 70, 229, 0.8);
}

.markdown-content strong {
    font-weight: 600;
    color: #111827;
}

.markdown-content code {
    background: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: "JetBrains Mono", "SF Mono", Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #4f46e5;
}

.markdown-content pre {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.25rem 0;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    color: #374151;
}

/* Welcome Message - Enhanced */
.welcome-message {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    text-align: center;
    border-radius: 24px;
    animation: slideUp 0.6s ease-out;
    margin: auto 0;
}

.welcome-message img {
    width: 3.5rem;
    height: 3.5rem;
}

.welcome-message h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 36px; /* 120% */
    margin-bottom: 0;
    background: linear-gradient(90deg, #000 0%, #6a44dd 45.9%, #4b27c3 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-message p {
    color: #696969;
    font-size: 1rem;
    line-height: 1.6;
}

.example-documents {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Loading Message Effect */
.assistant-message.is-loading .assistant-message-text::after {
    content: "...";
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%,
    20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%,
    100% {
        content: "...";
    }
}

/* Message Time Stamp */
.message-timestamp {
    font-size: 0.75rem;
    color: rgba(107, 114, 128, 0.6);
    margin-top: 0.5rem;
    text-align: right;
}

.user-message .message-timestamp {
    color: rgba(255, 255, 255, 0.7);
}

/* Chat Suggestions */
.suggestions {
    text-align: right;
    white-space: nowrap;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    display: flex;
    margin-bottom: 0.75rem;
}

/* Animations */
@keyframes messagePopIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(14deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .chat-container {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .chat-header {
        /* flex-direction: column; */
    }

    .chat-message-list {
        padding: 1rem 0.5rem;
    }

    .user-message,
    .assistant-message {
        max-width: calc(100% - 2rem);
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .input-box {
        margin: 1rem 0.5rem;
        padding: 0.75rem 1rem;
    }

    .welcome-message {
        margin: 5vh 1rem;
        padding: 2rem 1rem;
        margin: auto 0;
    }
    .new-chat-button{
        transform:scale(0.8);
    }
    .new-chat-button  span {
        display:none;
    }
   .chat-input-form textarea {
        height:75px;
    }
    .markdown-content {
 
    font-size: 0.85rem;
}
}

.chat-input-fixed-container {
    padding: 1rem;
    padding-top: 0;
}

.chat-input-container {
    width: 100%;
    max-width: 736px;
    margin: 0 auto;
}

.chat-input-form {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: visible;
}

.chat-input-form textarea {
    padding: 1rem;
    background: #fff;
    box-shadow: 0px 2px 54px 1px rgba(108, 78, 208, 0.2);
    color: #1f2937;
    font-size: 0.875rem;
    outline: none;
    border: none;
    border-radius: 10px;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 3.8rem;
    overflow: auto; /* Ensures scrolling still works */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* For Webkit browsers (Chrome, Safari) */
textarea::-webkit-scrollbar {
    display: none;
}

.chat-input-form button {
    position: absolute;
    width: 2.6rem;
    height: 2.6rem;
    bottom: 0.4rem;
    right: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 200px;
    background: var(--Gradient, linear-gradient(90deg, #6e48e0 0%, #4b27c3 90%));
    /* box-shadow: 0px 4px 12px 0px rgba(255, 255, 255, 0.4) inset,
        0px 4px 20px -6px rgba(118, 88, 214, 0.4); */
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-form button:hover {
    /* transform: scale(1.02); */
    /* box-shadow: 0px 6px 14px 0px rgba(255, 255, 255, 0.5) inset,
        0px 6px 24px -6px rgba(118, 88, 214, 0.5); */
    /* opacity: 0.9; */
    background: var(--Gradient, linear-gradient(90deg, #6e48e0 0%, #3616a0 100%));
}

.input-hidden {
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

 
.assistant-message h1 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.assistant-message h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.9rem;
    margin-bottom: 0.5rem;
}

.assistant-message h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
}

.assistant-message h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.7rem;
    margin-bottom: 0.4rem;
}

.assistant-message h5 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.6rem;
    margin-bottom: 0.3rem;
}

.assistant-message h6 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.3rem;
}
 