.cka-wa-hub {
    position: fixed;
    z-index: var(--cka-wa-z, 10050);
    font-family: var(--primary-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 14px;
    line-height: 1.45;
    isolation: isolate;
}

.cka-wa-hub--left {
    left: var(--cka-wa-x, 20px);
    right: auto;
}

.cka-wa-hub--right {
    right: var(--cka-wa-x, 20px);
    left: auto;
}

.cka-wa-hub {
    bottom: var(--cka-wa-y, 20px);
}

.cka-wa-hub__toggle {
    width: var(--cka-wa-size, 60px);
    height: var(--cka-wa-size, 60px);
    border: 0;
    border-radius: 50%;
    background: var(--cka-wa-primary, #d51243);
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    z-index: 3;
}

.cka-wa-hub__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.42);
}

.cka-wa-hub__toggle svg {
    width: calc(var(--cka-wa-size, 60px) * 0.55);
    height: calc(var(--cka-wa-size, 60px) * 0.55);
    fill: currentColor;
}

.cka-wa-hub__toggle-custom-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.cka-wa-hub__toggle--custom .cka-wa-hub__toggle-icon--close {
    position: absolute;
    inset: 0;
    margin: auto;
    background: var(--cka-wa-primary, #d51243);
    border-radius: 50%;
    padding: calc(var(--cka-wa-size, 60px) * 0.22);
    box-sizing: border-box;
}

.cka-wa-hub.is-open .cka-wa-hub__toggle-custom-icon {
    display: none;
}

.cka-wa-hub__toggle-icon--close {
    display: none;
}

.cka-wa-hub.is-open .cka-wa-hub__toggle-icon--open {
    display: none;
}

.cka-wa-hub.is-open .cka-wa-hub__toggle-icon--close {
    display: block;
}

.cka-wa-hub.is-open .cka-wa-hub__toggle {
    background: var(--cka-wa-primary, #d51243) !important;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.28);
}

.cka-wa-hub__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s;
    pointer-events: none;
    z-index: 0;
}

.cka-wa-hub.is-open .cka-wa-hub__backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cka-wa-hub__panel {
    position: absolute;
    bottom: calc(var(--cka-wa-size, 60px) + 14px);
    width: min(320px, calc(100vw - 32px));
    background: var(--cka-wa-panel-bg, #f8f8f8);
    border: 1px solid rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    pointer-events: none;
    z-index: 2;
}

.cka-wa-hub--left .cka-wa-hub__panel {
    left: 0;
    transform-origin: bottom left;
}

.cka-wa-hub--right .cka-wa-hub__panel {
    right: 0;
}

.cka-wa-hub.is-open .cka-wa-hub__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cka-wa-hub__header {
    background: var(--cka-wa-primary-dark, var(--cka-wa-primary, #d51243));
    color: #fff;
    padding: 14px 52px 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}

.cka-wa-hub__header-main {
    min-width: 0;
}

.cka-wa-hub__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.cka-wa-hub__status {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.cka-wa-hub__header-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    border: 0;
    background: rgba(255, 255, 255, 0.95);
    color: var(--cka-wa-primary-dark, #374151);
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    opacity: 1;
    visibility: visible;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cka-wa-hub__header-close svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    pointer-events: none;
}

.cka-wa-hub__header-close:hover {
    background: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.24);
}

.cka-wa-hub__body {
    padding: 14px 12px 12px;
    max-height: min(420px, 58vh);
    overflow-y: auto;
    background: var(--cka-wa-panel-bg, #f8f8f8);
    position: relative;
    z-index: 1;
}

.cka-wa-hub__view {
    display: none;
}

.cka-wa-hub__view.is-active {
    display: block;
    animation: ckaWaFadeIn 0.22s ease;
}

@keyframes ckaWaFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cka-wa-hub__bubble {
    background: #fff;
    border-radius: 0 8px 8px 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
    color: #303030;
    margin-bottom: 12px;
    word-break: break-word;
    position: relative;
    z-index: 1;
}

.cka-wa-hub__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cka-wa-hub__option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.08);
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    z-index: 1;
}

.cka-wa-hub__option:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.22);
    box-shadow: 0 4px 12px rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.12);
}

.cka-wa-hub__option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.cka-wa-hub__option-icon--wa,
.cka-wa-hub__option-icon--book,
.cka-wa-hub__option-icon--assistant {
    background: var(--cka-wa-soft-bg, rgba(213, 18, 67, 0.12));
    color: var(--cka-wa-primary, #d51243);
}

.cka-wa-hub__option-text {
    min-width: 0;
}

.cka-wa-hub__option-title {
    display: block;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.cka-wa-hub__option-desc {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
}

.cka-wa-hub__back {
    border: 0;
    background: transparent;
    color: var(--cka-wa-primary, #d51243);
    font-size: 13px;
    font-weight: 600;
    padding: 0 0 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cka-wa-hub__composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cka-wa-hub__composer textarea {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
    min-height: 42px;
    max-height: 100px;
    resize: none;
    font: inherit;
    outline: none;
}

.cka-wa-hub__composer textarea:focus {
    border-color: var(--cka-wa-primary, #d51243);
}

.cka-wa-hub__send {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--cka-wa-primary, #d51243);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.cka-wa-hub__send:hover {
    background: var(--cka-wa-primary-hover, #b80f39);
}

.cka-wa-hub__send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.cka-wa-hub__faq-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.cka-wa-hub__faq-item {
    background: #fff;
    border: 1px solid rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cka-wa-hub__faq-question {
    width: 100%;
    border: 0;
    background: #fff;
    padding: 11px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #1f2937;
}

.cka-wa-hub__faq-question-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.cka-wa-hub__faq-chevron {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-right: 2px solid var(--cka-wa-primary, #d51243);
    border-bottom: 2px solid var(--cka-wa-primary, #d51243);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.cka-wa-hub__faq-item.is-open .cka-wa-hub__faq-chevron {
    transform: rotate(-135deg);
    margin-top: 8px;
}

.cka-wa-hub__faq-answer-inner {
    padding: 0 12px 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5563;
}

.cka-wa-hub__faq-answer-inner p:last-child {
    margin-bottom: 0;
}

.cka-wa-hub__human-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px dashed rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.35);
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cka-wa-hub__human-cta:hover {
    border-color: rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.55);
    box-shadow: 0 4px 12px rgba(var(--cka-wa-primary-rgb, 213, 18, 67), 0.1);
}

@media (max-width: 480px) {
    .cka-wa-hub__panel {
        width: min(300px, calc(100vw - 24px));
    }
}

body.cka-wa-hub-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .cka-wa-hub {
        bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .cka-wa-hub__panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(68px + var(--cka-wa-size, 60px) + 12px + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-width: none;
        max-height: min(62vh, 520px);
    }

    .cka-wa-hub--left .cka-wa-hub__panel,
    .cka-wa-hub--right .cka-wa-hub__panel {
        left: 12px;
        right: 12px;
    }

    .cka-wa-hub__body {
        max-height: min(48vh, 420px);
    }

    .cka-wa-hub__option-desc {
        display: none;
    }

    .cka-wa-hub__bubble {
        font-size: 13px;
        padding: 9px 10px;
    }

    .cka-wa-hub__status {
        display: none;
    }
}
