@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css");

:root {
    --preset-top: 96px;
    --preset-left: 96px;
    --main-color: #2563eb;
    --main-gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --main-gradient-reverse: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    --main-color-dark: #1e40af;
    --main-color-light: #93c5fd;
}

#novi-chat-bot-icon {
    position: fixed;
    border-radius: 50%;
    height: 64px;
    width: 64px;
    background: var(--main-gradient);
    color: white;
    top: calc(100vh - var(--preset-top));
    left: calc(100vw - var(--preset-left));
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 24px 0 rgba(37,99,235,0.25);
    z-index: 2147483647;
    transition: box-shadow 0.2s, background 0.2s;
}

#novi-chat-bot-icon:hover {
    background: var(--main-gradient-reverse);
    box-shadow: 0 8px 32px 0 rgba(37,99,235,0.35);
}

#novi-chat-bot-icon svg {
    padding: 16px;
}

#novi-chat-bot-welcome-prompt {
    position: fixed;
    bottom: calc(var(--preset-top) - 18px);
    right: calc(var(--preset-left) - 32px);
    background: white;
    padding: 8px;
    width: 250px;
    font-size: 22px;
    font-family: 'Segoe UI', sans-serif;
    border-radius: 12px;
    box-shadow: 0 2px 16px 0 rgba(37,99,235,0.10);
    border: 1px solid var(--main-color-light);
}

#novi-chat-bot-welcome-prompt::after {
    position: fixed;
    bottom: 98px;
    right: 64px;
    content: "";
    border-top: 16px solid white;
    border-left: 16px solid transparent;
}

#novi-chat-bot-welcome-prompt-dismiss-button {
    position: relative;
    height: 24px;
    width: 24px;
    top: -20px;
    right: -240px;
    background: white;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--main-color);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

#novi-chat-bot-welcome-prompt-dismiss-button:hover {
    color: white;
    background: var(--main-color);
    border: 2px solid var(--main-color-dark);
}

#novi-chat-bot-dialog {
    display: none;
    background: white;
    height: 65%;
    width: 25%;
    position: fixed;
    bottom: calc(var(--preset-top) - 64px);
    right: calc(var(--preset-left) - 64px);
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(37,99,235,0.18);
    overflow: hidden;
    border: 1px solid var(--main-color-light);
    transition: width 0.2s, height 0.2s;
}

@media (max-width: 800px) {
    #novi-chat-bot-dialog {
        width: 100vw;
        height: 100vh;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        border-radius: 0;
        min-width: unset;
        min-height: unset;
    }
}

#novi-chat-bot-dialog-header {
    background: var(--main-gradient);
    color: white;
    padding: 16px 10px 12px 20px;
    font-size: 22px;
    font-family: 'Segoe UI', math;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.10);
    letter-spacing: 0.5px;
}

#novi-chat-bot-dialog-header > div {
    display: inline-block;
    font-family: 'Segoe UI', sans-serif;
}

.novi-chat-bot-dialog-header-button {
    float: right;
    cursor: pointer;
    text-align: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    transition: background 0.2s, outline 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.novi-chat-bot-dialog-header-button > svg {
    height: 16px;
    width: 16px;
}

.novi-chat-bot-dialog-header-button:hover {
    outline: solid 2px white;
    background: rgba(255,255,255,0.12);
}

#novi-chat-bot-dialog-disclaimer {
    font-family: 'Segoe UI', sans-serif;
    padding: 0px;
    overflow: hidden;
    overflow-y: scroll;
    height: 0px;
}

#novi-chat-bot-dismiss-disclaimer-button {
    margin: 12px 2px 2px 2px;
    background: white;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    float: right;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

#novi-chat-bot-dismiss-disclaimer-button:hover {
    background: var(--main-gradient);
    border: 2px solid white;
    color: white;
}

#novi-chat-bot-dialog-body {
    flex: 1;
    background: linear-gradient(135deg, #e0e7ef 0%, #f1f5f9 100%);
    overflow-y: auto;
}

#novi-chat-bot-dialog-body::-webkit-scrollbar {
    width: .75em;
}

#novi-chat-bot-dialog-body::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.08);
}

#novi-chat-bot-dialog-body::-webkit-scrollbar-thumb {
    background: var(--main-color-light);
    outline: 1px solid var(--main-color);
    border-radius: 8px;
}

#novi-chat-bot-dialog-waiting {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 10px;
    background: transparent;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots div {
    width: 8px;
    height: 8px;
    background: var(--main-gradient);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots .dot1 {
    animation-delay: -0.32s;
}
.loading-dots .dot2 {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

#novi-chat-bot-dialog-waiting1 {
    background: transparent;
    text-align: center;
    display: none;
}

#novi-chat-bot-dialog-waiting1 > img {
    height: 32px;
    width: 32px;
    margin: 2px 4px;
}

#novi-chat-bot-dialog-footer {
    height: 72px;
    display: flex;
    background: linear-gradient(90deg, #e0e7ef 0%, #f1f5f9 100%);
    border-radius: 0px 0px 16px 16px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 8px 0 rgba(37,99,235,0.06);
}

#novi-chat-bot-dialog-footer > div {
    display: inline-flex;
    height: 40px;
    width: 40px;
    padding: 4px;
    cursor: pointer;
    margin: auto 12px auto 0;
    color: var(--main-color);
    background: white;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

#novi-chat-bot-dialog-footer > div:hover {
    background: var(--main-gradient);
    color: white;
    border: 2px solid white;
}

#novi-chat-bot-dialog-footer svg {
    padding: 8px;
}

#novi-chat-bot-text-input {
    box-sizing: border-box;
    flex: 1;
    border: 2px solid var(--main-color-light);
    margin: 12px;
    height: 48px;
    background: white;
    border-radius: 48px;
    outline: none;
    padding-left: 16px;
    font-size: 16px;
    font-family: 'Segoe UI', sans-serif;
    transition: border 0.2s;
}

#novi-chat-bot-text-input:focus, #novi-chat-bot-text-input:hover {
    border: 2px solid var(--main-color);
}

.novi-chat-bot-message-bot {
    margin: 8px;
    visibility: hidden;
}

.novi-chat-bot-message-bot > div:first-child {
    display: flex;
    padding: 12px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e0e7ef 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.06);
}

.novi-chat-bot-message-bot-pic {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    margin: auto 8px 8px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--main-gradient);
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.10);
}

.novi-chat-bot-message-bot-pic svg {
    height: 24px;
    width: 24px;
    color: white;
}

.novi-chat-bot-message-bot-text {
    flex: 1;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #22223b;
}

.novi-chat-bot-message-bot-button {
    margin: 2px;
    background: white;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    outline: none;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.novi-chat-bot-message-bot-button:hover {
    background: var(--main-gradient);
    border: 2px solid white;
    color: white;
}

.novi-chat-bot-message-bot-button-wrapper {
    margin: 8px;
}

.novi-chat-bot-message-user {
    display: flex;
    flex-direction: row-reverse;
}

.novi-chat-bot-message-user-text {
    padding: 14px 20px;
    margin: 8px 16px 8px 8px;
    color: white;
    border-radius: 12px;
    background: var(--main-gradient);
    position: relative;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.10);
}

.novi-chat-bot-message-user-text:after {
    content: "";
    border-left: solid 16px #60a5fa;
    position: absolute;
    border-top: solid 16px transparent;
    left: calc(100% - 6px);
    top: calc(100% - 16px);
}

@media (max-width: 800px) {
    #novi-chat-bot-dialog {
        width: 100vw !important;
        height: 100vh !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        min-width: unset !important;
        min-height: unset !important;
    }
}
