﻿
/* --- Boilerplate Begin --- */

html, body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* --- Boilerplate End --- */


/* --- aichat begin --- */
.ai-chat-wrapper {
    display: flex;
    flex-direction: column;
    /* height: calc(100vh);  <------------------- im win immer 100vg blazor:  height: calc(90vh - 140px); */
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ai-chat-container {
    flex: 1; /* fill main space */
    overflow-y: auto; /* Scrollbar */
    padding: 10px;
    background-color: #e5eef3;
    background-image: url("img/waben.svg");
    background-position: 100% 0;
    background-repeat: no-repeat;
    background-size: 1000px;
}

    /* chat list */
    .ai-chat-container ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

.ai-message-left {
    display: flex;
    justify-content: flex-start;
    margin: 10px 0;
}.
 
 ai-message-system {
    display: flex;
    justify-content: flex-start;
    margin: 10px 0;
}

.ai-message-right {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0;
}

.ai-message-content {
    max-width: 70%;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 8px #868A8D;
}

.ai-message-left .ai-message-content { /* AI */
    background-color: #f1f1f1;
    color: #333;
    border-radius: 8px 8px 8px 0;
}

.ai-message-right .ai-message-content { /* User */
    background-color: #4267b3;
    color: white;
    border-radius: 8px 8px 0 8px;
}
.ai-message-system .ai-message-content { /* System */
    background-color: #FBD69E;
    color: #333;
    border-radius: 8px 8px 0 8px;
}

.ai-message-meta-left {
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.ai-message-meta-right {
    font-size: 12px;
    margin-bottom: 5px;
    color: lightsteelblue;
}

.ai-chat-images {
    display: flex;
    gap: 10px;
}

.ai-chat-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 5px;
}

.ai-chat-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #ccc;
    background-color: #e5eef3;
    background-image: url("img/waben.svg");
    background-position: 100% 0;
    background-repeat: no-repeat;
}

