/*
 * Computerburg Technologies Sales Chatbot
 * Version 1.1.0
 */

.crd-chatbot {
    max-width: 720px;
    margin: 20px auto;
    border: 1px solid #dddddd;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    font-family: Arial, Helvetica, sans-serif;
}

.crd-chat-header {
    background: var(--crd-color);
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crd-chat-header strong {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.crd-minimize {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 8px;
}

.crd-chat-messages {
    height: 420px;
    overflow-y: auto;
    padding: 16px;
    background: #f7f7f7;
    box-sizing: border-box;
}

.crd-msg {
    max-width: 82%;
    padding: 10px 13px;
    margin: 0 0 12px;
    border-radius: 12px;
    line-height: 1.45;
    font-size: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.crd-msg.user {
    margin-left: auto;
    margin-right: 0;
    background: var(--crd-color);
    color: #ffffff;
    border-bottom-right-radius: 3px;
}

.crd-msg.assistant {
    margin-left: 0;
    margin-right: auto;
    background: #ffffff;
    color: #333333;
    border: 1px solid #e1e1e1;
    border-bottom-left-radius: 3px;
}

.crd-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #dddddd;
    background: #ffffff;
    box-sizing: border-box;
    align-items: stretch;
}

.crd-chat-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #bbbbbb;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

.crd-chat-input:focus {
    border-color: var(--crd-color);
    box-shadow: 0 0 0 1px var(--crd-color);
}

.crd-send-button,
.crd-mic-button,
.crd-voice-button {
    background: var(--crd-color);
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    min-height: 44px;
    cursor: pointer;
    font-size: 16px;
}

.crd-send-button {
    padding: 0 18px;
    font-weight: 600;
}

.crd-mic-button,
.crd-voice-button {
    min-width: 48px;
    padding: 0 10px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crd-send-button:hover,
.crd-mic-button:hover,
.crd-voice-button:hover {
    opacity: 0.9;
}

.crd-send-button:disabled,
.crd-mic-button:disabled,
.crd-voice-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.crd-mic-button.is-listening {
    outline: 3px solid rgba(0, 0, 0, 0.12);
}

.crd-collapsed .crd-chat-messages,
.crd-collapsed .crd-chat-form {
    display: none;
}

@media (max-width: 600px) {
    .crd-chatbot {
        margin: 10px;
        border-radius: 8px;
        max-width: calc(100% - 20px);
    }

    .crd-chat-header {
        padding: 12px 14px;
    }

    .crd-chat-header strong {
        font-size: 17px;
    }

    .crd-chat-messages {
        height: 350px;
        padding: 12px;
    }

    .crd-msg {
        max-width: 90%;
        font-size: 15px;
    }

    .crd-chat-form {
        padding: 10px;
        flex-wrap: wrap;
    }

    .crd-chat-input {
        flex-basis: 100%;
        width: 100%;
        font-size: 16px;
    }

    .crd-mic-button,
    .crd-voice-button {
        min-width: 42px;
        padding: 0 8px;
    }

    .crd-send-button {
        flex: 1;
    }
}


.crd-repair-form-link {
    margin-top: 10px;
}

.crd-repair-form-link a {
    display: inline-block;
    font-weight: 700;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.crd-disclosure {font-size:12px;padding:8px 16px;margin:0;color:#555;background:#fff;}
.crd-product-link,.crd-action-link {margin-top:10px;white-space:normal;}
.crd-product-link a,.crd-action-link a {color:#145995;text-decoration:underline;font-weight:600;}

.crd-tools {padding:12px 16px;border-bottom:1px solid #ddd;color:#333;background:#fff;}
.crd-tools label {display:block;font-size:14px;}
.crd-tools select,.crd-tools input {max-width:100%;box-sizing:border-box;padding:8px;border:1px solid #aaa;border-radius:6px;background:#fff;color:#222;font-size:16px;}
.crd-tools button {background:var(--crd-color);color:#fff;border:0;border-radius:6px;padding:10px;cursor:pointer;min-height:42px;}
.crd-speech-status {font-size:13px;color:#714700;}
.crd-speech-status:empty {display:none;}
.crd-tools small {font-size:11px;line-height:1.4;display:block;}
.crd-collapsed .crd-tools {display:none;}

/* Barbara AI 2.1.2: neon orange with a multicolor wordmark. */
.crd-chatbot { border-radius: 20px; border-color: #ffd0bb; }
.crd-chat-header { gap: 12px; border-bottom: 4px solid transparent;
    border-image: linear-gradient(to right, #4285f4 25%, #ea4335 25%, #ea4335 50%, #fbbc05 50%, #fbbc05 75%, #34a853 75%) 1; }
.crd-chat-header .crd-brand { background: #fff; padding: 9px 15px; border-radius: 28px;
    font-family: Arial, Helvetica, sans-serif; font-size: 24px; letter-spacing: -.6px;
    line-height: 1.3; overflow-wrap: anywhere; }
.crd-brand-color-0 { color: #4285f4; }
.crd-brand-color-1 { color: #ea4335; }
.crd-brand-color-2 { color: #996900; }
.crd-brand-color-3 { color: #188038; }
.crd-chatbot .crd-minimize, .crd-chatbot .crd-send-button,
.crd-chatbot .crd-mic-button, .crd-chatbot .crd-voice-button,
.crd-chatbot .crd-tools button, .crd-chatbot .crd-msg.user { color: #202124; }
.crd-chat-input { border-radius: 24px; }
.crd-chat-messages .crd-msg.assistant:first-child { border-left: 5px solid var(--crd-color); }
.crd-chatbot button:focus-visible { outline: 3px solid #174ea6; outline-offset: 2px; }

/* Speech controls and inventory image cards, 2.1.4. */
.crd-chatbot .crd-go-button, .crd-chatbot .crd-stop-button {
    min-width: 46px; min-height: 44px; border: 0; border-radius: 12px;
    padding: 8px 12px; font-size: 23px; cursor: pointer; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.crd-chatbot .crd-go-button { background: #188038; }
.crd-chatbot .crd-stop-button { background: #b3261e; }
.crd-stop-button[aria-pressed="true"] { box-shadow: inset 0 0 0 3px #202124; }
.crd-chatbot .crd-product-card { display: flex; flex-wrap: wrap; align-items: center;
    gap: 12px; background: #fff; padding: 12px; border: 1px solid #ddd;
    border-radius: 12px; text-decoration: none; }
.crd-product-card img { width: 120px; height: 120px; max-width: 100%; object-fit: contain; border-radius: 8px; }
.crd-product-card > span:last-child { flex: 1 1 140px; text-decoration: underline; }
.crd-product-placeholder { font-size: 12px; color: #555; font-weight: normal; }
.crd-product-placeholder[hidden] { display: none; }
