.ai-chat-panel {
    position: fixed;
    top: 0;
    right: -600px;
    /* Initial position: off-screen to the right. Adjust width accordingly. */
    width: 600px;
    /* Width of the panel. */
    height: 100vh;
    /* Full viewport height. */
    background-color: #ffffff;
    /* Standard white background */
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
    /* Softer shadow for a modern look */
    transition: right 0.35s ease-in-out;
    /* Smooth transition for the 'right' property */
    z-index: 9998;
    /* Ensure it's above most content but below modals (Bootstrap modal z-index is 1050) */
    padding: 0;
    /* Padding will be handled by inner elements */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.list-group {
    list-style-type: none;
    padding-left: 0;
}

.ai-chat-panel.open {
    right: 0;
    /* Slides into view from the right. */
}

.ai-chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid #e9ecef;
    /* Light border */
    background-color: #fafafa;
}

.ai-chat-panel-body {
    padding: 20px;
    overflow-y: auto;
    /* For scrollable content. */
    flex-grow: 1;
    /* Allows body to take remaining space */
    background-color: #fafafa;
}

.ai-chat-tab {
    cursor: pointer;
    border: none;
    background: none;
}

.ai-chat-tab > i {
    color: #913f98;
    margin: 10px 20px;
}

.ai-chat-tab-title {
    width: 100%;
}

.ai-chat-tab-content {
    display: none;
}

.ai-chat-tab-content.active {
    display: block;
}

.ai-chat-panel-footer {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

/* Session */
.session-title {
    margin-left: 0px !important;
}

/* AI Conversation */

p.message-paragraph {
    border-radius: 8px;
    box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.1);
}

.ai-sent-message {
    padding-left: 80px;
    align-self: flex-end;
}

.ai-received-message {
    padding-right: 0px;
}

.ai-sent-message p.message-paragraph{
    background-color: #913f98;
    color: #fff;
}

.ai-received-message p.message-paragraph{
    background-color:#fff;
}

.ai-received-message .message-paragraph a {
    text-decoration: underline;
}

#ai-chat-drawer .messages {
    display: flex;
    flex-direction: column;
}

#ai-chat-drawer .ai-sent-message p.message-paragraph {
    padding: 10px;
    position:relative;
    margin: 10px 0px 10px 0px;
    box-shadow: 0 5px 10px rgba(154,160,185,.05), 0 15px 40px rgba(166,173,201,.2);
}

#ai-chat-drawer .ai-received-message p.message-paragraph {
    padding: 10px;
    position:relative;
    margin: 10px 80px 10px 0px;
    box-shadow: 0 5px 10px rgba(154,160,185,.05), 0 15px 40px rgba(166,173,201,.2);
}

#ai-chat-drawer .ai-received-message p.message-paragraph > p {
    margin-bottom: 0px;
}

#ai-chat-drawer .list-group-item {
    border: none !important;
    background: none !important;
    padding: 10px 5px;
    margin: 10px 0px;
    border-radius: 8px;
}

#ai-chat-drawer .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.prompt-suggestions {
    margin-top: 10px;
}

.ai-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-message-references {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.ai-message-reference-value {
    margin-left: 5px;
    margin-right: -5px;
}

/*AI Expert Responses headings could be in h1, h2, h3. We are forcing the h1 and h2 headings to always show up as the h3 size here*/
#ai-chat-drawer h1, #ai-chat-drawer h2 {
    font-size: 24px;
}

.message-input-warning {
    margin-top: 10px;
    padding: 0;
    text-align: center;
    font-size: 12px;
}

.action-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.left-actions {
    display: flex;
    align-items: center;
}

.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: 0 0 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;
}

/* Feedback Modal Styles */
.feature-feedback-modal {
    z-index: 9999 !important;
}
/* END Feedback Modal Styles */