.yeap-ai-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483647;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
}

.yeap-ai-chat__launcher {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    border: 0;
    border-radius: 999px;
    padding: 10px 24px 10px 12px;
    background: #1d5cff;
    color: #fff;
    box-shadow: 0 18px 34px rgba(29, 92, 255, 0.3);
    cursor: pointer;
    font-weight: 800;
    touch-action: none;
    user-select: none;
    text-decoration: none !important;
}

.yeap-ai-chat .yeap-ai-chat__launcher,
.yeap-ai-chat .yeap-ai-chat__launcher:hover,
.yeap-ai-chat .yeap-ai-chat__launcher:focus,
.yeap-ai-chat .yeap-ai-chat__launcher:active,
.yeap-ai-chat .yeap-ai-chat__launcher span {
    color: #fff !important;
}

.yeap-ai-chat .yeap-ai-chat__launcher {
    background: #1d5cff !important;
}

.yeap-ai-chat--dragging .yeap-ai-chat__launcher {
    cursor: grabbing;
}

.yeap-ai-chat__launcher-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #1d5cff !important;
    font-weight: 900;
    font-size: 18px !important;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(29, 92, 255, 0.18);
}

.yeap-ai-chat__launcher-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.yeap-ai-chat__launcher-icon::before {
    content: none !important;
    display: none !important;
}

.yeap-ai-chat__launcher-icon svg {
    display: none !important;
}

.yeap-ai-chat .yeap-ai-chat__launcher-icon {
    background: #fff !important;
    color: #1d5cff !important;
}

.yeap-ai-chat .yeap-ai-chat__launcher .yeap-ai-chat__launcher-icon {
    color: #1d5cff !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.yeap-ai-chat__launcher-icon::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
}

.yeap-ai-chat__launcher-text {
    font-size: 16px;
    letter-spacing: 0;
}

