.tom-chat-widget {
--tom-primary: #107aca;
--tom-dark: #05253d;
--tom-light: #cfe4f4;
--tom-link: var(--tom-primary);
--tom-font-size: 16px;
--tom-line: #e3e8ee;
--tom-muted: #4d6075;
--tom-shadow: 0 2px 12px rgba(0, 38, 76, 0.12);
max-width: 800px;
margin: 0 auto;
background: transparent;
font-family: inherit; font-size: var(--tom-font-size);
color: var(--tom-dark);
box-sizing: border-box;
}
.tom-chat-widget *,
.tom-chat-widget *::before,
.tom-chat-widget *::after {
box-sizing: border-box;
} .tom-chat-body {
display: flex;
flex-direction: column;
gap: 24px;
max-height: 60vh;
overflow-y: auto;
margin: 0 0 16px;
padding: 24px;
background: #ffffff;
border-radius: 16px;
box-shadow: var(--tom-shadow);
text-align: left;
}
.tom-chat-body::-webkit-scrollbar {
width: 6px;
}
.tom-chat-body::-webkit-scrollbar-track {
background: transparent;
}
.tom-chat-body::-webkit-scrollbar-thumb {
background: var(--tom-line);
border-radius: 3px;
}
.tom-chat-body::-webkit-scrollbar-thumb:hover {
background: var(--tom-muted);
} .tom-message {
display: flex;
align-items: flex-start;
gap: 12px;
margin: 0;
padding: 0;
animation: tom-fadeIn 0.2s ease-out;
}
@keyframes tom-fadeIn {
from {
opacity: 0;
transform: translateY(6px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.tom-message-avatar {
flex: 0 0 auto;
width: 32px;
height: 32px;
margin: 0;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 0.87em;
}
.tom-message-assistant .tom-message-avatar {
background-color: transparent;
background-image: url(//ianature.com/wp-content/plugins/tom-plugin/public/images/tom-avatar.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
color: transparent;
font-size: 0;
}
.tom-message-content {
flex: 1 1 0%;
min-width: 0;
}
.tom-message-text {
margin: 0;
padding: 0;
font-size: 1em;
line-height: 1.6;
color: var(--tom-dark);
word-wrap: break-word;
text-align: left;
}
.tom-message-text p {
margin: 0 0 12px;
}
.tom-message-text p:last-child {
margin-bottom: 0;
}
.tom-message-text a {
color: var(--tom-link);
font-weight: 700;
} .tom-message-user {
flex-direction: row-reverse;
}
.tom-message-user .tom-message-avatar {
display: none;
}
.tom-message-user .tom-message-content {
flex: 0 1 auto;
width: fit-content;
max-width: 80%;
margin-left: auto;
padding: 10px 16px;
background: var(--tom-light);
border-radius: 18px 18px 4px 18px;
}
.tom-message-user .tom-message-text {
font-weight: 700;
} .tom-message-sources {
margin: 16px 0 0;
padding: 16px 0 0;
border-top: 1px solid var(--tom-line);
text-align: left;
}
.tom-message-sources-title {
display: none;
margin: 0 0 8px;
font-size: 0.75em;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--tom-muted);
}
.tom-message-sources-list {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.tom-message-source-link {
display: block;
font-size: 0.94em;
font-weight: 700;
color: var(--tom-link) !important;
text-decoration: none !important;
text-align: left; padding-left: 12px;
text-indent: -12px;
} .tom-message-source-link::before {
content: '\2022\00a0';
}
.tom-message-source-link::after {
content: '\00a0\2192';
}
.tom-message-source-link:hover {
text-decoration: underline !important;
} .tom-source-link-inline,
.tom-message-text .tom-inline-source-link {
color: var(--tom-link);
font-weight: 700;
text-decoration: underline !important;
text-underline-offset: 3px;
text-decoration-thickness: 1px;
cursor: pointer;
}
.tom-source-link-inline:hover,
.tom-message-text .tom-inline-source-link:hover {
opacity: 0.8;
}
.tom-inline-source-note {
font-size: 0.92em;
opacity: 0.9;
} .tom-chat-input-container {
margin: 0;
padding: 0;
background: transparent;
border: 0;
}
.tom-chat-welcome {
margin: 0 0 24px;
font-size: 1.5em;
font-weight: 700;
line-height: 1.3;
color: var(--tom-dark);
text-align: center;
}
.tom-chat-input-wrapper {
display: flex;
align-items: center;
gap: 12px;
min-height: 54px;
padding: 3px 3px 3px 20px;
background: #ffffff;
border: 1px solid var(--tom-line);
border-radius: 999px;
box-shadow: var(--tom-shadow);
transition: border-color 0.15s;
}
.tom-chat-input-wrapper:focus-within {
border-color: var(--tom-primary);
}
.tom-chat-widget .tom-chat-input {
flex: 1;
min-width: 0;
min-height: 46px;
max-height: 120px;
margin: 0;
padding: 12px 0;
border: 0;
background: transparent;
box-shadow: none;
outline: 0;
resize: none;
font-family: inherit;
font-size: 16px; line-height: 22px;
color: var(--tom-dark);
}
.tom-chat-widget .tom-chat-input::placeholder {
color: var(--tom-muted);
opacity: 0.7;
}
.tom-chat-widget .tom-chat-send-btn,
.tom-chat-widget .tom-chat-send-btn:hover,
.tom-chat-widget .tom-chat-send-btn:focus,
.tom-chat-widget .tom-chat-send-btn:active { -webkit-appearance: none;
appearance: none;
display: flex !important;
align-items: center;
justify-content: center;
gap: 8px;
flex: 0 0 auto !important;
width: 46px !important;
height: 46px !important;
min-width: 46px !important;
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
border-radius: 999px !important;
background: var(--tom-dark) !important;
color: #ffffff !important;
box-shadow: none !important;
font-family: inherit !important;
font-size: 16px !important;
font-weight: 700 !important;
line-height: 1 !important;
text-transform: none !important;
letter-spacing: normal !important;
cursor: pointer;
opacity: 1;
visibility: visible;
transition: background-color 0.15s;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.tom-chat-widget .tom-chat-send-btn:hover,
.tom-chat-widget .tom-chat-send-btn:focus-visible {
background: var(--tom-primary) !important;
}
.tom-chat-widget .tom-chat-send-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
} .tom-chat-send-btn svg {
display: block;
width: 18px;
height: 18px;
flex-shrink: 0;
pointer-events: none;
} .tom-chat-ai-notice {
margin: 12px 0 0;
padding: 0;
font-size: 13px;
line-height: 1.5;
color: var(--tom-muted);
text-align: left;
}
.tom-chat-ai-notice a,
.tom-chat-ai-notice .tom-disclosure-link {
color: var(--tom-dark);
font-weight: 700;
text-decoration: none;
}
.tom-chat-ai-notice a:hover,
.tom-chat-ai-notice .tom-disclosure-link:hover {
text-decoration: underline;
} .tom-chat-examples {
margin: 48px 0 0;
} .tom-chat-started .tom-chat-examples {
display: none;
}
.tom-chat-examples-title {
margin: 0 0 24px;
font-size: 1.5em;
font-weight: 700;
line-height: 1.3;
color: var(--tom-dark);
text-align: center;
}
.tom-chat-examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
}
.tom-chat-widget .tom-chat-example,
.tom-chat-widget .tom-chat-example:hover,
.tom-chat-widget .tom-chat-example:focus,
.tom-chat-widget .tom-chat-example:active {
-webkit-appearance: none;
appearance: none;
display: block;
width: 100%;
min-height: 88px;
margin: 0;
padding: 20px 24px !important;
background: #ffffff !important;
border: 1px solid var(--tom-line) !important;
border-radius: 8px !important;
box-shadow: none !important;
font-family: inherit !important;
font-size: 16px !important;
font-weight: 700 !important;
line-height: 1.4 !important;
text-align: left !important;
text-transform: none !important;
letter-spacing: normal !important;
color: var(--tom-dark) !important;
cursor: pointer;
transition: border-color 0.15s, color 0.15s;
}
.tom-chat-widget .tom-chat-example:hover,
.tom-chat-widget .tom-chat-example:focus-visible {
border-color: var(--tom-primary) !important;
color: var(--tom-primary) !important;
} .tom-chat-loader {
display: flex;
justify-content: flex-start;
padding: 8px 24px;
background: transparent;
}
.tom-chat-loader-dots {
display: flex;
gap: 6px;
align-items: center;
}
.tom-chat-loader-dots span {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--tom-primary);
animation: tom-bounce 1.4s infinite ease-in-out both;
}
.tom-chat-loader-dots span:nth-child(1) {
animation-delay: -0.32s;
}
.tom-chat-loader-dots span:nth-child(2) {
animation-delay: -0.16s;
}
@keyframes tom-bounce {
0%, 80%, 100% {
transform: scale(0.5);
opacity: 0.4;
}
40% {
transform: scale(1);
opacity: 1;
}
} .tom-error {
padding: 14px 16px;
background: #ffffff;
border: 1px solid #e3e8ee;
border-left: 3px solid #107aca;
border-radius: 8px;
color: #4d6075;
font-size: 0.93em;
}
.tom-error a {
color: #107aca;
text-decoration: underline;
} .tom-message-report {
margin-top: 12px;
text-align: left;
} .tom-chat-widget .tom-report-trigger,
.tom-chat-widget .tom-report-send,
.tom-chat-widget .tom-report-cancel,
.tom-chat-widget .tom-report-trigger:hover,
.tom-chat-widget .tom-report-send:hover,
.tom-chat-widget .tom-report-cancel:hover,
.tom-chat-widget .tom-report-trigger:focus,
.tom-chat-widget .tom-report-send:focus,
.tom-chat-widget .tom-report-cancel:focus,
.tom-chat-widget .tom-report-trigger:active,
.tom-chat-widget .tom-report-send:active,
.tom-chat-widget .tom-report-cancel:active {
font-family: inherit;
font-size: 13px;
font-weight: 400;
-webkit-appearance: none;
appearance: none;
background: none !important;
background-color: transparent !important;
border: none !important;
border-radius: 0 !important;
box-shadow: none !important;
outline: none;
padding: 0 !important;
margin: 0;
cursor: pointer;
text-transform: none;
} .tom-chat-widget .tom-report-trigger,
.tom-chat-widget .tom-report-send,
.tom-chat-widget .tom-report-cancel {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.tom-chat-widget .tom-report-trigger::selection,
.tom-chat-widget .tom-report-send::selection,
.tom-chat-widget .tom-report-cancel::selection {
background: transparent;
}
.tom-chat-widget .tom-report-trigger,
.tom-chat-widget .tom-report-cancel {
color: var(--tom-muted) !important;
text-decoration: underline;
}
.tom-chat-widget .tom-report-trigger:hover,
.tom-chat-widget .tom-report-cancel:hover,
.tom-chat-widget .tom-report-trigger:focus-visible,
.tom-chat-widget .tom-report-cancel:focus-visible {
color: var(--tom-dark) !important;
}
.tom-report-form {
margin-top: 8px;
} .tom-report-quote {
background: var(--tom-light);
border-radius: 12px;
padding: 12px 14px;
margin-bottom: 8px;
}
.tom-report-quote-label {
font-size: 0.75em;
font-weight: 700;
color: var(--tom-dark);
margin-bottom: 4px;
}
.tom-report-quote-text {
font-size: 0.8em;
line-height: 1.5;
color: var(--tom-dark); white-space: pre-wrap;
} .tom-report-comment-wrapper {
display: flex;
align-items: flex-end;
background: #ffffff;
border: 1px solid var(--tom-line);
border-radius: 16px;
padding: 12px 16px;
margin-top: 10px;
transition: border-color 0.15s;
}
.tom-report-comment-wrapper:focus-within {
border-color: var(--tom-primary);
}
.tom-chat-widget .tom-report-comment {
flex: 1;
width: 100%;
border: none;
background: transparent;
box-shadow: none;
resize: none;
font-family: inherit;
font-size: 15px;
line-height: 1.5;
color: var(--tom-dark);
outline: none;
padding: 0;
min-height: 48px;
max-height: 120px;
}
.tom-chat-widget .tom-report-comment::placeholder {
color: var(--tom-muted);
opacity: 0.7;
}
.tom-report-actions {
display: flex;
gap: 16px;
margin-top: 8px;
}
.tom-chat-widget .tom-report-send {
color: var(--tom-primary) !important;
font-weight: 700;
}
.tom-chat-widget .tom-report-send:hover,
.tom-chat-widget .tom-report-send:focus-visible {
color: var(--tom-dark) !important;
text-decoration: underline;
}
.tom-chat-widget .tom-report-send:disabled,
.tom-chat-widget .tom-report-cancel:disabled {
opacity: 0.5;
cursor: default;
text-decoration: none;
} .tom-report-done {
margin-top: 8px;
}
.tom-report-thanks {
font-size: 1.1em;
font-weight: 700;
line-height: 1.4;
color: var(--tom-dark);
margin: 0 0 10px;
}
.tom-report-comment-label {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.tom-report-error {
font-size: 13px;
color: var(--tom-muted);
margin: 6px 0 0;
} @media (max-width: 600px) {
.tom-chat-body {
padding: 20px 16px;
}
.tom-chat-input-wrapper {
padding-left: 16px;
}
.tom-chat-welcome {
font-size: 1.3em;
}
.tom-message-user .tom-message-content {
max-width: 90%;
}
.tom-chat-examples {
margin-top: 32px;
}
.tom-chat-examples-title {
font-size: 1.3em;
}
.tom-chat-examples-grid {
gap: 10px;
}
.tom-chat-widget .tom-chat-example,
.tom-chat-widget .tom-chat-example:hover,
.tom-chat-widget .tom-chat-example:focus,
.tom-chat-widget .tom-chat-example:active {
min-height: 0;
padding: 16px 20px !important;
}
}