﻿input[type=file]::file-selector-button {
    color: white !important;
    font-size: 10pt;
    background-color: red !important;
}

/*Main chatbot window*/
#cbChatContainer {
    position: relative;
    margin-top: 5px;
    width: 900px;
    z-index: 2000000000;
    font-family: inherit;
}

#cbChatCard {
    display: none;
    background: #fff;   
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
    overflow: hidden;
    max-height: 700px;
    border-style: solid;
    border-width: 1px;
    border-color: #4E4E4E;
    background-color: #E7E7E7;
}

#cbChatHeader {
    background: #003057;
    color: #fff;
    padding: 8px 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cbChatBody {
    padding: 8px;
    position: relative; /* allow absolute spinner overlay */
}

/*Conversation log area*/
#cbChatLog {
    border: 1px solid #eee;
    height: 400px;
    overflow-y: auto;
    overflow-x: none;
    padding: 8px;
    font-size: 13px;    
    overflow-x: hidden;
    word-wrap: break-word;
    background-color: #E7E7E7;
}

#cbChatInput {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

    #cbChatInput input[type=text] {
        flex: 1;
    }

#cbChatFiles {
    margin-top: 10px;
    font-size: 12px;
}

.cb-file {
    display: inline-block;
    background: #eef;
    border: 1px solid #ccd;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 2px 2px 0 0;
}

/* RWAM chat bubbles */
.cb-msg {
    margin: 6px 10px; /* We add a side margin so the tail fits. */
    padding: 10px 14px;
    background-color: #003057;
    color: white;
    position: relative;
    /* We round everything except the bottom-left corner. */
    border-radius: 12px 12px 12px 0px;
    display: table;
}

/* User chat bubbles */
.cb-user {
    margin: 6px 10px;
    padding: 10px 14px;
    /* We round everything except the bottom-right corner. */
    border-radius: 12px 12px 0px 12px;
    position: relative;
    display: table;
    width: fit-content;
    background: #A8CF45; /* The same dark green as in your original text */
    color: #ffffff;
    border-color: #709316;
}

/* Bot bubble message: blue background and white text. */
.cb-bot {
    color: #fff;
    background: #003057;
}

.cb-bot-other {
    color: #fff;
    background: #003057;
}

#cbToggleBtn {
    color: #FFFFFF;
    font-size: 10pt;
    background-color: #448AC9;
    border: 1px solid transparent;
    border-radius: 5px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 11px;
    padding-right: 11px;
}

    #cbToggleBtn:hover {
        background-color: #357EBD;
        border: 1px solid #21527C;
    }

    #cbCloseBtn {
        background: transparent;
        color: #fff;
        border: none;
        font-size: 16px;
        cursor: pointer;
    }

.cb-msg.pending {
    opacity: 0.7;
    font-style: italic;
}

.cb-msg.error {
    color: #fff;
    background: #c00;
}

.cb-msg .upload-summary {
    margin: 2px 0;
}

    .cb-msg .upload-summary h4 {
        margin: 0 0 6px 0;
        font-size: 14px;
    }

    .cb-msg .upload-summary ul {
        margin: 0;
        padding-left: 16px;
    }

    .cb-msg .upload-summary li {
        margin: 2px 0;
    }

.upload-summary div {
    line-height: 1.4;
    margin-bottom: 3px;
}

.upload-summary .label {
    font-weight: 600;
}

.cb-bot {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

    .cb-bot.fade-in {
        opacity: 1;
    }

/* Suggestions styles */
#cbSuggestions {
    margin-top: 8px;
    /*overflow-y: auto;
            min-height: 40px;
           max-height: 60px;*/
}

.hidden {
    display: none;
}

