/* ==========================================================================
   Main Streaming Control Stylesheet
   ========================================================================== */

/* ==========================================================================
   FONTS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

/**
 * Root element with responsive font sizing
 * Font size scales between 14px and 16px based on viewport width
 */
html {
    font-size: clamp(0.875rem, 0.85rem + 0.2vw, 1rem);
    scroll-behavior: smooth;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/**
 * Body element with full viewport dimensions
 * Prevents overflow and sets base typography
 */
body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 1.45;
    color: #212529;
    top: 0;
    margin: 0;
    word-break: break-word;
    background-color: #f9fafb;
    height: 100%;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
}

/**
 * Universal box-sizing for consistent element sizing
 */
* {
    box-sizing: border-box;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

/**
 * Link styles with hover effects
 */
a {
    color: #1c355e;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color: #39b5e9;
    text-decoration: none;
    cursor: pointer;
}

/**
 * Text emphasis styles
 */
strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVE FONT SIZING
   ========================================================================== */

/**
 * Responsive font sizing based on viewport width
 * Scales from 0.825rem (13.2px) to 0.875rem (14px)
 */
.responsive-font {
    font-size: 0.825rem;
}

@media (min-width: 1280px) {
    .responsive-font {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

/**
 * Flexbox row container
 */
.row {
    display: flex;
    flex-wrap: nowrap;
}

/**
 * Padded row variant with vertical spacing
 */
.row.padded_row,
.row.padded_row > div {
    padding-top: 20px;
    padding-bottom: 20px;
}

/**
 * Bottom wrapper for flexible layout
 */
.bottom_wrapper {
    flex-grow: 1;
}

/* ==========================================================================
   CHAT INTERFACE COMPONENTS
   ========================================================================== */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.chat-header {
    padding: 5px;
    padding-left: 10px;
    white-space: nowrap;
}

.chat-messages {
    flex: 1 1 auto;
    overflow-y: hidden;
    padding: 0px 12px 32px 2px;
    width: 80%;
    max-width: 80%;
    margin: 14px auto;
}

.chat-input-area {
    padding-left: 15px;
    padding-right: 18px;
    padding-bottom: 15px;
    padding-top: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat-input-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.chat-hint {
    font-size: 0.65em;
    color: #636363;
    padding-top:4px;
    padding-bottom:0px;
    text-align: center;
    max-width: 90%;
    margin-bottom:-8px;
}

/**
 * Main chat window container
 * Includes shadow and rounded corners
 */
.chat_window {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background-color: #f8f8f8;
    overflow: hidden;
}

/**
 * Top menu bar for chat window
 */
.top_menu {
    background-color: #fff;
    padding: 13px 0px;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.1);
}

.top_menu .title {
    text-align: center;
    color: #1c355e;
    font-size: 20px;
    font-weight: 600;
}

/* ==========================================================================
   MESSAGES CONTAINER
   ========================================================================== */

/**
 * Scrollable messages container
 * Height calculated based on viewport height
 */
.messages {
    position: relative;
    list-style: none;
    /*padding: 5px 15px 0 15px;*/
    margin: 0;
    height: calc(80 * var(--vh) - 50px);
    overflow: auto;
    color: #212529;
    font-weight: 400;
    line-height: 145%;
    font-size: 1em;
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 50px;
    padding-left: 1px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f1f1f1;
}

/* Custom scrollbar styles for messages */
.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/**
 * Individual message container
 * Includes fade-in animation
 */
.messages .message {
    clear: both;
    overflow: hidden;
    transition: all 0.5s linear;
    opacity: 0;
}

.messages .message.appeared {
    opacity: 1;
}

/* ==========================================================================
   MESSAGE AVATAR STYLES
   ========================================================================== */

/**
 * Base avatar styles for messages
 */
.messages .message .avatar {
    height: 20px;
    width: 30px;
    background-size: cover !important;
    border-radius: 50%;
    display: inline-block;
    margin-top: 2px;
}

/**
 * Left-aligned message avatar (bot)
 */
.messages .message.left .avatar {
    float: left;
    background-image: url('../img/bot.svg');
    background-size: 30px 22px !important;
    background-repeat: no-repeat;
    margin-top: 18px;
    align-items: center;
}

/**
 * Right-aligned message avatar (user)
 */
.messages .message.right .avatar {
    float: left;
    background-image: url('../img/user.svg');
    background-size: 30px 20px !important;
    background-repeat: no-repeat;
    margin-top: 14px;
    align-items: center;
}

/* ==========================================================================
   MESSAGE TEXT WRAPPER STYLES
   ========================================================================== */

/**
 * Base text wrapper for message content
 */
.messages .message .text_wrapper {
    display: inline-block;
    padding: 0px;
    border-radius: 0px;
    width: auto;
    max-width: 90%;
    position: relative;
    margin-top: 5px;
}

/**
 * Message bubble tails (pseudo-elements)
 */
.messages .message .text_wrapper::after,
.messages .message .text_wrapper:before {
    top: 2px;
    border: solid transparent;
    content: ' ';
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.messages .message .text_wrapper::after {
    border-width: 13px;
    margin-top: 0px;
}

.messages .message .text_wrapper::before {
    border-width: 5px;
    margin-top: -1px;
}

/**
 * Left-aligned message text wrapper (bot messages)
 */
.messages .message .left .text_wrapper {
    border-radius: 6px;
}

.messages .message.left .text_wrapper {
    margin-left: 0px;
    padding: 10px 10px 10px 5px;
    border-radius: 15px;
}

.messages .message.left .text_wrapper::after,
.messages .message.left .text_wrapper::before {
    right: 100%;
}

/**
 * Right-aligned message text wrapper (user messages)
 */
.messages .message.right {
    padding-bottom: 1px;
    padding-top: 5px;
 
}

    .messages .message.right .text_wrapper {
        margin-left: auto;
        margin-right: 0px;
        background-color: #f0f0f0;
        padding: 8px 5px 8px 5px;
        border-radius: 10px;
    }

.messages .message.right .text_wrapper::after,
.messages .message.right .text_wrapper::before {
    left: 100%;
}

/* ==========================================================================
   MESSAGE CONTENT FORMATTING
   ========================================================================== */

/**
 * Heading styles within message text
 */
.text h1,
.text h2 {
    font-size: 0.925rem !important;
    font-weight: 600;
}

.text h3,
.text h4,
.text h5 {
    font-size: 0.825rem !important;
    font-weight: 600;
}

/**
 * Paragraph styles

.text p {
    margin-bottom: 0;
    margin-top: 0;
} */

/**
 * List styles
 */
.text ol {
    list-style-type: decimal;
}

.text ul {
    list-style-type: disc;
    margin-bottom: 5px;
}

.text li {
    margin-bottom: 5px;
}

.text li:last-child {
    margin-bottom: 10px;
}

/**
 * Spacing for paragraphs followed by lists
 */
.text > p:has(+ ul),
.text > p:has(+ li),
.text > p:has(+ ol) {
    margin-top: 20px !important;
    margin-bottom: 5px !important;
}

.messages > p:has(+ strong),
.messages > p:has(+ ul),
.messages > p:has(+ li) {
    font-weight: bold !important;
    display: block !important;
    padding-top: 12px !important;
}

/* Remove top spacing for paragraphs immediately following headings */
.text h1 + p,
.text h2 + p,
.text h3 + p,
.text h4 + p {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove top spacing for paragraphs immediately following LI */
.text li + p,
.text ul + p {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.text ul + li {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/**
 * Spacing for specific elements
 */
.text h4 + p,
.text table {
    margin-bottom: 20px;
}

/**
 * Code block styles
 */
.text pre {
    padding: 10px !important;
    background-color: #000 !important;
    color: white !important;
    min-height: 50px;
    position: relative;
}

.text code {
    color: black !important;
}

.text pre code {
    color: white !important;
    min-height: 30px;
}

/**
 * Table styles with horizontal scrolling
 */
.text table {
    width: 100%;
    table-layout: auto;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
    font-size: inherit;
    scrollbar-width: thin;
    scrollbar-color: #E8EAED #F5F5F5;
    scroll-padding-top: 10px;
}

.text th,
.text td {
    border: 1px solid #E8EAED;
    padding: 5px;
    white-space: nowrap;
}

.text th {
    text-align: center;
    font-weight: bold;
}

/**
 * Image sizing for external images
 */
.text img[src^="http"]:not([src*="chatbot"]):not([src*="ai-apps.microchip.com"]) {
    width: 75px;
    height: 75px;
    object-fit: contain;
}

/* ==========================================================================
   INPUT CONTROLS
   ========================================================================== */

.input-wrapper {
    position: relative;
    width: 80%;
    min-width: 50vw;
    max-width: 80%;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    padding: 8px 48px 8px 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.input-wrapper:focus-within {
    border-color: #1c355e;
    box-shadow: 0 4px 12px rgba(28, 53, 94, 0.15);
}

#msg_input {
    width: 100%;
    min-width: 0;
    min-height: 24px;
    max-height: 120px;
    resize: none;
    border: none;
    outline: none;
    line-height: 24px;
    padding: 0;
    background: transparent;
    overflow-y: auto;
    word-wrap: break-word;
}

#msg_input::placeholder {
    color: #A0A0A0;
}

#send_button {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    background: #1c355e;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#send_button:hover:not(:disabled) {
    background: #157eac;
}

#send_button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.send-loading {
    position: absolute;
    right: 6px;
    bottom: 12px;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
}

.send-loading a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.send-loading i {
    font-size: 1.5rem;
}

/* ==========================================================================
   ANSWER TYPE SELECTOR & NEW CONVERSATION BUTTON
   ========================================================================== */

.answer-type-container {
    position: fixed;
    right: calc(12% + 45px);
    top: 42px;
    z-index: 1001;
}

.answer-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    font-size: 0.7rem;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.answer-selector:hover {
    background: #f8f9fa;
    border-color: #1c355e;
}

.answer-selector i {
    font-size: 0.7rem;
    color: #666;
}

.answer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1002;
    margin-top: 2px;
}

.answer-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.7rem;
    border-bottom: 1px solid #f0f0f0;
}

.answer-option:last-child {
    border-bottom: none;
}

.answer-option:hover {
    background: #f8f9fa;
    color: #1c355e;
}

.new-conversation-btn {
    position: fixed;
    right: calc(12%);
    top: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 40%;
    color: #1c355e;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.new-conversation-btn:hover {
    background: #f3f4f6;
    color: #1c355e;
    box-shadow: 0 4px 12px rgba(28, 53, 94, 0.15);
}

/* ==========================================================================
   BOOTSTRAP BUTTON OVERRIDES
   ========================================================================== */

/**
 * Primary button styles
 */
.btn-primary {
    background-color: #1c355e;
    color: #fff;
}

.btn-primary:hover {
    background-color: #39b5e9 !important;
    border-color: #39b5e9;
}

.btn-primary i {
    color: #1c355e !important;
}

.btn-primary:hover i {
    background-color: #39b5e9 !important;
    color: #fff !important;
}


 * Outline button styles
 */
.btn-outline-primary {
    border-color: #1c355e;
    color: #1c355e;
}

.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:focus {
    outline: none;
    outline-offset: 0px;
    box-shadow: 0 0 0 0;
    border-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #39b5e9 !important;
    border-color: #39b5e9;
}

.btn-outline-primary:hover i {
    background-color: #39b5e9 !important;
    color: #fff !important;
}

/**
 * Code button with press effect
 */
.codebtn {
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active.codebtn {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   CUSTOM TABLE STYLES
   ========================================================================== */

.custom-table {
    border-collapse: collapse;
    font-size: 0.9rem;
}

.custom-table th, 
.custom-table td {
    border: 1px solid #000;
    text-align: center;
}

.custom-table th {
    background-color: #1c355e;
    color: white;
    font-weight: bold;
    padding: 3px;
}

.custom-table td.responsive-font {
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.custom-table td.responsive-font:hover {
    background-color: #157eac;
    color: #FFF;
    padding: 3px;
}

/* ==========================================================================
   TERMS OF USE STYLES
   ========================================================================== */

/**
 * Terms of Use link styles
 */
.terms-link {
    color: #1c355e;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.terms-link:hover {
    color: #39b5e9;
}

/**
 * Terms of Use tooltip styles
 */
.terms-tooltip {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 600px;
    width: 85%;
    /* animation: slideUp 0.3s ease-out;*/
}

.terms-tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.terms-tooltip-close:hover {
    background: #f3f4f6;
    color: #1c355e;
}

.terms-tooltip-content {
    font-size: 0.75rem;
    line-height: 1.6;
    color: #212529;
    padding-right: 20px;
}

.terms-tooltip-content a {
    color: #157eac;
    text-decoration: underline;
}

.terms-tooltip-content a:hover {
    color: #39b5e9;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================================================
   FEEDBACK ICONS STYLES
   ========================================================================== */

/**
 * Feedback icons container
 */
.feedback-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 3px;
    margin-left: 42px;
    margin-bottom: 7px;

}

/**
 * Individual feedback icon button
 */
.feedback-icon {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 2px 2px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-icon:hover:not(:disabled) {
    background: #f3f4f6;
    color: #1c355e;
}

.feedback-icon:disabled {
    cursor: not-allowed;
}

.feedback-icon i {
    font-size: 1rem;
}

/**
 * Thumbs down feedback dialog overlay
 */
.thumbs-down-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    animation: fadeIn 0.2s ease-out;
}

.thumbs-down-dialog-overlay.active {
    display: block;
}

/**
 * Thumbs down feedback dialog
 */
.thumbs-down-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    width: 200px;
    max-height: 300px;
    padding: 12px;
    animation: slideUp 0.3s ease-out;
}

.thumbs-down-dialog.active {
    display: block;
}

.thumbs-down-dialog-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1c355e;
    margin-bottom: 10px;
    text-align: center;
}

.feedback-options-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.feedback-option {
    padding: 6px 10px;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    text-align: center;
    background: #fff;
    color: #374151;
    font-weight: 400;
}

.feedback-option:hover {
    border-color: #1c355e;
    background: #f9fafb;
    color: #1c355e;
}

.feedback-option.selected {
    border-color: #1c355e;
    background: #1c355e;
    color: #fff;
}

.feedback-option-text {
    display: block;
}

.feedback-textarea-container {
    display: none;
    margin-top: 8px;
}

.feedback-textarea-container.active {
    display: block;
}

.feedback-textarea {
    width: 100%;
    min-height: 60px;
    max-height: 100px;
    padding: 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'Open Sans', sans-serif;
    resize: vertical;
    margin-bottom: 4px;
    box-sizing: border-box;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #1c355e;
    box-shadow: 0 0 0 2px rgba(28, 53, 94, 0.1);
}

.feedback-char-count {
    font-size: 0.6rem;
    color: #6b7280;
    text-align: right;
    margin-bottom: 6px;
}

.feedback-dialog-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
}

.feedback-dialog-btn {
    padding: 5px 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 400;
    transition: all 0.2s;
    flex: 1;
}

.feedback-dialog-btn.primary {
    background: #1c355e;
    color: #fff;
    border-color: #1c355e;
}

.feedback-dialog-btn.primary:hover {
    background: #157eac;
    border-color: #157eac;
}

.feedback-dialog-btn.primary:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
}

.feedback-dialog-btn:hover:not(.primary):not(:disabled) {
    background: #f3f4f6;
    border-color: #1c355e;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/**
 * Related Questions styling
 */
#relatedQuestions {
    margin-top: 2px;
    padding-top: 2px;
}

.related-question {
    margin-bottom: 0px;
    padding-bottom: 0px;
}

.related-question span {
    cursor: pointer;
    color: #1c355e;
}

.related-question span:hover {
    color: #39b5e9;
    text-decoration: underline;
}

.related-question span.disabled {
    cursor: not-allowed;
    color: #9ca3af;
    pointer-events: none;
}

/* ==========================================================================
   COLOR STRIPE STYLES
   ========================================================================== */

.mchp-colorstripe-container {
    margin-top: 2px
}

.mchp-colorstripe-container .colorstripe-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: ". . .";
    grid-template-rows: 1fr;
    gap: 0 3px
}

