a {
    text-decoration: none;
}

#left-menu {
    padding: 0.5em 0 0.5em 0;
}

#left-menu a {
    padding: 0;
}

#left-menu span {
    margin: 0 !important;
}

thead {
    position: sticky;
    top: 0;
}

.table-xs th, .table-xs td {
    padding: 1px 2px;
    font-size: 0.75em;
}

.pagination-xs a {
    padding: 2px 4px;
    font-size: 0.75em;
}

.btn-xs {
    padding: 2px 4px;
    font-size: 0.75em;
}

.text-vertical {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    vertical-align: middle;
    padding-bottom: 0.3em !important;
}

.clickable {
    cursor: pointer !important;
}

.copy-to-clipboard i.bi-clipboard-check {
    visibility: hidden;
}

.copy-to-clipboard:hover i.bi-clipboard-check {
    visibility: visible;
}

.copy-to-clipboard:hover i.bi-clipboard-check:hover {
    color: red;
}

.spinner-placeholder {
    overflow: hidden;
    position: relative;
    display: flex;
}

.spinner-overlay {
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    position: absolute !important;
    display: flex;
}

/* Absolute Center Spinner */
.loading-full, .modal-loading {
    position: fixed;
    z-index: 999;
    height: 2em;
    /*width: 2em;*/
    overflow: visible;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Transparent Overlay */
.loading-full:before {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(rgba(20, 20, 20, 0.8), rgba(0, 0, 0, 0.8));
    background: -webkit-radial-gradient(
            rgba(20, 20, 20, 0.8),
            rgba(0, 0, 0, 0.8)
    );
}

/* Container for flash messages */
.flash-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999; /* Ensure it appears on top of other elements */
    max-width: 300px;
}

/* Individual flash message */
.flash-container .alert {
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease, fadeOut 0.5s ease 4.5s forwards;
}

#gosavyModal .modal-content {
    min-height: 500px !important;
}

/* Success alert styling */
.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Error alert styling */
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Fade-in and fade-out animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Lender internal status table row colors */
.table-status-new,
.table-status-new > th,
.table-status-new > td {
    --bs-table-bg: #bbf2f6;
    background-color: #bbf2f6 !important;
}

.table-hover > tbody > tr.table-status-new:hover > *,
.table-status-new:hover > th,
.table-status-new:hover > td {
    --bs-table-bg: #aeeaf0;
    background-color: #aeeaf0 !important;
}

.table-status-waiting-identity,
.table-status-waiting-identity > th,
.table-status-waiting-identity > td {
    --bs-table-bg: #f4a6a6;
    background-color: #f4a6a6 !important;
}

.table-hover > tbody > tr.table-status-waiting-identity:hover > *,
.table-status-waiting-identity:hover > th,
.table-status-waiting-identity:hover > td {
    --bs-table-bg: #eb9a9a;
    background-color: #eb9a9a !important;
}

.table-status-identity-confirmed,
.table-status-identity-confirmed > th,
.table-status-identity-confirmed > td {
    --bs-table-bg: #eef586;
    background-color: #eef586 !important;
}

.table-hover > tbody > tr.table-status-identity-confirmed:hover > *,
.table-status-identity-confirmed:hover > th,
.table-status-identity-confirmed:hover > td {
    --bs-table-bg: #e3eb78;
    background-color: #e3eb78 !important;
}

.table-status-aml-checked,
.table-status-aml-checked > th,
.table-status-aml-checked > td {
    --bs-table-bg: #fed7aa;
    background-color: #fed7aa !important;
}

.table-hover > tbody > tr.table-status-aml-checked:hover > *,
.table-status-aml-checked:hover > th,
.table-status-aml-checked:hover > td {
    --bs-table-bg: #f5cfa0;
    background-color: #f5cfa0 !important;
}

.table-status-permission-granted,
.table-status-permission-granted > th,
.table-status-permission-granted > td {
    --bs-table-bg: #8cd4a4;
    background-color: #8cd4a4 !important;
}

.table-hover > tbody > tr.table-status-permission-granted:hover > *,
.table-status-permission-granted:hover > th,
.table-status-permission-granted:hover > td {
    --bs-table-bg: #7fc997;
    background-color: #7fc997 !important;
}

.table-status-aml-investigation,
.table-status-aml-investigation > th,
.table-status-aml-investigation > td {
    --bs-table-bg: #c6cdec;
    background-color: #c6cdec !important;
}

.table-hover > tbody > tr.table-status-aml-investigation:hover > *,
.table-status-aml-investigation:hover > th,
.table-status-aml-investigation:hover > td {
    --bs-table-bg: #bcc3e3;
    background-color: #bcc3e3 !important;
}

/* Agent Chat FAB & Widget (Bottom-Left) */
.agent-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1055;
}

.agent-chat-fab {
    width: 52px;
    height: 52px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.agent-chat-fab:hover {
    transform: translateY(-2px);
}

.agent-chat-panel {
    position: fixed;
    bottom: 84px;
    left: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0.5rem;
    animation: fadeIn 0.2s ease;
}

.agent-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.875rem;
}

.agent-chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.agent-chat-msg-user {
    align-self: flex-end;
    align-items: flex-end;
}

.agent-chat-msg-agent {
    align-self: flex-start;
    align-items: flex-start;
}

.agent-chat-bubble {
    padding: 0.5rem 0.75rem;
    border-radius: 0.65rem;
    line-height: 1.4;
}

.agent-chat-msg-user .agent-chat-bubble {
    background-color: var(--bs-primary);
    color: #fff;
    border-bottom-right-radius: 0.2rem;
}

.agent-chat-msg-agent .agent-chat-bubble {
    background-color: #fff;
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-bottom-left-radius: 0.2rem;
}

.agent-chat-bubble pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin: 0.35rem 0 0 0;
    font-size: 0.8em;
    overflow-x: auto;
}

.agent-chat-bubble code {
    font-size: 0.85em;
}

.agent-chat-input {
    resize: none;
    max-height: 100px;
    overflow-y: auto;
}

