/* prodo2026 look for the chat iframe (chat/index.php templates), styled to match
   the Prodo assistant panel in demoprodo/site/Prodocom Home.dc.html. Every class
   and id below is a JS hook in chat/templates/*.php - selectors are kept verbatim
   and only presentation changes. The same iframe also sits inside the legacy left
   slider on un-migrated pages. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');

html, body { height: 100%; margin: 0; }

#chatSurround {
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fbfaf7;
    font-family: 'Geist', Arial, sans-serif;
    color: #1b2c38;
    text-align: center;
}
#chatSurround * { box-sizing: border-box; }

/* The widget header already carries the branding; the iframe's own logo
   banner is hidden rather than removed - the markup stays in the templates. */
.chatbanner { display: none; }

.centerwindow {
    background-color: transparent;
    padding: 14px 16px;
    margin: 0;
    flex: 1 1 auto;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}
.centerwindow p { font-size: 0.92rem; line-height: 1.55; color: #5d6b76; }
.chatwindow { height: auto !important; }

/* messages */
.container-chat { width: 100%; margin-bottom: 10px; }
.user-name-div, .staff-name-div { font-size: 0.72rem; color: #8a97a1; margin-bottom: 3px; }
.staff-name-div { text-align: left; }
.staff-name-div b { float: none; }
.user-name-div { text-align: right; }
.time-span { color: #a8a299; font-size: 0.68rem; }

.user-box { margin-left: 18%; padding: 0; text-align: right; }
.user-box span {
    display: inline-block;
    background-color: #1b3e5d;
    color: #fff;
    padding: 10px 13px;
    border-radius: 14px 4px 14px 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}
.staff-box { margin-right: 18%; padding: 0; text-align: left; }
.staff-box span {
    display: inline-block;
    background-color: #fff;
    border: 1px solid #ece8e1;
    color: #24323c;
    padding: 10px 13px;
    border-radius: 4px 14px 14px 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

/* message entry */
.chatInputHolder { flex-shrink: 0; border-top: 1px solid #ece8e1; background: #fff; padding: 10px 14px 12px; }
.chatTextHolder { padding: 0 0 8px; }
.chatTextBox {
    width: 100%;
    min-height: 52px;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 12px;
    border: 1px solid #e0d8ca;
    border-radius: 10px;
    background: #fbfaf7;
    color: #1b2c38;
    resize: none;
    outline: none;
}
.chatTextBox:focus { border-color: #1d7eb3; }
.buttonHolder { padding: 0; display: flex; gap: 8px; justify-content: flex-end; }

/* start + feedback forms */
.form-input-div { text-align: left; margin-bottom: 10px; }
.form-input-div input, .form-input-div textarea {
    width: 100%;
    margin: 4px 0 0;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 12px;
    border: 1px solid #e0d8ca;
    border-radius: 10px;
    background: #fff;
    color: #1b2c38;
    outline: none;
}
.form-input-div input:focus, .form-input-div textarea:focus { border-color: #1d7eb3; }
.form-input-div input[type=radio] { width: auto; margin: 0 10px 0 2px; }
.form-input-div textarea { min-height: 64px; resize: vertical; }

label {
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6a7884;
}

button {
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: #e77d20;
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
button:hover { background-color: #cf6c14; }
button:disabled { opacity: 0.5; cursor: default; }
#endbutton { background: transparent; color: #5d6b76; border: 1px solid #e0d8ca; }
#endbutton:hover { background: #f1ede4; }

a { color: #1d7eb3; }
.invalid { color: #c0392b; font-size: 0.82rem; margin-top: 4px; }
#feedback-box { padding: 16px; text-align: left; }

/* start form: full-width submit and a styled captcha block */
#ajaxmessagedisplaycontainer form button[type=submit] { width: 100%; margin-top: 4px; }
#captchaContainer { margin: 4px 0 8px; }
#captchaContainer img, #validate_img {
    display: block;
    background: #fff;
    border: 1px solid #e0d8ca;
    border-radius: 10px;
    padding: 4px;
    max-width: 100%;
    margin-bottom: 4px;
}
#captchaContainer a { font-size: 0.8rem; }

/* prodo2026 chatbot sequence: reply chips, inline forms and the Start again
   header. Bubbles reuse the .staff-box / .user-box rules above. */
.p-bot-head { flex-shrink: 0; display: flex; justify-content: flex-end; padding: 8px 14px 0; }
.p-bot-restart {
    background: transparent;
    color: #5d6b76;
    border: 1px solid #e0d8ca;
    padding: 5px 11px;
    font-size: 0.76rem;
    border-radius: 999px;
}
.p-bot-restart:hover { background: #f1ede4; }

/* The chips are replies, not navigation, so they sit inside the transcript
   right under the message they answer - no band, no footer, nothing between
   the question and the answers. Bottom padding only, to hold them off the
   next bubble; :empty collapses that between steps. */
.p-bot-controls { padding: 0 0 6px; }
.p-bot-controls:empty { padding: 0; }

.p-chip-row { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.p-chip {
    display: inline-block;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: right;
    text-decoration: none;
    background: #fff;
    color: #1b3e5d;
    border: 1px solid #b9d3e5;
    border-radius: 999px;
    padding: 9px 15px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.p-chip:hover { background: #eef6fb; border-color: #1d7eb3; }
.p-chip--primary { background: #e77d20; border-color: #e77d20; color: #fff; }
.p-chip--primary:hover { background: #cf6c14; border-color: #cf6c14; color: #fff; }

/* Going back is a way out, not an answer, so it is muted next to the replies. */
.p-chip--back { color: #5d6b76; border-color: #e0d8ca; }
.p-chip--back:hover { background: #f1ede4; border-color: #cbbfa9; }

/* "Prodo is typing", held for a beat before each answer. Three dots in a staff
   bubble, so the answer replaces them in place. */
/* Scoped through .staff-box to outrank the bubble's own "span" rule, which is
   what sets display for every other message. */
.staff-box span.p-dots { display: inline-flex; align-items: center; gap: 5px; }
.p-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9aa7b1;
    animation: p-dot 0.6s infinite ease-in-out;
}
.p-dots i:nth-child(2) { animation-delay: 0.1s; }
.p-dots i:nth-child(3) { animation-delay: 0.2s; }
@keyframes p-dot {
    0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-3px); }
}

/* Inline in the transcript now, so the form carries its own card - the same
   white-on-warm treatment as a Prodo bubble - instead of the footer band. */
.p-bot-form {
    text-align: left;
    background: #fff;
    border: 1px solid #ece8e1;
    border-radius: 14px;
    padding: 12px;
}
.p-bot-form .form-input-div input, .p-bot-form .form-input-div textarea { background: #fbfaf7; }
.p-bot-form button[type=submit] { width: 100%; margin-top: 4px; }
.p-bot-form .invalid[hidden] { display: none; }
