pre {
    white-space: pre-wrap;
}

.ui-widget-header {
    border: none;
    border-bottom: 1px solid #dddddd;
    border-radius: 0px;
    background: #fff;
    color: #333333;
    font-weight: bold;
}

.ui-dialog-title {
    margin-left: 2em !important;
}

.ui-dialog-titlebar-close {
    left: 0.3em !important;
}

.ui-state-highlight {
    color: #000 !important;
}

.fa-ddr {
    --fa-secondary-opacity: 1;
    --fa-primary-color: #5948ad;
    --fa-secondary-color: rgb(108, 108, 108);
}

.navbar-dark .logo_for_dark {
    display: inline-block;
}

.navbar-dark .logo_for_light {
    display: none;
}

.navbar-light .logo_for_light {
    display: block;
    float: right;
}

.navbar-light .logo_for_dark {
    display: none;
}

.navbar-nav .nav-link:hover {
    background-color: #5948ad !important;
    color: #ffffff !important;
}

.btn.btn-outline-primary {
    background-color: #fff !important;
    border: 1px solid #5948ad !important;
    color: #5948ad !important;
}

.btn.btn-outline-primary:hover {
    background-color: #5948ad !important;
    color: #fff !important;
}

.btn.btn-outline-secondary {
    border: 1px solid transparent !important;
}

.btn.btn-outline-secondary:hover {
    border: 1px solid #999 !important;
    color: #5948ad !important;
}

.btn.btn-outline-secondary.disabled:hover {
    border: 1px solid #333 !important;
    color: #333 !important;
    cursor: default;
}

.btn.btn-outline-white {
    border: 1px solid transparent !important;
    color: #fff !important;
}

.btn.btn-outline-white:hover {
    color: #999 !important;
}


.btn-fixed {
    min-width: 160px;
    padding: 0.5rem;
    height: 2.65rem;
}

.btn-icon {
    margin-right: 12px;
    font-size: 14px !important;
    font-family: "Arial", "Font Awesome 6 Free" !important;
}

.btn-input {
    height: 2.375rem !important;
    width: 2.8rem;
    border-radius: 0px 3px 3px 0px !important;
}

.btn-big {
    width: 2.75rem;
    height: 2.75rem;
    padding: 1px;
    border: none;
    /*box-shadow: 0px 0px 6px 6px lightGray;*/
}

.btn-transparent {
    opacity: 0.75;
}

.btn-flash {
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.btn-flash:before {
    content: " ";
    display: block;
    width: 200px;
    height: 80px;
    background: rgba(255, 255, 255, .4);
    position: absolute;
    top: -10px;
    left: -200px;
    transform: rotate(-45deg);
    transition: all 0.3s ease-in-out;
}

.btn-flash:hover:before {
    margin-left: 300%;
}

.modal.fade.modal-right .modal-dialog {
    transform: translate(125%, 0px);
    transition-duration: 200ms;
    margin: 0 auto 0 auto;
}

.modal.show.modal-right .modal-dialog {
    transform: none;
}

.dlg-full {
    z-index: 2000;
}

.toasters {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 3000;
}

.toast {
    width: 300px;
    background: lightgray;
}


.tri-state {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    color: #5948ad;
}

.input-checkbox-filter {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    color: #5948ad;
}

.was-validated .form-control:invalid {
    font-weight: normal !important;
}

.template-blocks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.template-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f8f8f8;
    cursor: move;
}

.drag-handle {
    cursor: grab;
    color: #888;
}

.block-index {
    width: 20px;
    text-align: right;
    font-weight: bold;
    color: #444;
}

.btn-row {
    display: block;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    height: 33px;
}

#chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 35px;
    border: none;
    height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: #5948ad;
}

body.chatbot-open #chatbot-toggler {
    transform: rotate(90deg);
}

#chatbot-toggler i {
    color: #fff;
    position: absolute;
}

body.chatbot-open #chatbot-toggler i:first-child,
#chatbot-toggler i:last-child {
    opacity: 0;
}

body.chatbot-open #chatbot-toggler i:last-child {
    opacity: 1;
}

.chatbot-popup {
    position: fixed;
    right: 35px;
    bottom: 90px;
    width: 420px;
    background: #fff;
    overflow: hidden;
    border-radius: 15px;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
    transform: scale(0.2);
    transform-origin: bottom right;
    z-index: 2147483647;
}

body.chatbot-open .chatbot-popup {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.chatbot-header {
    display: flex;
    align-items: center;
    background: #5948ad;
    padding: 10px 20px;
    justify-content: space-between;
}

.chatbot-header .header-info {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
}

.chatbot-header .header-info h4 {
    margin: 0;
}

.chatbot-body {
    flex: 1 1 auto;
    display: flex;
    height: 460px;
}

.chatbot-body iframe {
    flex: 1;
    border: none;
    width: 100%;
    height: 100%;
}

.is-hidden {
  display: none !important;
}

.ai-banner[hidden] { display: none; }
.ai-banner {
    position: fixed; inset-inline: 0; bottom: 1rem; z-index: 2147483647;
    display: grid; place-items: center; padding: 0 1rem;
}
.ai-card {
    width: min(900px, 100%);
    background: #fff;
    border: 1px solid #5948ad;
    border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    padding: 1rem 1rem;
    transition: transform .2s ease, opacity .2s ease;
    opacity: 0; transform: translateY(10px);
}
.ai-banner[data-open="true"] .ai-card { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .ai-card { transition: none; }
}
.ai-content { display: grid; gap: .5rem; }
.ai-title { font-weight: 700; font-size: 1rem; }
.ai-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.ai-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }

.metadata-scheme-dialog,
#itemsTableWrap {
    max-width: 100%;
    overflow: auto;
}

.items table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.items-table th {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    background: #f7f7f7;
    text-align: left;
    overflow-wrap: anywhere;
}

.items-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.items-table code,
.fields-table code {
    white-space: normal;
    overflow-wrap: anywhere;
}

.items-table details {
    max-width: 100%;
    overflow: auto;
}

.fields-table th {
    background: #fafafa;
}