.kp-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    font-family: Arial, Helvetica, sans-serif;
}
.kp-toggle {
   display: inline-flex;
   align-items: center;
   gap: 10px;
   border: 0;
   border-radius: 999px;
   background: white;
   color: black;
   padding: 14px 18px;
   font-size: 14px;
   cursor: pointer;
   box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.kp-toggle video {max-width: 40px}
.kp-panel {
    display: none;
}

.kp-panel.kp-open {
    display: flex;
}

.kp-panel {
    opacity:0;
    transform:translateY(10px);
    pointer-events:none;
    transition:all .2s ease;
}
.kp-toggle-wrap{
    display:flex;
    align-items:center;
    gap:6px;
    justify-content: space-between
}

.kp-typing span{
    display:inline-block;
    width:6px;
    height:6px;
    margin:0 2px;
    background:#666;
    border-radius:50%;
    animation:kp-dot 1.2s infinite ease-in-out;
}

.kp-typing span:nth-child(2){
    animation-delay:0.2s;
}

.kp-typing span:nth-child(3){
    animation-delay:0.4s;
}

@keyframes kp-dot{
    0%,80%,100%{
        transform:scale(0);
        opacity:.3;
    }
    40%{
        transform:scale(1);
        opacity:1;
    }
}

.kp-toggle-close{
  border: 0;
   background: transparent;
   cursor: pointer;
   font-size: 18px;
   line-height: 1;
   padding: 4px 6px;
   border-radius: 50%;
   background: #ffffff;
   width: 34px;
   height: 34px;
   box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
   margin-right: 18px;
}

.kp-toggle-close:hover{
    background:rgb(255 252 252);
}

.kp-toggle-close{
    display:none;
}

.kp-widget.kp-opened .kp-toggle-close{
    display:block;
}
.kp-panel.kp-open {
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}
.kp-toggle__icon { font-size: 18px; }
.kp-panel {
    width: min(380px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 90px));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    border: 1px solid #dfe3ea;
    overflow: hidden;
    display: none;
    flex-direction: column;
    margin-top: 12px;
}
.kp-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 14px 16px;
   background:linear-gradient(45deg, #00ffe11a 0%, #6200ff0f 25%, #ddd8ea 50%, transparent);
   color: black;
}
.kp-resource {
    background:#f6f8ff;
    border-left:4px solid #2563eb;
}

.kp-subtitle {
    margin-top: 4px;
    font-size: 12px;
    opacity: .9;
}
.kp-reset {
    border: 0;
     background: white;
     color: #5e5e5e;
     width: 34px;
     height: 34px;
     border-radius: 50%;
     cursor: pointer;
     font-size: 18px;
     box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.kp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #ffff;
}
.kp-msg {
    max-width: 88%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.45;
    font-size: 14px;
    white-space: pre-wrap;
}
.kp-msg--assistant {
    background: #f7f6f9;
    color: #17212f;
    padding: 18px;
    font-weight: 400;
}
.kp-msg--user {
   background: #0f62fe;
   margin-left: auto;
   color: white;
   padding: 18px;
}
.kp-jobs { margin-top: 12px; display: grid; gap: 10px;margin-bottom: 12px; }
.kp-job {
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 14px;
    padding: 12px;
}
.kp-job__title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    font-size: 16px
}
.kp-job__meta {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
}
.kp-job__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kp-badge {
    display: inline-block;
    font-size: 12px;
    padding: 4px 8px;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
}
.kp-job__link {
    color: #298c2e;
    text-decoration: none;
    font-weight: 600;
    padding: 10px;
    display: flex;
    background: linear-gradient(45deg, #ecfeee, transparent);
    border-radius: 8px;
    border: 1px solid #b2cdad;
    margin-top: 15px;
}
.kp-suggestions {
    display: none !important;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: #f6f8f9;
    max-height: 88px;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: flex-start;
}

/* Suggestions bar hidden for now – remove this block to re-enable */
.kp-widget.kp-opened .kp-suggestions.kp-suggestions--visible {
    display: none !important;
}

.kp-msg--welcome .kp-msg__text {
    margin-bottom: 10px;
}

.kp-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.kp-bubble {
    border: 1px solid #0f62fe;
    background: #fff;
    color: #0f62fe;
    border-radius: 999px;
    font-size: 13px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.kp-bubble:hover {
    background: #0f62fe;
    color: #fff;
}

.kp-panel[hidden] {
    display: none !important;
}
.kp-suggestions button {
    border: 1px solid #dbe2ea;
    background: #fff;
    border-radius: 999px;
    font-size: 12px;
    padding: 7px 10px;
    cursor: pointer;
}
.kp-form {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid #e5eaf0;
    background: #fff;
    align-items:center;
}
.kp-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
}
.kp-send { border: 0; background: #f2f2f2; color: #fff; border-radius: 50%; cursor: pointer; width: 34px; height: 34px; display: flex; justify-content: center; align-items: center; }
.kp-send:hover { background: #e7e7e7;}
.kp-form.kp-form--disabled .kp-send {
    opacity: 0.6;
    cursor: default;
}
.kp-form.kp-form--disabled .kp-input {
    background-color: #f9fafb;
}
.kp-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.kp-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    animation: kp-blink 1.2s infinite ease-in-out;
}

.kp-more {
    width: 100%;
    border: 1px solid #dbe2ea;
    background: #fff;
    border-radius: 12px;
    font-size: 13px;
    padding: 10px 12px;
    cursor: pointer;
    margin: 8px 0 12px;
    font-weight: 600;
}

.kp-more:hover {
    background: #f8fafc;
}
.kp-widget.kp-opened::after {
    position: absolute;
    left: -10%;
    top: -40px;
    width: 120%;
    height: 160px;
    content: "";
    display: block;
    z-index: -1;
    pointer-events: none;

    background: radial-gradient(ellipse at center bottom, rgb(0 0 0 / 10%) 0%, rgb(0 0 0 / 4%) 40%, rgba(0, 0, 0, 0) 65%);
}

.kp-welcome-title{
    font-size:20px;
    font-weight:700;
    margin-bottom:8px;
}

.kp-welcome-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    margin:10px 0;
}

.kp-welcome-item{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
}

.kp-welcome-item span{
    line-height:1.3;
}

.kp-welcome-hint{
    margin-top:10px;
    font-size:13px;
    opacity:0.8;
}

.kp-typing span:nth-child(2) { animation-delay: .15s; }
.kp-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes kp-blink {
    0%, 80%, 100% { opacity: .25; transform: scale(.8); }
    40% { opacity: 1; transform: scale(1); }
}
@media (max-width: 640px) {
    .kp-widget { right: 12px; bottom: 12px; left: 12px; }
    .kp-panel { width: 100%; }
    .kp-toggle { width: 100%; justify-content: center; max-width: 160px; justify-self: flex-end; align-self: flex-end;        text-align: left;}
    .kp-widget.kp-opened  .kp-toggle {  max-width: 260px;width: fit-content }
    .kp-toggle-wrap {  justify-content: flex-end }
    .kp-widget.kp-opened .kp-toggle-wrap {  justify-content: space-between }
    
}
