/* Hero AI — Employment Hero-style layout, Senior Force colors #003E4F / #ff8e80 */
.ai-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20050;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8e80 0%, #003E4F 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 62, 79, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ai-chat-launcher:hover,
.ai-chat-launcher:focus-visible {
    transform: translateY(-2px);
    color: #fff;
}

.ai-chat-launcher[aria-expanded="true"] {
    opacity: 0;
    pointer-events: none;
}

.ai-chat-offcanvas {
    width: min(400px, 100%) !important;
    border-left: 0;
    background: #fff;
    z-index: 20040;
    display: flex;
    flex-direction: column;
}

.ai-chat-offcanvas.show {
    visibility: visible;
    transform: none;
}

.ai-chat-offcanvas .offcanvas-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 0 0 auto;
    padding: 12px 10px 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
}

.ai-chat-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ai-chat-header__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8e80 0%, #c45d8a 42%, #003E4F 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: 0 0 36px;
}

.ai-chat-header__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    color: #111827;
}

.ai-chat-header__actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.ai-chat-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ai-chat-icon-btn:hover,
.ai-chat-icon-btn:focus-visible {
    background: #f3f4f6;
    color: #111827;
}

.ai-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 22px 16px;
    background: #fff;
    min-height: 280px;
}

.ai-chat-welcome {
    padding-top: 8px;
}

.ai-chat-intro {
    color: #1f2937;
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 20px;
}

.ai-chat-intro p {
    margin: 0 0 14px;
}

.ai-chat-intro p:last-child {
    margin-bottom: 0;
}

.ai-chat-starters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-chat-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    border: 0;
    background: #f3f4f6;
    color: #111827;
    border-radius: 14px;
    padding: 15px 18px;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ai-chat-chip:hover,
.ai-chat-chip:focus-visible {
    background: #e8eaed;
}

.ai-chat-chip__icon {
    width: 20px;
    color: #003E4F;
    text-align: center;
    flex: 0 0 20px;
}

.ai-chat-chip__label {
    flex: 1 1 auto;
}

.ai-chat-bubble {
    max-width: 92%;
    padding: 0;
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-chat-bubble a {
    color: inherit;
    text-decoration: underline;
}

.ai-chat-bubble strong {
    font-weight: 700;
}

.ai-chat-bubble--user {
    margin-left: auto;
    background: #003E4F;
    color: #fff;
    border-radius: 18px;
    padding: 10px 14px;
}

.ai-chat-bubble--assistant {
    margin-right: auto;
    background: transparent;
    color: #1f2937;
}

.ai-chat-row {
    display: flex;
    flex-direction: column;
}

.ai-chat-row--user {
    align-items: flex-end;
}

.ai-chat-row--assistant {
    align-items: flex-start;
}

.ai-chat-feedback {
    display: flex;
    gap: 6px;
    margin: -6px 0 14px;
}

.ai-chat-feedback button {
    border: 0;
    background: transparent;
    color: #9ca3af;
    padding: 2px 4px;
    font-size: 13px;
    line-height: 1;
}

.ai-chat-feedback button.is-active {
    color: #003E4F;
}

.ai-chat-typing {
    display: none;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
    padding: 0 22px 10px;
    background: #fff;
}

.ai-chat-typing.is-visible {
    display: flex;
}

.ai-chat-typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 3px;
    border-radius: 50%;
    background: #ff8e80;
    animation: ai-chat-bounce 1s infinite ease-in-out;
}

.ai-chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-chat-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat-composer {
    background: #fff;
    padding: 8px 18px 16px;
}

.ai-chat-composer__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
}

.ai-chat-composer textarea {
    flex: 1 1 auto;
    resize: none;
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    min-height: 36px;
    max-height: 96px;
    padding: 8px 0;
    font-size: 15px;
    line-height: 1.4;
    color: #111827;
}

.ai-chat-composer textarea:focus,
.ai-chat-composer textarea:focus-visible {
    border: 0 !important;
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

.ai-chat-composer textarea::placeholder {
    color: #9ca3af;
}

.ai-chat-send {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #ff8e80;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    font-size: 16px;
}

.ai-chat-send:hover,
.ai-chat-send:focus {
    background: #003E4F;
    color: #fff;
}

.ai-chat-disclaimer {
    margin: 12px 6px 0;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
}

.ai-chat-disclaimer a {
    color: #111827;
    text-decoration: underline;
}

.ai-chat-error {
    color: #b42318;
    font-size: 13px;
    margin: 0 6px 8px;
}

.ai-job-card-list,
.ai-app-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 14px;
    max-width: 100%;
}

.ai-job-card,
.ai-app-card {
    background: #f3f4f6;
    border: 0;
    border-radius: 16px;
    padding: 14px 16px;
}

.ai-job-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px;
}

.ai-job-card__company,
.ai-job-card__meta,
.ai-app-card__meta {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.ai-job-card__score {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #003E4F;
    background: #fff;
    border-radius: 999px;
    padding: 2px 8px;
}

.ai-job-card__cta,
.ai-app-card__cta {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #003E4F;
    border-radius: 999px;
    padding: 6px 12px;
    text-decoration: none;
}

.ai-job-card__cta:hover,
.ai-app-card__cta:hover {
    background: #ff8e80;
    color: #fff;
}

.ai-app-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #1f2937;
}

.ai-app-card__status {
    text-transform: capitalize;
    font-size: 11px;
    font-weight: 600;
    color: #003E4F;
    background: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .ai-chat-launcher {
        right: 16px;
        bottom: 16px;
    }

    .ai-chat-offcanvas {
        width: 100% !important;
    }
}
