.ky-hub {
    --ky-navy: #082d3a;
    --ky-teal: #42b8af;
    --ky-line: #d9e8e9;
    --ky-text: #17313d;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99990;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ky-text);
}

.ky-hub * {
    box-sizing: border-box;
}

/* The original WhatsApp account remains configured; its standalone bubble is replaced by this hub. */
.wa__btn_popup,
.wa__popup_chat_box {
    display: none !important;
}

/* The self-hosted selector replaces the external translation floating widget. */
.gtranslate_wrapper,
.gt_float_switcher {
    display: none !important;
}

.ky-hub__trigger {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 12px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--ky-navy), #0c5360);
    box-shadow: 0 14px 38px rgba(6, 40, 51, .28);
    cursor: pointer;
}

.ky-hub__trigger:hover,
.ky-hub__trigger:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 44px rgba(6, 40, 51, .34);
}

.ky-hub__icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ky-teal);
}

.ky-hub__icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.ky-hub__trigger-text {
    max-width: 210px;
    text-align: left;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
}

.ky-hub__pulse {
    position: absolute;
    top: 4px;
    left: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #54d67b;
    border: 2px solid #fff;
}

.ky-hub__panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 360px;
    max-height: min(620px, calc(100vh - 100px));
    overflow: auto;
    border: 1px solid rgba(8, 45, 58, .12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(6, 40, 51, .24);
}

.ky-hub__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 21px 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--ky-navy), #0d5a65);
}

.ky-hub__header strong,
.ky-hub__header span {
    display: block;
}

.ky-hub__header strong {
    font-size: 17px;
    line-height: 1.3;
}

.ky-hub__header span {
    margin-top: 4px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

.ky-hub__close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ky-hub__agent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 0;
    padding: 14px;
    border: 1px solid var(--ky-line);
    border-radius: 14px;
    background: #f7fbfb;
}

.ky-hub__avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--ky-teal), var(--ky-navy));
    font-size: 19px;
    font-weight: 800;
}

.ky-hub__agent strong,
.ky-hub__agent small {
    display: block;
}

.ky-hub__agent small {
    margin-top: 3px;
    color: #71858d;
}

.ky-hub__channels {
    display: grid;
    gap: 9px;
    padding: 10px 18px;
}

.ky-hub__channels .ky-hub__agent:first-child {
    margin-top: 0;
}

.ky-hub__channels .ky-hub__agent:not(:first-child) {
    margin-top: 10px;
}

.ky-hub__channel {
    width: 100%;
    min-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ky-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ky-text);
    text-decoration: none !important;
    text-align: left;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ky-hub__channel:hover,
.ky-hub__channel:focus-visible {
    border-color: var(--ky-teal);
    background: #f4fbfb;
    color: var(--ky-text);
}

.ky-hub__channel small {
    color: #278e88;
    font-size: 11px;
    font-weight: 700;
}

.ky-hub__channel--telegram {
    border-left: 4px solid #229ed9;
}

.ky-hub__channel--whatsapp {
    border-left: 4px solid #25d366;
}

.ky-hub__channel--wechat {
    border-left: 4px solid #07c160;
}

.ky-hub__language {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin: 8px 18px 18px;
    padding-top: 14px;
    border-top: 1px solid var(--ky-line);
    color: #60727c;
    font-size: 12px;
    font-weight: 700;
}

.ky-hub__language select {
    max-width: 180px;
    height: 38px;
    border: 1px solid var(--ky-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ky-text);
}

.ky-hub__notice {
    min-height: 0;
    padding: 0 18px 14px;
    color: #278e88;
    font-size: 12px;
    font-weight: 700;
}

.ky-hub[dir="rtl"] .ky-hub__trigger-text,
.ky-hub[dir="rtl"] .ky-hub__channel {
    text-align: right;
}

@media (max-width: 767px) {
    .ky-hub {
        right: 14px;
        bottom: 14px;
    }

    .ky-hub__trigger {
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 11px;
    }

    .ky-hub__trigger-text {
        display: none;
    }

    .ky-hub__panel {
        position: fixed;
        right: 14px;
        bottom: 82px;
        width: calc(100vw - 28px);
        max-height: calc(100vh - 102px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ky-hub__trigger {
        transition: none;
    }
}
