.ypk-chatbot,
.ypk-chatbot *,
.ypk-chatbot *::before,
.ypk-chatbot *::after {
    box-sizing: border-box;
}

.ypk-chatbot {
    color: #111827;
    font-family: Poppins, Arial, sans-serif;
}

.ypk-chatbot__launcher {
    align-items: center;
    background: #111827;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    bottom: 92px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 20px;
    height: 58px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: fixed;
    right: 22px;
    transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    width: 58px;
    z-index: 1002;
}

.ypk-chatbot__launcher:hover,
.ypk-chatbot__launcher:focus {
    background: #b91c1c;
    box-shadow: 0 22px 48px rgba(185, 28, 28, 0.28);
    outline: none;
    transform: translateY(-1px);
}

.ypk-chatbot__panel[hidden] {
    display: none !important;
}

.ypk-chatbot__panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    bottom: 162px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
    display: flex;
    flex-direction: column;
    height: min(680px, calc(100vh - 190px));
    max-height: 680px;
    overflow: hidden;
    position: fixed;
    right: 22px;
    width: min(420px, calc(100vw - 32px));
    z-index: 1001;
}

.ypk-chatbot__header {
    align-items: center;
    background: #111827;
    color: #fff;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 72px;
    padding: 14px 16px;
}

.ypk-chatbot__heading {
    min-width: 0;
}

.ypk-chatbot__heading h2 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    margin: 0;
}

.ypk-chatbot__heading p {
    color: #cbd5e1;
    font-size: 12px;
    line-height: 16px;
    margin: 4px 0 0;
}

.ypk-chatbot__header-actions {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.ypk-chatbot__icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    transition: background-color 160ms ease, color 160ms ease;
    width: 36px;
}

.ypk-chatbot__icon-button:hover,
.ypk-chatbot__icon-button:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}

.ypk-chatbot__messages {
    background: #f8fafc;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 16px;
}

.ypk-chatbot__bubble,
.ypk-chatbot__card {
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    font-size: 14px;
    line-height: 22px;
}

.ypk-chatbot__bubble {
    max-width: 88%;
    padding: 11px 14px;
}

.ypk-chatbot__bubble--assistant {
    align-self: flex-start;
    background: #fff;
    border-top-left-radius: 5px;
    color: #334155;
}

.ypk-chatbot__bubble--user {
    align-self: flex-end;
    background: #b91c1c;
    border-top-right-radius: 5px;
    color: #fff;
}

.ypk-chatbot__suggestions,
.ypk-chatbot__button-row,
.ypk-chatbot__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ypk-chatbot__pill,
.ypk-chatbot__button,
.ypk-chatbot__button-secondary {
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    padding: 8px 12px;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ypk-chatbot__pill,
.ypk-chatbot__button-secondary {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.ypk-chatbot__pill:hover,
.ypk-chatbot__button-secondary:hover {
    border-color: #b91c1c;
    color: #b91c1c;
}

.ypk-chatbot__button {
    background: #b91c1c;
    border: 1px solid #b91c1c;
    color: #fff;
}

.ypk-chatbot__button:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.ypk-chatbot__card {
    align-self: stretch;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #334155;
    padding: 14px;
}

.ypk-chatbot__card h3 {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    margin: 0;
}

.ypk-chatbot__card p {
    color: #64748b;
    font-size: 14px;
    line-height: 22px;
    margin: 8px 0 0;
}

.ypk-chatbot__card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.ypk-chatbot__result {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: inherit;
    display: flex;
    gap: 10px;
    min-height: 68px;
    padding: 10px;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.ypk-chatbot__result:hover {
    background: #fef2f2;
    border-color: #fecaca;
    text-decoration: none;
}

.ypk-chatbot__result img {
    background: #f1f5f9;
    border-radius: 10px;
    height: 52px;
    object-fit: cover;
    width: 52px;
}

.ypk-chatbot__result-title {
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
}

.ypk-chatbot__result-subtitle {
    color: #64748b;
    font-size: 12px;
    line-height: 18px;
    margin-top: 3px;
}

.ypk-chatbot__chip {
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    padding: 6px 10px;
}

.ypk-chatbot__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.ypk-chatbot__field {
    color: #334155;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}

.ypk-chatbot__field--checkbox {
    align-items: flex-start;
    flex-direction: row;
    gap: 8px;
}

.ypk-chatbot__field input,
.ypk-chatbot__field textarea,
.ypk-chatbot__field select {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    min-height: 42px;
    outline: none;
    padding: 9px 11px;
    width: 100%;
}

.ypk-chatbot__field input:focus,
.ypk-chatbot__field textarea:focus,
.ypk-chatbot__field select:focus,
.ypk-chatbot__input:focus {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.ypk-chatbot__field--checkbox input {
    margin-top: 2px;
    min-height: 16px;
    width: 16px;
}

.ypk-chatbot__composer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    padding: 12px;
}

.ypk-chatbot__input {
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    color: #111827;
    flex: 1 1 auto;
    font-family: inherit;
    font-size: 14px;
    height: 48px;
    line-height: 20px;
    min-height: 48px;
    outline: none;
    padding: 12px;
    resize: none;
}

.ypk-chatbot__send {
    align-items: center;
    background: #b91c1c;
    border: 0;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex: 0 0 48px;
    font-size: 16px;
    height: 48px;
    justify-content: center;
    padding: 0;
    transition: background-color 160ms ease;
}

.ypk-chatbot__send:hover {
    background: #991b1b;
}

.ypk-chatbot__send:disabled,
.ypk-chatbot__input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.ypk-chatbot__sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 575px) {
    .ypk-chatbot__launcher {
        bottom: 82px;
        right: 14px;
    }

    .ypk-chatbot__panel {
        border-radius: 16px 16px 0 0;
        bottom: 0;
        height: min(620px, calc(100vh - 24px));
        max-height: none;
        right: 0;
        width: 100vw;
    }
}
