#sapphire-container {
    border-left: 3px solid;
    border-image: linear-gradient(74deg, #4285f4 0, #d96570 9%, #9b72cb 20%, #4285f4 24%, #d96570 35%, #9b72cb 44%, #4285f4 50%, #d96570 56%, #fff 75%, #fff 100%) 1;
    position: relative;
    right: 0;
    background: inherit;
    height: 100%;
}
#sapphire-sparkle-btn {
    font-size: 1.2em;
    position: absolute;
    right: 16px;
    background-color: #337ab7;
    border-radius: 8px;
    width: 2em;
    height: 2em;
    padding-left: 8px;
    padding-top: 5px;
    color: #83daff;
}
#sapphire-sparkle-btn:hover {
    background-color: #216199;
    color: #a0e0fc;
}

.dot-flashing {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #9880ff;
    color: #9880ff;
    animation: dot-flashing 1s infinite linear alternate;
    animation-delay: 0.5s;
}

.dot-flashing::before, .dot-flashing::after {
    content: "";
    display: inline-block;
    position: absolute;
    top: 0;
}

.dot-flashing::before {
    left: -15px;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #9880ff;
    color: #9880ff;
    animation: dot-flashing 1s infinite alternate;
    animation-delay: 0s;
}

.dot-flashing::after {
    left: 15px;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #9880ff;
    color: #9880ff;
    animation: dot-flashing 1s infinite alternate;
    animation-delay: 1s;
}

@keyframes dot-flashing {
    0% {
        background-color: #9880ff;
    }
    50%, 100% {
        background-color: rgba(152, 128, 255, 0.2);
    }
}

#sapphire-header {
    border-bottom: 1px solid #dcdee1;
    height: 36px;
    margin-top: 4px;
    margin-left: 0;
    padding-left: 1em;
    overflow: hidden;
}

#sapphire-badge {
    border: 2px solid #abacaf;
    border-radius: 32px;
    cursor: default;
    margin-right: 8px;
    margin-top: 2px;
    padding: 1px 8px;
}

#sapphire-options {
    margin-right: 1em;
    padding: 8px;
    float: right;
}

#sapphire-options:hover {
  background-color: rgba(0,0,0,0.1);
  cursor: pointer;
  border-radius: 4px;
}

#sapphire-options-menu, .sapphire-chatlog-msg-control-options-menu {
    position: absolute;
    right: 1em;
    top: 32px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    z-index: 10;
    width: 200px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
}
.sapphire-chatlog-msg-control-options-menu {
    left: 32px !important;
}
.theme--dark-plus #sapphire-options-menu, .theme--dark-plus .sapphire-chatlog-msg-control-options-menu {
    background-color: #2b2b2b;
    border: 1px solid #444;
    color: #ccc;
}
#sapphire-options-menu ul, .sapphire-chatlog-msg-control-options-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#sapphire-options-menu ul li, .sapphire-chatlog-msg-control-options-menu ul li {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: #262626;
}
.theme--dark-plus #sapphire-options-menu ul li, .theme--dark-plus .sapphire-chatlog-msg-control-options-menu ul li {
    border-color: #444;
    color: #ccc;
}

#sapphire-options-menu ul li:hover, .sapphire-chatlog-msg-control-options-menu ul li:hover {
    background-color: #f5f5f5;
}
.theme--dark-plus #sapphire-options-menu ul li:hover, .theme--dark-plus .sapphire-chatlog-msg-control-options-menu ul li:hover {
    background-color: #3a3a3a;
}

#sapphire-options-menu ul li:first-child, .sapphire-chatlog-msg-control-options-menu ul li:first-child {
    border-radius: 8px 8px 0 0;
}
#sapphire-options-menu ul li:last-child, .sapphire-chatlog-msg-control-options-menu ul li:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

#sapphire-options-menu ul li i, .sapphire-chatlog-msg-control-options-menu ul li i {
    margin-right: 8px;
}

/* #sapphire-chat {
    padding-left: 1em;
} */

#sapphire-prompt {
    font-family: inherit;
    /* background-color: rgba(0,0,0,0.04); */
    background-color: rgba(220, 222, 225, 0.5);
    border: 1px solid #ccc;
    padding: 6px 24px;
    min-height: 1.2em;
    overflow: hidden;
    resize: none;
    width: 100%;
    height: auto;
    border: none;
    border-radius: 32px;
    cursor: text;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#sapphire-prompt:focus {
    background-color: rgba(220, 222, 225, 0.8);
    /* background-color: rgba(0,0,0,0.07); */
    outline: none;
}

#sapphire-container-cover {
    width: 100%;
    position: absolute;
    /* border-left: 3px solid; */
    /* border-image: linear-gradient(74deg, #4285f4 0, #d96570 20%, #9b72cb 40%, #4285f4 60%, #d96570 80%, #9b72cb 100%); */
    /* background-image: linear-gradient(74deg, #4285f4 0, #d96570 20%, #9b72cb 40%, #4285f4 60%, #d96570 80%, #9b72cb 100%); */
    background-color: #363636;
    height: 100%;
    z-index: 1;
}

.theme--dark-plus #sapphire-container-cover {
    background-color: #1f1f1f;
}

.cover-slide-in {
    animation: slidein 0.2s forwards;
}