/* Response buttons */
.cb-suggestion {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 11px;
    padding-right: 11px;
    cursor: pointer;
    user-select: none;
    font-size: 10pt;
    background: #FFFFFF;
    color: #000000;
    border: 1px solid #A8CF45;
    border-radius: 5px;
}

    .cb-suggestion:hover {
        background-color: #A8CF45; /*#357EBD;*/
        border: 1px solid #21527C;
    }

    .cb-suggestion.selected {
        background: #448AC9;
        color: #FFFFFF;
        border: 1px solid transparent;
        border-radius: 5px;
    }

        .cb-suggestion.selected:hover {
            background-color: #357EBD;
            border: 1px solid #21527C;
        }

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.65);
    backdrop-filter: blur(4px);
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

    .modal.show {
        display: flex;
    }

.modal-card {
    background: white;
    width: 92%;
    max-width: 420px;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

/* No button on terms and conditions */
.modal button {
    color: #FFFFFF;
    font-size: 10pt;
    background-color: #448AC9;
    border: 1px solid transparent;
    border-radius: 5px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 11px;
    padding-right: 11px;
}

    .modal button:hover {
        background-color: #357EBD;
        border: 1px solid #21527C;
    }

    /* Yes button on terms and conditions */
    .modal button:disabled {
        color: #FFFFFF;
        font-size: 10pt;
        background-color: #448AC9;
        border: 1px solid transparent;
        border-radius: 5px;
        padding-top: 7px;
        padding-bottom: 7px;
        padding-left: 11px;
        padding-right: 11px;
    }

        .modal button:disabled:hover {
             background-color: #357EBD;
             border: 1px solid #21527C;
        }

/* Buttons */
/* Send File initiating button */
.cbSendFile {
    color: #FFFFFF;
    font-size: 10pt;
    background-color: #448AC9;
    border: 1px solid transparent;
    border-radius: 5px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 11px;
    padding-right: 11px;
}

    .cbSendFile:hover {
        background-color: #357EBD;
    }

/* Includes: Attach File button */
.btn-primary {
    color: #FFFFFF;
    font-size: 10pt;
    background-color: #448AC9;
    border: 1px solid transparent;
    border-radius: 5px;
}

    .btn-primary:hover:not(:disabled) {
        background: #357EBD;
        border: 1px solid #21527C;
    }

.btn-secondary {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

    .btn-secondary:hover {
        background: #f1f5f9;
    }

/* ===== TERMS MODAL ===== */

#termsDialog header h3 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
}

#termsDialog header p {
    margin-top: 6px;
    color: #64748b;
}

#termsDialog .terms-container {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

#termsDialog label {
    font-size: 14px;
    color: #334155;
}

    #termsDialog label span {
        color: #2563eb;
        font-weight: 600;
    }

#termsDialog .legal-box {
    display: none;
    margin-top: 14px;
    max-height: 130px;
    overflow-y: auto;
    font-size: 13px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ===== EDIT MODAL ===== */

#editDialog h3 {
    margin-bottom: 16px;
    font-size: 20px;
    color: #1e293b;
}

#editDialog .edit-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    box-sizing: border-box;
}

    #editDialog .edit-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

#cbResetBtn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.2s ease;
    color: #fff;
}

    #cbResetBtn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
    }

#editDialog .edit-error {
    margin-top: 8px;
    font-size: 13px;
    color: #dc2626;
    display: none;
}

.secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

    .secondary:hover {
        background: #f1f5f9;
    }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.modal-open #cbChatContainer {
    pointer-events: none;
}

.error-message {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 8px;
}

.input-error {
    border: 1px solid #d32f2f;
}

body.modal-open {
    overflow: hidden;
}

/* Spinner overlay for chatbot */
#cbSpinner {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    z-index: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: background 0.3s;
}

.cb-loader {
    width: 38px;
    height: 38px;
    border: 4px solid #cfe0ff;
    border-top-color: #0050b3;
    border-radius: 50%;
    animation: cb-spin 0.9s linear infinite;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-loader-text {
    font-size: 1.1em;
    color: #0050b3;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.01em;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 10px;
}

@keyframes cb-spin {
    to {
        transform: rotate(360deg);
    }
}

