#ai-expert .container {
    max-width: 1000px !important;
}

#ai-expert {
    background-color:#f7f7f7;
    padding-left: 20px;
}

#ai-expert.fresh-layout {
    padding: 0;
}

#ai-expert .messages {
    padding: 20px;
    overflow-y: auto;
    min-height: 69vh;
    max-height: 69vh;
}

#ai-expert .initial-message {
    min-height: 25vh;
    max-height: 25vh;

    height: 200px;
    margin: 10px;
    display: flex;
    justify-content: center;
}

#ai-expert .initial-message span {
    align-self: flex-end;
}

#ai-expert .message-input-warning {
    padding: 0;
    text-align: center;
    font-size: 12px;
}

#ai-expert li.active {
    background-color: #DDD;
}

#ai-expert .container {
    max-width: 700px;
}

@media (min-height : 768px) {
    #ai-expert .messages {
        min-height: 80vh;
        max-height: 80vh;
    }
    .ai-user-message p.message-paragraph, .ai-expert-response p.message-paragraph, .ai-expert-response .text-right {
        margin: -16px 90px 30px 50px;
    }
}

#ai-expert .session-title {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: unset !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

/* AI sidebar */
#ai-expert .left-navbar {
    background-color: #fff;
    background-image:none;
    min-height: unset;
    box-shadow: 0 1px 7px 1px rgba(0, 0, 0, 0.075);
}

ai-expert .left-navbar .list-group-item .session-title:hover,
ai-expert .left-navbar .list-group-item .session-title:focus,
ai-expert .left-navbar .list-group-item .fa-trash:hover,
ai-expert .left-navbar .list-group-item .fa-trash:focus {
    color: #000;
}

#ai-expert .left-navbar .list-group-item.active {
    background-color: #eeeded;
}

#ai-expert .left-navbar .list-group-item {
    background-color: white;
    border-bottom: 1px solid #eee;
    margin-bottom:0;
}
#ai-expert .left-navbar .list-group-item.create-btn {
    background-color: #3a3a3a;
}

#ai-expert .list-group-item-heading {
    list-style-type: none;
}


/* AI Conversation */
.ai-user-message p.message-paragraph,
.ai-expert-response p.message-paragraph {
    padding:20px;
    position:relative;
    margin: 20px 0px 30px 0px;
    box-shadow: 0 5px 10px rgba(154,160,185,.05), 0 15px 40px rgba(166,173,201,.2);
}

.ai-user-message p.message-paragraph{
    background-color:white;
}

.ai-user-message p.message-paragraph:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: 0px;
    top: -18px;
    border: 10px solid;
    border-color: transparent transparent #fff #fff;
}
.ai-user-message .username {
    color: #000;
}
.ai-expert-response .username {
    display: block;
    text-align: right;
}

.ai-expert-response p.message-paragraph{
    background-color:#eeeded;
}
.ai-expert-response p.message-paragraph:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    right: 0px;
    top: -18px;
    border: 10px solid;
    border-color: transparent #eeeded #eeeded transparent;
}

#ai-expert input.searchField.form-control,
#ai-expert .send-message-btn {
    height: 50px;
}

#ai-expert .message-input .input-group {
    margin-bottom:10px;
}

#ai-expert .citation-link {
    white-space: nowrap;
}


/* AI WIDER SCREENS */
@media (min-width: 1200px) {
    #ai-expert .left-navbar {
        min-height: 95vh !important;
    }
}

@media (min-width: 769px) {
    .ai-user-message p.message-paragraph:before {
        content: ' ';
        position: absolute;
        width: 0;
        height: 0;
        left: -18px;
        top: 0px;
        border: 10px solid;
        border-color: #fff #fff transparent transparent;
    }

    .ai-expert-response p.message-paragraph:before {
        content: ' ';
        position: absolute;
        width: 0;
        height: 0;
        right: -18px;
        top: 0px;
        border: 10px solid;
        border-color: #eeeded transparent transparent #eeeded;
    }

    .ai-user-message p.message-paragraph,
    .ai-expert-response p.message-paragraph {
        margin: -16px 90px 30px 50px;
    }
}


.prompt-suggestions {
    padding: 0;
    margin-bottom:10px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.prompt-suggestion {
    background-color: white;
    border: 1px solid #ccc;
    max-width: 330px;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap; 
    text-overflow: ellipsis;
    transition: 0.2s ease-out;
}

.prompt-suggestion:hover {
    transform: scale(1.02);
}

.possible-actions {
    margin: 15px 0;
    padding: 10px 0;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Template Catalog Modal Styles */
.template-zoom-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.template-zoom-close {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    padding: 10px;
}

.template-zoom-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    overflow: auto;
}

.template-zoom-image {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
}

.template-catalog-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.template-ai-option {
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    margin-top: 5px;
    height: 100px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #337ab7;
    color: white;
}

.template-ai-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    width: 100%;
}

.template-card {
    border-radius: 4px;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.template-catalog-modal {
    z-index: 9999 !important;
}

.template-thumbnail {
    position: relative;
}

.template-thumbnail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
}

.template-zoom-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(255, 255, 255, 0.8);
}

.template-card-body {
    max-height: 150px;
    min-height: 150px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.template-title {
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-description {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.template-tags .label {
    font-weight: 500;
}