﻿/* Topoi Chat Overrides */

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    overflow-y: auto;
    box-sizing: border-box;
    font-family: sans-serif;
}

/* Chat Container */
#chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 80vh;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

/* Chat Window */
/* 1) make the chat‐window a flex column so align-self will work */
#chat-window {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 2) common bubble styling */
.chat-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    line-height: 1.4;
    /* remove whatever default border‐radius Bootstrap might be giving you */
    border: 1px solid #ccc;
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

    /* 3) Topoi (assistant) bubbles on the left, with a “cut” on the top‐left corner */
    .chat-bubble.assistant {
        align-self: flex-start;
        background-color: #f7f3e0;
        color: #333;
        /* shorthand order: top‐left | top‐right | bottom‐right | bottom‐left */
        border-radius: 0.25rem 1.5rem 1.5rem 1.5rem !important;
    }

    /* 4) You (user) bubbles on the right, with a “cut” on the top‐right corner */
    .chat-bubble.user {
        align-self: flex-end;
        background-color: #fdf8f1;
        color: #0a3d20;
        /* top‐left | top‐right | bottom‐right | bottom‐left */
        border-radius: 1.5rem 0.25rem 1.5rem 1.5rem !important;
    }

    /* 5) tame your paragraph margins so the bubble padding stays consistent */
    .chat-bubble p {
        margin: 0.5rem 0 0;
    }



/* Controls Bar */
#controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

    #controls button,
    #controls select {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
        border: 1px solid #888;
        border-radius: 4px;
        background-color: #f8f8f8;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

        #controls button:hover,
        #controls select:hover {
            background-color: #eaeaea;
        }

    #controls form {
        display: inline;
        margin: 0;
    }

/* Chat Form */
#chatForm {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #ccc;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

    #chatForm > * {
        flex: 1 1 auto;
        min-width: 150px;
    }

/* User Input */
#userInput {
    flex: 1;
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

/* Input Controls */
.chat-input-area,
.input-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.input-controls {
    flex-direction: row;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* Send Button */
.send-button {
    /*background-color: #9FB8AD;*/
    /*color: #fff;*/
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

/* Generic Button Overrides */
button {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    button:hover {
        background-color: #e0e0e0;
    }


    .chat-bubble.topoi {
        background-color: #d8f3dc;
        border: 1px solid #ccc;
    }



    .chat-bubble.user-input {
        background-color: #E8E1D4;
        border: 2px dashed #9FB8AD;
        border-radius: 16px 16px 0 16px;
        min-height: 3rem;
        max-height: 12rem;
        padding: 1rem;
        overflow-y: auto;
        white-space: pre-wrap;
        outline: none;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

        .chat-bubble.user-input:empty:before {
            content: attr(data-placeholder);
            color: #888;
        }

/* Thinking Indicator */
.thinking {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
}

/* Hidden Utility */
.hidden {
    display: none;
}
/* Idle state: no pulse */
button#micButton {
    animation: none !important;
}
/* site.css */
button#micButton.listening {
    background-color: var(--bs-primary) !important; /* solid primary bg */
    color: #fff !important; /* white icon/text */
    margin-right: 0.5rem;
    animation: pulse 1.2s ease-in-out infinite !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13,110,253, 0.6);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0.75rem 0 rgba(13,110,253, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13,110,253, 0);
    }
    /*Nav Bar styling*/
    /* Make the navbar a custom Topoi color instead of 'bg-light' */
    .navbar-topoi {
        background-color: #f4e8d0;
        border-bottom: none; /* remove the default light border if you want a seamless look */
    }
    /* Make the logo a consistent height (e.g. 40px) */
    .topoi-logo {
        height: 40px;
        width: auto; /* preserve aspect ratio */
    }
    /* Reduce the site‐title font size in the navbar */
    .navbar-brand .site-title {
        font-size: 1.25rem; /* e.g. 20px instead of default */
        line-height: 1.1; /* tighten up the line spacing */
        margin-bottom: 0; /* already using mb-0, but just in case */
    }
    /* Reduce the subtitle font a bit, and maybe give it some opacity: */
    .navbar-brand .site-subtitle {
        font-size: 0.8rem; /* smaller than body text */
        color: rgba(0, 0, 0, 0.6);
        margin-bottom: 0;
    }
    /* Add extra horizontal spacing between each nav-link */
    .navbar-nav .nav-link {
        margin-right: 1rem; /* 16px between links */
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    /* If the final link shouldn’t have extra right margin, you can override: */
    .navbar-nav .nav-link:last-child {
        margin-right: 0;
    }
    /* You can also adjust hover color or active color if needed */
    .navbar-nav .nav-link:hover {
        color: #000; /* a darker hover state, for example */
    }
    /* On mobile (collapsed), push the Login/Logout links toward the right edge */
    .navbar-nav .nav-item + .nav-item {
        margin-left: 0; /* override Bootstrap’s default if needed */
    }
    /* Make the Logout button look less like a button, more like a plain link */
    .navbar-nav .btn-link {
        font-size: 0.95rem; /* a bit smaller text */
        color: inherit; /* same color as other links */
        text-decoration: none;
    }


}
.fast-track-form {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .fast-track-form input {
        padding: 0.5rem;
        font-size: 1rem;
    }

    .fast-track-form button {
        align-self: flex-start;
        padding: 0.5rem 1rem;
        font-weight: bold;
        cursor: pointer;
    }


