html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Chat Bots Side Bar */
.sidebar {
    border-right: 1px solid #dee2e6;
    min-height: calc(100vh - 60px);
}

/* Chat Bots */

.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-input-container {
    margin-top: auto;
    padding: 1rem 0;
}

.chat-box {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    background-color: #f9f9f9;
}

.chat-input {
    width: 100%;
    margin-top: 10px;
}

/* Chat Session Cards */
.chat-session-card {
    transition: all 0.2s ease-in-out;
    border: 1px solid #dee2e6;
    width: 100%;
    position: relative;
    overflow: visible !important;
}

    .chat-session-card .card-body {
        padding: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

        .chat-session-card .card-body > a {
            min-width: 0;
        }

    .chat-session-card .card-title {
        color: #1a1a1a;
        font-size: 0.95rem;
        margin: 0;
        max-width: 100%;
    }

    .chat-session-card:hover {
        background-color: #f8f9fa;
    }

    .chat-session-card.selected {
        background-color: #e7f1ff;
        border-color: #258cfb;
        position: relative;
    }

        .chat-session-card.selected::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background-color: #258cfb;
            border-radius: 4px 0 0 4px;
        }

        .chat-session-card.selected:hover {
            background-color: #dcebff;
        }

    .chat-session-card .card-title {
        color: #1a1a1a;
        font-size: 0.95rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Archived chat sessions styling */
    .chat-session-card.archived:not(.selected) {
        background-color: #f0f0f0;
        border-color: #e0e0e0;
    }

        .chat-session-card.archived:not(.selected):hover {
            background-color: #e8e8e8;
        }

    .chat-session-card.archived.selected {
        background-color: #dbe7f7;
        border-color: #90b8f8;
    }

        .chat-session-card.archived.selected:hover {
            background-color: #d0e0f4;
        }


    /* Three dots menu styling */
    .chat-session-card .three-dots-menu {
        background: transparent;
        border: none;
        padding: 0.25rem;
        color: #6c757d;
        cursor: pointer;
        transition: color 0.15s ease-in-out;
        display: flex;
        align-items: center;
        justify-items: center;
    }

        .chat-session-card .three-dots-menu:hover {
            color: #343a40;
            box-shadow: none;
        }

        .chat-session-card .three-dots-menu:focus {
            outline: none;
            box-shadow: none;
        }

        /* Hide dropdown arrow */
        .chat-session-card .three-dots-menu.dropdown-toggle::after {
            display: none;
        }

    .chat-session-card .dropdown {
        flex-shrink: 0;
    }

    .chat-session-card .dropdown-menu {
        position: absolute;
        min-width: 200px;
        max-width: 100%;
        z-index: 9999;
    }

/* Chat Bot Messages */
.message-user {
    background-color: #d1e7dd;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    align-self: flex-end;
    max-width: 70%;
}

.message-assistant {
    background-color: #f1f5f9; /* Light neutral background */
    color: #333; /* Darker text for readability */
    padding: 15px; /* Increased padding for better spacing */
    border-radius: 12px; /* Smoother rounded corners */
    margin-bottom: 12px; /* Slightly larger margin for spacing */
    align-self: flex-start;
    max-width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Clean font */
    font-size: 0.95rem; /* Slightly larger font size */
    line-height: 1.5; /* Better line spacing */
}

.message-system {
    background-color: #e2e8f0; /* Neutral gray background */
    color: #475569; /* Muted text color */
    padding: 12px 16px;
    border-radius: 8px;
    margin: 8px 0;
    text-align: center;
    max-width: 85%;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    font-style: italic;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.justify-content-center .message-system {
    margin: 8px auto;
}

.message-row {
    display: flex;
    flex-direction: row;
}

code {
    background-color: #f1f1f1;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: Consolas, monospace;
}

pre {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
}

.copy-code-btn:hover {
    background-color: #e2e6ea;
}