.mchp-colorstripe-container .colorstripe-grid-container .main-bar {
    height: 3px
}

.mchp-colorstripe-container .colorstripe-grid-container .main-bar.orange-bar {
    background-color: #f68d2e
}

.mchp-colorstripe-container .colorstripe-grid-container .main-bar.blue-bar {
    background-color: #41b6e6
}

.mchp-colorstripe-container .colorstripe-grid-container .main-bar.green-bar {
    background-color: #6cc24a
}

/* ==========================================================================
   API KEY MODAL STYLES
   ========================================================================== */

.api-key-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.api-key-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.api-key-modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1c355e;
}

.api-key-modal-body {
    margin-bottom: 20px;
}

.api-key-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 10px;
}

.api-key-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.api-key-link {
    color: #157eac;
    text-decoration: none;
    font-size: 0.9rem;
}

.api-key-link:hover {
    text-decoration: underline;
}

.chat-input-row {
    gap: 0px !important;
}

 

/* ==========================================================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ========================================================================== */

/* ==========================================================================
   TABLET & SMALL DESKTOP (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    .chat-header, .colorstripe {
        display: none !important;
    }

 

    .chat-container {
        padding-top: 25px;
    }

    .top-controls-container {
        padding: 0 5px;
        margin-bottom: 5px;
    }

    .new-conversation-btn {
        width: 22px;
        height: 22px;
        min-width: 22px;
        right: 15px;
        top: 3px;
    }

    .answer-type-container {
        position: fixed;
        right: 50px;
        top: 1px;
        z-index: 1001;
    }

 

    .input-wrapper {
        width: 100%;
        min-width: 95vw;
        max-width: 100%;
        margin: 0 auto;
        padding: 8px 40px 8px 12px;
    }

    .chat-messages {
        width: 99vw;
        max-width: 99vw;
        padding: 10px 5px 32px 2px;
    }

    #msg_input {
        min-width: 0;
        width: 100%;
    }

    .chat-hint {
        width: 95% !important;
    }

    .chat-input-area {
        padding-left: 10px;
        padding-right: 10px;
    }

    .chat-input-row {
        width: 100%;
        justify-content: center;
    }

    .terms-tooltip {
        bottom: 70px;
        max-width: 90%;
        padding: 12px 15px;
    }

    .terms-tooltip-close {
        top: 6px;
        right: 6px;
        font-size: 1.1rem;
        width: 24px;
        height: 24px;
    }

    .terms-tooltip-content {
        font-size: 0.7rem;
        padding-right: 18px;
    }

    .feedback-icons {
        gap: 8px;
    }
    
    .feedback-icon {
        padding: 4px 6px;
        font-size: 0.9rem;
    }
    
    .feedback-icon i {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   MOBILE (max-width: 690px)
   ========================================================================== */
@media (max-width: 690px) {
    .chat-header {
        white-space: normal;
        height: auto !important;
    }

    .chat-header a {
        font-size: 0.775rem;
    }

    .chat-header .hideText {
        display: none;
    }

    .custom-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .terms-tooltip {
        bottom: 60px;
        max-width: 95%;
        padding: 10px 12px;
    }

    .terms-tooltip-close {
        top: 4px;
        right: 4px;
        font-size: 1rem;
        width: 22px;
        height: 22px;
    }

    .terms-tooltip-content {
        font-size: 0.65rem;
        line-height: 1.5;
        padding-right: 16px;
    }

    .feedback-icons {
        gap: 6px;
    }
    
    .feedback-icon {
        padding: 3px 5px;
        font-size: 0.85rem;
    }
    
    .feedback-icon i {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   EXTRA SMALL MOBILE (max-width: 600px)
   ========================================================================== */
@media (max-width: 600px) {
    .chat-header, .colorstripe {
        display: none !important;
    }

    .chat-container {
        padding-top: 5px;
    }
}