body {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    @media (max-width: 768px) {
        font-size: 0.8rem;
    }
}

.topbar {
    height: 3.5rem;
    padding: 0.5rem 0rem;
    img {
        height: 100%;
    }
    @media (max-width: 768px) {
        height: 3rem;
    }
}

.dropdown-menu {
    min-width: 8rem;
}

.dropdown-item {
    font-size: 0.9rem;
    padding: 0rem 0.5rem;
}

#newAssistantTopbar {
    position: absolute;
    right: 0rem;
    top: 0.5rem;
}

#usernameDisplayBtn {
    padding: 0.25rem 0.25rem;
    svg {
        width: 1.2rem;
        height: 1.2rem;
        @media (max-width: 768px) {
            width: 1rem;
            width: 1rem;
        }
    }
}


#sidebar {
    ul {
        position: absolute;
        width: 180px;
        left: 0;
        height: 100vh;
        z-index: 10;
        background-color: white;
        border: 1px solid var(--bs-border-color);
        border-radius: 0.5rem;
        @media (max-width: 768px) {
            width: 40vw;
        }
    }
    ul.hide {
        display: none;
    }
}

#sidebarBtn {
    width: 2rem;
    height: 2rem;
    border: none;
    background-color: transparent;
    transform: translateY(0.2rem);
    @media (max-width: 768px) {
        transform: translateY(0rem);
    }
    svg {
        color: var(--bs-primary);
    }
}

.mobile-toggle-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background-color: transparent;
    svg {
        color: var(--bs-primary);
    }
    @media (min-width: 768px) {
        display: none;
    }
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    @media (max-width: 768px) {
        font-size: 0.8rem;
    }
}

.form-control, .form-select {
    font-size: 0.9rem;
    @media (max-width: 768px) {
        font-size: 0.8rem;
    }
}

.form-control::placeholder {
    color: var(--bs-gray-500);
}

.nav-fill .nav-item {
    flex-grow: 0;
}

.nav-pills .nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: black;
    vertical-align: middle;
    text-align: start;
    padding: 0.5rem 0.5rem;
}

.nav-pills .nav-link.active {
    background-color: var(--bs-gray-200);
    color: var(--bs-primary);
    i {
        color: var(--bs-primary)
    }
}

a.nav-link svg.svg-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.svg-icon {
    display: inline-block;
    vertical-align: middle;
    width: inherit;
    height: inherit;
}

.container-fluid {
    @media (max-width: 768px) {
        padding: 0rem 0.25rem;
    }
}

.main-container {
    display: flex;
    flex-direction: row;
    height: 90vh;
    /* border: 1px solid var(--bs-border-color); */
    border-radius: 0.5rem;
    @media (max-width: 768px) {
        flex-direction: column;
    }
}

.main-content {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    min-height: 90vh;
    width: 100%;
    @media (max-width: 768px) {
        padding: 0rem 0.25rem;
    }
}

h1, h2, h3, h4, h5, h6 {
    margin: 0px !important;
}

h5 {
    font-size: 1.25rem;
    @media (max-width: 768px) {
        font-size: 1.1rem;
    }
}

h6 {
    font-size: 1rem;
    @media (max-width: 768px) {
        font-size: 0.9rem;
    }
}

#assistantContainer {
    display: flex;
    flex-direction: row;
    min-height: 90vh;
    position: relative;
    @media (max-width: 768px) {
        flex-direction: column;
    }
}

#assistantList {
    min-width: 150px;
    width: 200px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9;
    background-color: white;
    @media (max-width: 768px) {
        width: 80vw;
        height: 50vh;
        min-height: 50vh;
        position: absolute;
        top: 2.25rem;
        right: 0rem;
        border: 1px solid var(--bs-border-color);
        box-shadow: var(--bs-box-shadow-sm);
        border-radius: 0.5rem;
    }
}

#assistantList.hide {
    @media (max-width: 768px) {
        display: none;
    }
}

#editAssistantContainer {
    width: 100%;
    min-height: 75vh;
    padding: 0rem 0.5rem;
    position: relative;
    @media (max-width: 768px) {
        padding: 0.25rem 0rem;
    }
}

.assistant-tab {
    margin-right: 0.5rem;
    border-radius: 1rem;
    width: 4.5rem;
    height: 4.5rem;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 500;
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--bs-box-shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--bs-gray-600);
    @media (max-width: 768px) {
        margin-right: 0.25rem;
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 0.5rem;
    }
    .svg-icon {
        color: var(--bs-gray-600);
        width: 1.3rem;
        height: 1.3rem;
        @media (max-width: 768px) {
            width: 1.1rem;
            height: 1.1rem;
        }
    }
    span {
        @media (max-width: 768px) {
            font-size: 0.5rem;
        }
    }
}