.ai-input-textarea {
    flex: 1;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 70px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ai-image-preview-container {
    display: flex;
    gap: 10px;
    padding-left: 20px;
    border-top: 1px solid #ccc;
    background-color: #e5eef3;
    background-image: url("img/waben.svg");
    background-position: 100% 0;
    background-repeat: no-repeat;
}

.ai-image-preview-wrapper {
    position: relative;
    display: inline-block;
}

.ai-image-delete-button {
    position: absolute;
    top: 0;
    right: 0;
    background-color: darkred;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ai-image-delete-button:hover {
        background-color: red; /* Change to a darker red on hover */
        color: white; /* Ensure the text color remains white */
        transform: scale(1.2); /* Increase the size of the button on hover */
    }

.ai-image-preview {
    width: 128px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.ai-suggestions-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 5px;
    background-color: #e5eef3;
}

.ai-suggestions-action-button {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 2px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.3s;
}

    .ai-suggestions-action-button:hover {
        background-color: #dfe4ea;
        color: cornflowerblue;
        animation: aiwiggle 2s ease-in-out infinite;
    }

@keyframes aiwiggle {
    0%, 7% {
        transform: rotateZ(0);
    }

    15% {
        transform: rotateZ(-2.3deg);
    }

    20% {
        transform: rotateZ(2.3deg);
    }

    25% {
        transform: rotateZ(-2.3deg);
    }

    30% {
        transform: rotateZ(2.1deg);
    }

    35% {
        transform: rotateZ(-2.1deg);
    }

    40%, 100% {
        transform: rotateZ(0);
    }
}

.ai-loader {
    width: 16px;
    height: 16px;
    border: 5px solid #FFF;
    border-bottom-color: #015d82;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: aiLoaderRotation 1s linear infinite;
}

@keyframes aiLoaderRotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ai-action-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2px;
    margin-top: 1px;
}

.ai-action-button {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 2px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Copy button */
.ai-copy-button {
    background-color: #e9ecef;
}

    .ai-copy-button:hover {
        background-color: #dfe4ea;
        color: cornflowerblue;
    }

.ai-searchresults-button {
    background-color: #e9ecef;
}

.ai-searchresults:hover {
    background-color: #dfe4ea;
    color: cornflowerblue;
}



.ai-markdown-content p {
    margin: 0;
    padding: 0;
}

.ai-markdown-content ul, .ai-markdown-content ol {
    margin: 0;
    padding-left: 20px; /* Adjust as needed */
}

.ai-markdown-content li {
    margin: 0; /* Add vertical margin to list items */
    padding: 0;
}

.ai-markdown-content ol > li {
    margin-top: 3px; /* Add more margin between ordered list items */
}

.ai-markdown-content table {
    width: 100%;
    border-collapse: collapse;
}

.ai-markdown-content th, .ai-markdown-content td {
    border: 1px solid black;
    padding: 8px;
    text-align: left;
}

.ai-markdown-content th {
    background-color: #f2f2f2;
}

div.ai-markdown-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.ai-searchresults-table {
    border-collapse: collapse;
    width: 100%;
}

    .ai-searchresults-table th, .ai-searchresults-table td {
        border: 1px solid #ddd; /* Add borders for both horizontal and vertical lines */
        padding: 8px;
    }

    .ai-searchresults-table th {
        background-color: #f2f2f2; /* Optional: Add a background color for the header */
        text-align: left;
    }

.ai-progress-bar-container {
    width: 100px;
    background-color: #e0e0e0; /* Light gray background for the progress bar container */
    border-radius: 4px;
    overflow: hidden;
    height: 20px; /* Adjust height as needed */
    position: relative;
}

.ai-progress-bar {
    height: 100%;
    /* background-color: #4caf50;  Green color for the progress bar */
    text-align: center;
    line-height: 20px; /* Align text vertically */
    color: white;
    font-size: 12px; /* Adjust font size as needed */
    white-space: nowrap;
    overflow: hidden;
    border-radius: 4px;
}

.ai-link-span {
    font: bold;
    color:blue;
    text-decoration:underline;
    cursor:pointer;
}

.ai-subconfig-button.context-only {
    background-color: #1E90FF; /* Dodger Blue for ContextOnly */
    font-weight: bold;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

    .ai-subconfig-button.context-only:hover {
        background-color: #63B8FF; /* Lighter Dodger Blue */
        transform: scale(1.03); /* Slightly scale up */
    }

.ai-subconfig-button.selected {
    background-color: #4169E1; /* Royal blue for All */
    font-weight: bold;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

    .ai-subconfig-button.selected:hover {
        background-color: #5A85F2; /* Brighter Royal Blue */
        transform: scale(1.03); /* Slightly scale up */
    }

.ai-subconfig-button {
    background-color: #87CEFA; /* Light blue for Not Selected */
    transition: transform 0.2s ease, background-color 0.2s ease;
}

    .ai-subconfig-button:hover {
        background-color: #A0DFFF; /* Brighter Light Blue */
        transform: scale(1.03); /* Slightly scale up */
    }


    .ai-subconfig-button:disabled {
        background-color: lightgray; /* Brighter Light Blue */
        transform: scale(1.03); /* Slightly scale up */
    }

    .ai-subconfig-button:disabled:hover {
        background-color: lightgray; /* Brighter Light Blue */
        transform: scale(1.03); /* Slightly scale up */
    }

.ai-automode-button {
    background-color: lightgray;
    font-weight: bold;
}

    .ai-automode-button:hover {
        transform: scale(1.03); /* Slightly scale up */
        background-color: lightgray;
    }

    .ai-automode-button.selected {
        background-color: green; 
        transition: transform 0.2s ease, background-color 0.2s ease;
    }


    .ai-automode-button.selected:hover {
        background-color: green;
        transition: transform 0.2s ease, background-color 0.2s ease;
        transform: scale(1.03); /* Slightly scale up */
    }

/* --- aichat end --- */