@keyframes slidein {
    from {
        width: 100%;
    }
    to {
        width: 3px;
    }
}

.cover-slide-out {
    animation: slideout 0.2s forwards;
}

@keyframes slideout {
    from {
        width: 3px;
    }
    to {
        width: 100%;
    }
}

#chatlog {
    overflow: visible;
    height: auto;
    width: 100%;
    padding-right: 0;
    margin-right: 0;
    /* overflow: auto;
    height: 76%;
    width: 100%;
    position: absolute;
    padding-right: 16px;
    margin-right: 0px; */
}
.scroll-shadow {
    max-height: calc(100vh - 164px);
    height: 77%;
    overflow-y: auto;
    /* position: relative; */

    padding-left: 1em;
    /* margin-left: -6px; */

    /* background-color: #fff;
    background-image:
        linear-gradient(#fff 60%, rgba(255,255,255,0)),
        linear-gradient(rgba(255,255,255,0), #fff 40%),
        linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0)),
        linear-gradient(to top,    rgba(0,0,0,0.25), rgba(0,0,0,0));

    background-repeat: no-repeat;
    background-size:
        100% 24px,
        100% 24px,
        100% 12px,
        100% 12px;

    background-position:
        0 0,
        0 100%,
        0 0,
        0 100%;

    background-attachment:
        local,
        local,
        scroll,
        scroll; */
}

#sapphire-controls .fas:hover {
    cursor: pointer;
}

.sapphire-chatlog-msg {
    display:flow-root; 
    margin-top: 8px;
    width: 100%;
}
.sapphire-chatlog-msg:last-child {
    margin-bottom: 64px;
}
.sapphire-chatlog-user {
    background-color: #dcdee1;
    color: #181819;
    border-radius: 8px 0 8px 8px;
    float: right;
    padding: 0.8em 1em;
    max-width: 90%;
}
.sapphire-chatlog-model {
    background-color: #166687;
    color: #fff;
    border-radius: 0px 8px 8px 8px;
    padding: 0.8em 1em;
    max-width: 100%;
}
.sapphire-chatlog-msg.sapphire-error .sapphire-chatlog-model {
    background-color: #f4e6e7;
    border: 2px solid #e7928f;
    border-radius: 8px;
    color: inherit;
    margin-top: 8px;
    text-align: center;
    width: 100%;
}
.sapphire-chatlog-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
    margin-bottom: 4px;
    text-align: center;
}
.sapphire-chatlog-model-highlight {
    /* highlighting for reported messages or thumbed up/down messages */
    background-color: #287349 !important;
    border: 2px solid #c2e83e !important;
}

.sapphire-chatlog-msg-details i {
    padding: 4px;
    border-radius: 4px;
}
.sapphire-chatlog-msg-details i:not(.msg-control-i):hover {
    cursor: pointer;
    background-color: rgba(0,0,0,0.2);
}

.sapphire-chatlog-msg-details i.feedback-selected {
    /* background-color: rgba(0,0,0,0.1) !important; */
    cursor: default !important;
}

#sapphire-prompt-container {
    margin-top: 8px;
    position: fixed;
    bottom: 8px;
    margin-left: 1em;
    margin-right: 1em;
    width: -webkit-fill-available;
    width: -moz-fit-available;
}

#sapphire-intro-suggestions {
    display: flex;
    margin-top: 1em;
    font-size: 1em;
    font-weight: 300;
    justify-content: center;
}
.sapphire-intro-suggestion {
    font-size: .7em;
    font-weight: 100;
    /* width: 30%; */
    background-color: rgba(0,0,0,0.05);
    border-radius: 16px;
    padding: 8px 16px;
    /* margin-right: 8px; */
}
.theme--dark-plus .sapphire-intro-suggestion {
    background-color: rgba(0,0,0,0.3);
}

.sapphire-intro-suggestion:hover {
    background-color: rgba(0,0,0,0.1);
    cursor: pointer;
}
.theme--dark-plus .sapphire-intro-suggestion:hover {
    background-color: rgba(0,0,0,0.4);
}


/* For the standalone chatting page */

#sapphire-container.chat-page-container {
    border-left: none;
}

#sapphire-container.chat-page-container #sapphire-chat {
    padding-left: 0;
}

#sapphire-container.chat-page-container .scroll-shadow {
    margin-left: 12.5%;
    width: 75%;
}

#sapphire-container.chat-page-container #sapphire-prompt-container {
    margin-left: 25%;
    width: 50%;
}


#sapphire-jump-to-bottom {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: none;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

#sapphire-jump-to-bottom:hover {
    background-color: #4285f4;
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#sapphire-jump-to-bottom i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 16px;
    transition: color 0.2s ease;
}

#sapphire-jump-to-bottom:hover i {
    color: white;
}

.theme--dark-plus #sapphire-jump-to-bottom {
    background-color: rgba(40, 40, 40, 0.9);
    border-color: #555;
}

.theme--dark-plus #sapphire-jump-to-bottom i {
    color: #ccc;
}

#sapphire-report-reason {
    margin-top: 1em;
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.sapphire-prompt-notify-feedback {
    position: absolute;
    bottom: 100%;
    left: 25%;
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    transform: translateY(-8px);
}