.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Log Overlay */
.polibot-log-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 10001; /* Above the chat widget */
}

.polibot-log-modal {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 95vw;
    height: 95vh;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.polibot-log-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.polibot-log-close:hover {
    background-color: #f0f0f0;
}

.polibot-log-close svg {
    width: 24px;
    height: 24px;
}

.polibot-log-modal h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.polibot-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    flex-grow: 1;
    display: block;
    overflow: auto;
}

.polibot-log-table th, .polibot-log-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.polibot-log-table .polibot-message-info {
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.polibot-log-table th {
    background-color: #f2f2f2;
}

.polibot-log-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.polibot-log-table pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}
.polibot-log-table code {
    font-family: monospace;
}
.polibot-log-table i {
    color: #6c757d;
}

.polibot-log-table details {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
}
.polibot-log-table summary {
    cursor: pointer;
    font-weight: bold;
}

.polibot-label {
    display: inline-block;
    padding: .25em .4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
    color: #fff;
    background-color: #6c757d; /* Default gray */
}

.polibot-label-agent {
    background-color: #17a2b8; /* Info blue */
}

/* Override header styles within the log table for better readability */
.polibot-log-table h1,
.polibot-log-table h2,
.polibot-log-table h3,
.polibot-log-table h4,
.polibot-log-table h5,
.polibot-log-table h6 {
    font-size: 1em; /* Inherit font size from table cell */
    font-weight: bold; /* Keep it bold */
    margin: 0.5em 0; /* Add some vertical spacing */
    padding: 0;
    border: none;
}
.navbar-custom-bg { background-color: #1B3D5F !important; }
.text-white { color: #fff !important; }

.centered-container {
    position: absolute;
    top: 56px; /* Approx Navbar Height */
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.centered-logo {
    max-width: 60vw;
    max-height: 60vh;
    width: auto;
    height: auto;
}