.yeap-ai-chat__panel {
    position: absolute;
    z-index: 2147483647;
    right: 0;
    bottom: 86px;
    width: min(460px, calc(100vw - 28px));
    height: min(680px, calc(100vh - 120px));
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.yeap-ai-chat .yeap-ai-chat__panel {
    background: #fff !important;
    color: #172033 !important;
}

.yeap-ai-chat__header {
    display: grid;
    grid-template-columns: 58px 1fr auto 36px 36px;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 18px 18px;
    background: linear-gradient(135deg, #0b1f4d, #071735);
    color: #fff;
}

.yeap-ai-chat .yeap-ai-chat__header,
.yeap-ai-chat .yeap-ai-chat__header * {
    color: #fff !important;
}

.yeap-ai-chat .yeap-ai-chat__header {
    background: linear-gradient(135deg, #0b1f4d, #071735) !important;
}

.yeap-ai-chat__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
    color: #1d5cff;
    font-size: 20px;
    font-weight: 900;
    box-shadow: inset 0 0 0 2px rgba(29, 92, 255, 0.18);
}

.yeap-ai-chat .yeap-ai-chat__brand {
    background: #fff !important;
    color: #1d5cff !important;
}

.yeap-ai-chat__title-wrap {
    min-width: 0;
}

.yeap-ai-chat__title-wrap strong {
    display: block;
    color: #fff;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: 0;
}

.yeap-ai-chat__title-wrap span {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.25;
}

.yeap-ai-chat .yeap-ai-chat__title-wrap span {
    color: rgba(255, 255, 255, 0.82) !important;
}

.yeap-ai-chat__title-wrap i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.yeap-ai-chat .yeap-ai-chat__title-wrap i {
    background: #22c55e !important;
}

.yeap-ai-chat__minimize,
.yeap-ai-chat__end,
.yeap-ai-chat__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.yeap-ai-chat .yeap-ai-chat__minimize,
.yeap-ai-chat .yeap-ai-chat__end,
.yeap-ai-chat .yeap-ai-chat__close {
    background: transparent !important;
    color: #fff !important;
}

.yeap-ai-chat__end {
    width: auto;
    min-width: 48px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    font-size: 13px;
    font-weight: 800;
}

.yeap-ai-chat__minimize {
    font-size: 30px;
    padding-bottom: 7px;
}

.yeap-ai-chat__messages {
    height: calc(100% - 178px);
    padding: 18px 20px;
    overflow-y: auto;
    background: radial-gradient(circle at 100% 100%, rgba(29, 92, 255, 0.08), transparent 34%), #fbfdff;
}

.yeap-ai-chat .yeap-ai-chat__messages {
    background: radial-gradient(circle at 100% 100%, rgba(29, 92, 255, 0.08), transparent 34%), #fbfdff !important;
}

.yeap-ai-chat__messages::-webkit-scrollbar {
    width: 8px;
}

.yeap-ai-chat__messages::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 999px;
}

.yeap-ai-chat__message {
    position: relative;
    max-width: 74%;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.yeap-ai-chat__message--assistant {
    margin-left: 52px;
    margin-right: auto;
    background: #fff;
    color: #172033;
    border: 1px solid #dbe3ee;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.yeap-ai-chat .yeap-ai-chat__message--assistant {
    background: #fff !important;
    color: #172033 !important;
}

.yeap-ai-chat__message--assistant::before {
    content: '🤖';
    position: absolute;
    left: -52px;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    font-size: 20px;
}

.yeap-ai-chat__message--user {
    margin-left: auto;
    margin-right: 52px;
    background: linear-gradient(135deg, #2367ff, #1251e8);
    color: #fff;
    border-radius: 14px 14px 4px 14px;
    box-shadow: 0 10px 22px rgba(18, 81, 232, 0.24);
}

.yeap-ai-chat .yeap-ai-chat__message--user {
    background: linear-gradient(135deg, #2367ff, #1251e8) !important;
    color: #fff !important;
}

.yeap-ai-chat__message--user::after {
    content: '';
    position: absolute;
    right: -52px;
    top: 4px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
    box-shadow: inset 0 0 0 2px #fff;
}

.yeap-ai-chat__message--system {
    max-width: 86%;
    margin-left: 0;
    background: #eef6ff;
    color: #172033;
    border: 1px solid #cfe4ff;
    box-shadow: none;
}

.yeap-ai-chat .yeap-ai-chat__message--system {
    background: #eef6ff !important;
    color: #172033 !important;
}

.yeap-ai-chat__message--system::before {
    content: 'i';
    position: static;
    float: left;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 2px 12px 4px 0;
    border-radius: 50%;
    background: #1d6df2;
    color: #fff;
    font-weight: 800;
}

.yeap-ai-chat__ticket-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 12px;
    max-width: 88%;
    margin: 0 0 18px;
    padding: 16px;
    border-radius: 14px;
    background: #f0fff5;
    border: 1px solid #bbf7d0;
    color: #172033;
}

.yeap-ai-chat__ticket-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-weight: 900;
}

.yeap-ai-chat__ticket-title {
    display: block;
    margin-bottom: 4px;
    color: #16803a;
    font-size: 17px;
}

.yeap-ai-chat__ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 10px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
}

.yeap-ai-chat__ticket-row a {
    flex: 0 0 auto;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 7px 10px;
    color: #15803d;
    font-weight: 800;
    text-decoration: none;
}

.yeap-ai-chat__feedback-card {
    max-width: 88%;
    margin: 0 0 18px;
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dbe3ee;
    color: #172033;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.yeap-ai-chat .yeap-ai-chat__feedback-card {
    background: #fff !important;
    color: #172033 !important;
}

.yeap-ai-chat__feedback-card strong {
    display: block;
    margin-bottom: 10px;
    color: #172033 !important;
    font-size: 15px;
}

.yeap-ai-chat__feedback-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.yeap-ai-chat__feedback-stars button {
    width: 34px;
    height: 34px;
    border: 1px solid #cfe4ff;
    border-radius: 8px;
    background: #f8fbff !important;
    color: #94a3b8 !important;
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.yeap-ai-chat__feedback-stars button.is-active {
    background: #fff7d6 !important;
    border-color: #facc15;
    color: #d97706 !important;
}

.yeap-ai-chat__feedback-stars button::after {
    content: '/5';
    margin-left: 1px;
    font-size: 10px;
    font-weight: 700;
}

.yeap-ai-chat__feedback-card textarea {
    width: 100%;
    min-height: 74px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff !important;
    color: #172033 !important;
    font: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.yeap-ai-chat__feedback-card > button {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #1d5cff !important;
    color: #fff !important;
    cursor: pointer;
    font-weight: 800;
}

.yeap-ai-chat__feedback-card > button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.yeap-ai-chat__feedback-error {
    margin-top: 10px;
    color: #b91c1c !important;
    font-size: 13px;
    font-weight: 700;
}

.yeap-ai-chat__form {
    display: grid;
    grid-template-columns: 50px 1fr 42px 58px;
    gap: 0;
    padding: 12px 16px 8px;
    border-top: 1px solid #e5edf6;
    background: #fff;
}

.yeap-ai-chat .yeap-ai-chat__form {
    background: #fff !important;
}

.yeap-ai-chat__attach,
.yeap-ai-chat__emoji {
    height: 44px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.yeap-ai-chat .yeap-ai-chat__attach,
.yeap-ai-chat .yeap-ai-chat__emoji {
    background: #fff !important;
    color: #64748b !important;
}

.yeap-ai-chat__attach {
    border-radius: 10px 0 0 10px;
    border-right: 0;
}

.yeap-ai-chat__emoji {
    border-left: 0;
    border-radius: 0 10px 10px 0;
}

.yeap-ai-chat__form input {
    min-width: 0;
    height: 44px;
    border: 1px solid #dbe3ee;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 0 12px;
    color: #172033;
    font-size: 15px;
}

.yeap-ai-chat .yeap-ai-chat__form input {
    background: #fff !important;
    color: #172033 !important;
    box-shadow: none !important;
    outline-color: #1d5cff;
}

.yeap-ai-chat .yeap-ai-chat__form input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.yeap-ai-chat__form button[type="submit"] {
    width: 52px;
    height: 44px;
    margin-left: 8px;
    border: 0;
    border-radius: 10px;
    padding: 0;
    background: #1d5cff;
    color: transparent;
    cursor: pointer;
    font-size: 0;
    font-weight: 800;
}

.yeap-ai-chat .yeap-ai-chat__form button[type="submit"] {
    background: #1d5cff !important;
}

.yeap-ai-chat__form button[type="submit"]::before {
    content: '➤';
    color: #fff;
    font-size: 22px;
}

.yeap-ai-chat__emoji-picker {
    position: absolute;
    right: 84px;
    bottom: 74px;
    display: grid;
    grid-template-columns: repeat(6, 34px);
    gap: 6px;
    padding: 10px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    z-index: 2;
}

.yeap-ai-chat__emoji-picker button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #f8fafc !important;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.yeap-ai-chat__emoji-picker button:hover,
.yeap-ai-chat__emoji-picker button:focus {
    background: #eef6ff !important;
}

.yeap-ai-chat__form button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.yeap-ai-chat__footer {
    height: 28px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    line-height: 24px;
    background: #fff;
}

.yeap-ai-chat .yeap-ai-chat__footer {
    background: #fff !important;
    color: #64748b !important;
}

.yeap-ai-chat__footer span {
    color: #1d5cff;
}

@media (max-width: 992px) {
    .yeap-ai-chat {
        left: calc(27px + env(safe-area-inset-left, 0px)) !important;
        right: auto !important;
        top: calc(16px + env(safe-area-inset-top, 0px)) !important;
        bottom: auto !important;
    }

    .yeap-ai-chat__launcher {
        display: inline-flex !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 48px !important;
        min-width: 48px !important;
        height: 42px !important;
        min-height: 42px !important;
        border-radius: 6px !important;
        padding: 0 !important;
        justify-content: center;
        gap: 0;
    }

    .yeap-ai-chat__launcher-icon {
        width: 28px;
        height: 28px;
    }

    .yeap-ai-chat__launcher-text,
    .yeap-ai-chat__launcher .yeap-ai-chat__launcher-text,
    .yeap-ai-chat__launcher span:not(.yeap-ai-chat__launcher-icon) {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .yeap-ai-chat__panel {
        position: fixed !important;
        z-index: 2147483647 !important;
        left: calc(8px + env(safe-area-inset-left, 0px)) !important;
        right: auto !important;
        top: calc(8px + env(safe-area-inset-top, 0px)) !important;
        bottom: auto !important;
        width: calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        height: min(640px, calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
        border-radius: 14px;
    }

    .yeap-ai-chat__header {
        grid-template-columns: 48px 1fr auto 32px 32px;
        min-height: 78px;
        padding: 14px;
    }

    .yeap-ai-chat__brand {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .yeap-ai-chat__title-wrap strong {
        font-size: 18px;
    }

    .yeap-ai-chat__title-wrap span {
        font-size: 12px;
    }

    .yeap-ai-chat__messages {
        height: calc(100% - 166px);
        padding: 14px;
    }

    .yeap-ai-chat__message {
        max-width: 78%;
        font-size: 14px;
    }

    .yeap-ai-chat__form {
        grid-template-columns: 42px 1fr 38px 54px;
        padding: 10px 12px 6px;
    }
}
