.arhr-chat {
    --arhr-orange: #EF8C21;
    --arhr-blue: #00367D;
    --arhr-gray: #555555;
    --arhr-white: #FFFFFF;
    box-sizing: border-box;
    width: 100%;
    max-width: 780px;
    margin: 24px auto;
    overflow: hidden;
    border: 1px solid #dce3ec;
    border-radius: 22px;
    background: var(--arhr-white);
    color: var(--arhr-gray);
    font: inherit;
    line-height: 1.6;
    text-align: left;
    box-shadow: 0 12px 40px rgba(0, 54, 125, 0.07);
}
.arhr-chat.arhr-chat--dm-sans { font-family: "DM Sans", sans-serif; }
.arhr-chat *, .arhr-chat *::before, .arhr-chat *::after { box-sizing: border-box; }
.arhr-chat [hidden] { display: none !important; }
.arhr-chat .arhr-chat__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px; background: var(--arhr-blue); color: var(--arhr-white); }
.arhr-chat .arhr-chat__header h2 { margin: 8px 0; padding: 0; color: var(--arhr-white); font-family: inherit; font-size: clamp(21px, 3vw, 27px); font-weight: 700; line-height: 1.3; letter-spacing: -0.4px; }
.arhr-chat .arhr-chat__header p { margin: 0; color: var(--arhr-white); font-family: inherit; font-size: 14px; }
.arhr-chat .arhr-chat__header .arhr-chat__eyebrow { color: var(--arhr-orange); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.arhr-chat .arhr-chat__ai-label { flex-shrink: 0; border: 1px solid #819dbf; border-radius: 22px; padding: 5px 10px; font-size: 12px; }
.arhr-chat .arhr-chat__messages { height: 360px; height: clamp(240px, 40vh, 360px); overflow-y: auto; overscroll-behavior: contain; padding: 26px; background: #f7f9fc; }
.arhr-chat .arhr-chat__message { width: fit-content; max-width: 90%; margin: 0 0 18px; padding: 16px 19px; border: 1px solid #dce3ec; border-radius: 18px 18px 18px 4px; background: var(--arhr-white); overflow-wrap: anywhere; }
.arhr-chat .arhr-chat__message:last-child { margin-bottom: 0; }
.arhr-chat .arhr-chat__message--user { margin-left: auto; border-color: #bfcfe4; border-radius: 18px 18px 4px 18px; background: #eaf0f9; }
.arhr-chat .arhr-chat__sender { display: block; margin-bottom: 6px; color: var(--arhr-blue); font-size: 12px; font-weight: 700; }
.arhr-chat .arhr-chat__text { margin: 0; padding: 0; color: var(--arhr-gray); font-family: inherit; font-size: 15px; line-height: 1.7; white-space: pre-wrap; }
.arhr-chat .arhr-chat__feedback { padding: 0 26px; }
.arhr-chat .arhr-chat__status { display: flex; align-items: center; gap: 12px; min-height: 26px; margin: 8px 0 0; font-size: 13px; color: var(--arhr-blue); }
.arhr-chat .arhr-chat__typing-dots { display: inline-flex; align-items: center; gap: 5px; height: 18px; flex-shrink: 0; }
.arhr-chat .arhr-chat__typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--arhr-orange); animation: arhr-typing-dot 1.4s ease-in-out infinite; }
.arhr-chat .arhr-chat__typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.arhr-chat .arhr-chat__typing-dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes arhr-typing-dot {
    0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}
.arhr-chat .arhr-chat__error { margin: 8px 0; padding: 12px 14px; border: 1px solid #e0bcb5; border-radius: 10px; background: #fff4f1; color: #882a1b; font-size: 14px; overflow-wrap: anywhere; }
.arhr-chat .arhr-chat__form { margin: 0; padding: 10px 26px 24px; }
.arhr-chat .arhr-chat__form label { display: block; margin: 0 0 8px; color: var(--arhr-blue); font-size: 14px; font-weight: 700; }
.arhr-chat .arhr-chat__form textarea { display: block; width: 100%; min-height: 90px; max-height: 220px; margin: 0; padding: 13px 15px; border: 1px solid #a7b7cc; border-radius: 12px; background: var(--arhr-white); box-shadow: none; color: var(--arhr-gray); font-family: inherit; font-size: 16px; line-height: 1.6; resize: vertical; }
.arhr-chat .arhr-chat__form textarea::placeholder { color: #687483; opacity: 1; }
.arhr-chat .arhr-chat__form textarea[aria-invalid="true"] { border-color: #882a1b; }
.arhr-chat .arhr-chat__form textarea[readonly] { background: #f7f9fc; }
.arhr-chat .arhr-chat__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.arhr-chat .arhr-chat__actions > span { font-size: 12px; }
.arhr-chat .arhr-chat__send { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex-shrink: 0; min-width: 156px; min-height: 46px; margin: 0; padding: 11px 20px; border: 2px solid transparent; border-radius: 22px; background: var(--arhr-orange); background-image: none; box-shadow: none; color: var(--arhr-white); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.4; text-transform: none; letter-spacing: normal; cursor: pointer; }
.arhr-chat .arhr-chat__send:hover:not(:disabled) { border-color: var(--arhr-blue); }
.arhr-chat .arhr-chat__send:disabled { cursor: wait; }
.arhr-chat .arhr-chat__form[aria-busy="true"] .arhr-chat__send::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: var(--arhr-white); border-radius: 50%; animation: arhr-send-spin 0.9s linear infinite; }
@keyframes arhr-send-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .arhr-chat .arhr-chat__typing-dots span,
    .arhr-chat .arhr-chat__form[aria-busy="true"] .arhr-chat__send::before { animation: none; }
}
.arhr-chat .arhr-chat__bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e1e6ee; }
.arhr-chat .arhr-chat__bottom p { margin: 0; color: var(--arhr-gray); font-family: inherit; font-size: 12px; line-height: 1.7; }
.arhr-chat .arhr-chat__reset { flex-shrink: 0; min-height: 44px; margin: 0; padding: 7px 5px; border: 0; border-radius: 5px; background: transparent; box-shadow: none; color: var(--arhr-blue); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-transform: none; cursor: pointer; }
.arhr-chat .arhr-chat__reset:disabled { opacity: 0.6; cursor: wait; }
.arhr-chat textarea:focus-visible, .arhr-chat button:focus-visible, .arhr-chat [tabindex]:focus-visible { outline: 3px solid var(--arhr-blue); outline-offset: 3px; }
.arhr-chat .arhr-chat__noscript { margin: 0; padding: 0 26px 24px; }
@media (max-width: 540px) {
    .arhr-chat { margin: 16px auto; }
    .arhr-chat .arhr-chat__header { flex-direction: column; padding: 22px 18px; }
    .arhr-chat .arhr-chat__messages { height: clamp(220px, 32vh, 280px); padding: 18px; }
    .arhr-chat .arhr-chat__message { max-width: 96%; padding: 13px 15px; }
    .arhr-chat .arhr-chat__feedback { padding: 0 18px; }
    .arhr-chat .arhr-chat__form { padding: 10px 18px 20px; }
    .arhr-chat .arhr-chat__actions, .arhr-chat .arhr-chat__bottom { flex-direction: column; align-items: stretch; gap: 12px; }
    .arhr-chat .arhr-chat__send { width: 100%; }
    .arhr-chat .arhr-chat__reset { align-self: flex-start; }
}