.assistant-tab.active {
    background-color: var(--bs-primary);
    color: white;
    .svg-icon {
        color: white;
    }
}

#sourcesTabContainer {
    width: 15vw;
    flex-shrink: 0;
    li {
        display: flex;
        flex-grow: 1;
    }
    @media (max-width: 768px) {
        width: 2.5rem;
        justify-content: center;
        align-items: center;
        li {
            justify-content: center;
        }
        span {
            display: none;
        }
    }
}

.assistant-tab-maxheight {
    height: 70vh;
    overflow-y: auto;
}

.assistant-tab-padding {
    padding: 0.5rem 1rem;
}

.list-group {
    border-radius: 0rem;
}

.list-group-item {
    border: none;
    background-color: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.25rem;
    .svg-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.list-group-item.active {
    background-color: var(--bs-gray-200);
    color: var(--bs-primary);
    .svg-icon {
        color: var(--bs-primary);
    }
}

.assistant-list-item {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
    min-height: 3.5rem;
    p {
        font-size: 0.75rem;
        margin-bottom: 0px;
        text-overflow: ellipsis; 
        overflow: hidden; 
        white-space: normal; 
        display: -webkit-box;
        line-clamp: 1;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
}

.assistant-list-item.active {
    color: var(--bs-primary);
    background-color: var(--bs-gray-200);
}

#threadListContainer, #chatlogThreadListContainer {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 200px;
    overflow-y: auto;
    z-index: 8;
    background-color: white;
    @media (max-width: 768px) {
        width: 80vw;
        height: 50vh;
        min-height: 50vh;
        position: absolute;
        top: 2rem;
        right: 0rem;
        border: 1px solid var(--bs-border-color);
        box-shadow: var(--bs-box-shadow-sm);
        border-radius: 0.5rem;
    }
}

#threadListContainer.hide, #chatlogThreadListContainer.hide {
    @media (max-width: 768px) {
        display: none;
    }
}

.thread-btn, .chatlog-thread-btn {
    cursor: pointer;
    .thread-title, small {
        text-overflow: ellipsis; 
        overflow: hidden; 
        white-space: normal; 
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    .thread-title {
        line-clamp: 1;
        -webkit-line-clamp: 1;
    }
    small {
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }
}

.thread-timestamp {
    font-size: 0.6rem;
    line-height: 0.6rem;
    text-align: right;
    color: var(--bs-gray-600);
}

.msg-timestamp {
    font-size: 0.5rem;
    line-height: 0.5rem;
    text-align: right;
    transform: translate(0.75rem, 0.25rem);
    color: var(--bs-gray-600);
}

.msg-img {
    display: block;
    max-width: 20rem;
    max-height: 20rem;
    border-radius: 0.25rem;
}

#imgModalImg {
    width: 100%;
    height: 100%;
    border-radius: 0.25rem;
}

#msgListContainer, #chatlogMsgListContainer {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
}

#msgList, #chatlogMsgList {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#leadChatLogMsgList {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 70vh;
}

#leadsDateContainer {
    display: flex;
    flex-wrap: wrap;
    max-width: 768px;
}

.msg {
    border-radius: 0.5rem;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    position: relative;
    p { margin-bottom: 0px; }
}

.msg-content > p {
    margin-bottom: 0.5rem !important;
}

.thread-info-header {
    text-align: center;
    margin: 0.5rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.thread-footer {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    button {
        font-size: 0.75rem;
    }
}

.assistant-msg {
    background-color: rgba(96,125,189,0.15);
    margin-right: auto;
}

.user-msg, .user_image-msg {
    background-color: rgba(28,188,104,0.15);
    margin-left: auto;
}

.revise-msg-btn {
    position: absolute;
    left: 0.5rem;
    bottom: -0.5rem;
    border: none;
    font-size: 0.6rem;
    background-color: rgba(var(--bs-warning-rgb), 0.5);
    border-radius: 0.5rem;
}

.revise-msg-btn.revised {
    background-color: rgba(var(--bs-success-rgb), 0.5);
}

.revise-msg-btn:hover {
    background-color: rgba(var(--bs-warning-rgb), 0.7);
}

.revise-msg-btn:hover.revised {
    background-color: rgba(var(--bs-success-rgb), 0.7);
}

#mobileThreadSelector, #chatlogMobileThreadSelector {
    display: none;
    @media (max-width: 768px) {
        display: flex;
        position: absolute;
        z-index: 8;
        width: 100%;
    }
    button {
        margin-left: auto;
    }
    svg {
        width: 1.2rem;
        height: 1.2rem;
        transform: translateY(-0.1rem)
    }
}

#chatlogDatePickerContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0.25rem 0rem;
    input {
        margin-bottom: 0.25rem;
    }
}

.code-snippet {
    padding: 0.5rem;
    border-radius: 0.75rem 0.5rem;
    background-color: rgba(var(--bs-warning-rgb), 0.2);
}

.btn-xs {
    font-size: 0.6rem !important;
}

.btn {
    padding: 0.25rem 0.75rem;
    font-size: 1rem;
    @media (max-width: 768px) {
        font-size: 0.8rem;
    }
}

.btn-success {
    color: white;
}

.btn-success:hover {
    color: white;
}

.btn-success:disabled {
    color: white;
}

.alert {
    position: fixed;
    top: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    z-index: 2000;
}

.mid-width-container {
    width: 100%;
    max-width: 720px;
    padding: 0rem 0.5rem;
    @media (max-width: 768px) {
        padding: 0.25rem 0rem;
    }
}

div.progress-float {
    position: absolute;
    top: 0rem;
    height: 0.25rem;
    width: 100%;
    .progress-bar.indeterminate {
        position: relative;
        width: 100%;
        animation: progress-indeterminate 1.5s linear infinite;
    }
}
@keyframes progress-indeterminate {
   from { left: -75%; width: 75%; }
   to { left: 100%; width: 75%; }
}

.analytics-chart-container {
    position: relative;
    display: flex;
    width: 50%;
    @media (max-width: 768px) {
        width: 100%;
    }
}

.analytics-filter-container {
    display: flex;
    flex-grow: 1;
    width: 25vw;
    @media (max-width: 768px) {
        width: 50%;
    }
    margin: 0.25rem 0.25rem;
}

.analytics-filter-container label {
    transform: translateY(0.3rem);
    min-width: 7.5rem;
}

#whatsappDisabledOverlay, #leadsCollectionDisabledOverlay, #whatsappIntegrationDisabledOverlay, #customAPIDisabledOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(233, 236, 239, 0.75);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bs-danger);
}

.form-info {
    font-weight: 500;
    font-size: 1rem;
    margin: 0;
}

.integration-css-settings-container {
    display: flex;
    flex-direction: column;
    div {
        display: flex;
        align-items: center;
        margin-bottom: 0.25rem;
    }
    label {
        margin-right: 0.25rem;
        width: 30rem;
    }
}

#enabled-by {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0.25rem 1rem 0rem 1rem;
    span {
        font-size: 0.9rem;
        color: #6c757d;
        font-weight: 500;
    }
    hr {
        flex-grow: 1;
        margin: 0;
        border: 0;
        border-top: 1px solid #dee2e6;
        opacity: 1;
    }
    div {
        border: 1px solid #dee2e6;
        border-radius: 50%;
        margin: 0 0.15rem 0 0.25rem;
        padding: 0.1rem;
        box-shadow: 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.1);
    }
    div img {
        width: 1.2rem;
        height: 1.2rem;
    }
}
.custom-api-prop {
    display: flex;
    font-size: 1rem;
    div:first-child {
        width: 25%;
        font-weight: bold;
    }
    div:last-child {
        width: 75%;
    }
    margin-bottom: 0.25rem;
}

.custom-api-variable-prop, .custom-api-secret-prop, .custom-api-post-process-param-prop, .custom-api-pre-process-param-prop {
    display: flex;
    div:first-child {
        display: flex;
        align-items: center;
        width: 20%;
    }
    div:last-child {
        width: 80%;
    }
    margin-bottom: 0.25rem;
}

#customAPIModal div.modal-dialog {
    max-width: 768px;
}

.custom-api-param-container {
    display: flex;
}

#customAPIPostProcessCode, #customAPIPreProcessCode {
    font-family: monospace;
}

.unread-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0.5rem 0rem;
    span {
        font-size: 0.8rem;
        color: var(--bs-danger);
        font-weight: 500;
    }
    hr {
        flex-grow: 1;
        margin: 0rem 0.5rem;
        border: 0;
        border-top: 1px solid var(--bs-danger);
        opacity: 1;
    }
}
