.xsodexai-root {
    position: fixed;
    right: 18px;
    bottom: 220px;
    z-index: 99999;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif
}

.xsodexai-fab {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    background: var(--xsodexai-fab-bg, #4CAF50);
    color: var(--xsodexai-fab-text, #fff);
}

.xsodexai-fab:focus,
.xsodexai-fab:focus-visible,
.xsodexai-fab:active {
    outline: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18) !important;
    -webkit-tap-highlight-color: transparent;
}

.xsodexai-panel {
    width: 360px;
    /* max-width: calc(100vw - 36px); */
    height: 520px;
    max-height: calc(100vh - 110px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column
}

/* Force hidden-state support even if theme/plugin overrides [hidden] globally */
.xsodexai-panel[hidden] {
    display: none !important;
}
.xsodexai-panel:not([hidden]) {
    display: flex;
}

.xsodexai-header {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, .08)
}

.xsodexai-title {
    font-size: 14px;
    font-weight: 700
}

/* --- Delayed hint bubble (teaser) next to the FAB --- */
.xsodexai-teaser {
    position: absolute;
    right: 68px;
    bottom: 6px;
    width: 240px;
    display: none;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 12px 12px 14px;
    background: #fff;
    color: #1d2327;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    animation: xsodexai-teaser-in .28s ease-out
}

.xsodexai-teaser.is-visible {
    display: flex
}

/* Small pointer aiming at the FAB */
.xsodexai-teaser::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, .1);
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    transform: rotate(-45deg);
    border-bottom-right-radius: 3px
}

.xsodexai-teaser-text {
    flex: 1;
    white-space: normal
}

.xsodexai-teaser-close {
    flex: none;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    color: #6b7280;
    background: rgba(0, 0, 0, .05);
    cursor: pointer
}

.xsodexai-teaser-close:hover {
    color: #111;
    background: rgba(0, 0, 0, .1)
}

@keyframes xsodexai-teaser-in {
    from { opacity: 0; transform: translateY(6px) }
    to   { opacity: 1; transform: translateY(0) }
}

@media (prefers-reduced-motion: reduce) {
    .xsodexai-teaser { animation: none }
}

@media (max-width: 520px) {
    .xsodexai-teaser {
        right: 0;
        bottom: 70px;
        left: auto;
        width: min(240px, calc(100vw - 36px))
    }
    .xsodexai-teaser::after {
        right: 22px;
        bottom: -6px;
        transform: rotate(45deg)
    }
}

.xsodexai-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 6px 8px;
    color: var(--xsodexai-close-color, #4CAF50);
}

.xsodexai-messages {
    padding: 12px;
    overflow: auto;
    flex: 1;
    background: #fafafa
}

.xsodexai-msg {
    margin: 0 0 10px;
    display: flex
}

.xsodexai-msg.user {
    justify-content: flex-end;
    margin: 20px 0;
}

.xsodexai-bubble {
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap
}

.xsodexai-msg.user .xsodexai-bubble {
    background: var(--xsodexai-user-bubble-bg, #111111);
    color: var(--xsodexai-user-bubble-text, #fff);
    border-color: var(--xsodexai-user-bubble-bg, #111111)
}

.xsodexai-products {
    margin-top: 10px;
    display: grid;
    gap: 10px
}

.xsodexai-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    padding: 10px;
    background: #fff
}

.xsodexai-card img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px
}

.xsodexai-card a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px
}

.xsodexai-meta {
    font-size: 12px;
    opacity: .8;
    margin-top: 4px
}

.xsodexai-footer {
    padding: 10px;
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    background: #fff
}

.xsodexai-input {
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, .15);
    font-size: 13px;
    outline: none;
    margin-bottom: 0 !important;
}

.xsodexai-input::placeholder
{
    font-size: 11px;
}

.xsodexai-send {
    padding: 10px 12px;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    background: var(--xsodexai-send-bg, #4CAF50);
    color: var(--xsodexai-send-text, #fff);
    display: flex;
    align-items: center;
    font-family: inherit;
    font-weight: 500;
    font-size: 13px;
}

.xsodexai-fab[aria-expanded="true"] {
  position: relative;
  bottom: -22px;
  left: -33px;
}

/* --- Catalog/categories rendering --- */
.xsodexai-bubble a {
    color: inherit;
    text-decoration: underline
}

.xsodexai-bubble a:hover {
    text-decoration: none
}

.xsodexai-cats ul {
    margin: 6px 0 0 18px;
    padding: 0
}

.xsodexai-cats li {
    margin: 4px 0
}

.xsodexai-cats {
    margin: 20px 0;
}

.xsodexai-fab-icon {
    width: 28px;
    height: 28px;
    display: block
}

.xsodexai-fab-logo {
    max-width: 34px;
    max-height: 34px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain
}

/* .xsodexai-fab:focus{outline:2px solid rgba(0,0,0,.35);outline-offset:2px} */

.xsodexai-close svg {
    fill: currentColor;
    stroke: currentColor
}


/* === AV AI: hide product thumbnails in recommendation cards === */
.xsodexai-card{
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}
.xsodexai-card img{
  display: none !important;
}


/* @media (max-width: 520px){
  .xsodexai-panel{
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    transform: scale(0.7);
  }

  .xsodexai-root
  {
    bottom: 0;
  }

  .xsodexai-fab[aria-expanded="true"] {
        position: relative;
        bottom: -49px;
        left: 27px;
        z-index: 999;
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

} */

/* 
@media screen and (max-width: 420px) {
    .xsodexai-fab[aria-expanded="true"] {
        position: relative;
        bottom: -11px;
        left: -18px;
    }
} */

.xsodexai-working-text {
    opacity: .92
}

.xsodexai-working .xsodexai-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 6px;
    vertical-align: middle
}

.xsodexai-working .xsodexai-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .35;
    animation: xsodexai-dot 1.2s infinite ease-in-out
}

.xsodexai-working .xsodexai-dots i:nth-child(2) { animation-delay: .15s }
.xsodexai-working .xsodexai-dots i:nth-child(3) { animation-delay: .3s }

@keyframes xsodexai-dot {
    0%, 80%, 100% { opacity: .25; transform: translateY(0) }
    40%           { opacity: .95; transform: translateY(-2px) }
}

@media (prefers-reduced-motion: reduce) {
    .xsodexai-working .xsodexai-dots i { animation: none; opacity: .6 }
}
