.aiditec-assistant {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    font-family: Arial, Helvetica, sans-serif;
}

.aiditec-assistant-toggle {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: #f28f22;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.aiditec-assistant-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.27);
}

.aiditec-assistant-toggle-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aiditec-assistant-toggle-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
    stroke: #fff;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aiditec-assistant-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.aiditec-assistant-panel.is-open {
    display: flex;
}

.aiditec-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #111;
    color: #fff;
}

.aiditec-assistant-header-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aiditec-assistant-header-identity > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aiditec-assistant-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f28f22;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 auto;
}

.aiditec-assistant-header-avatar svg {
    width: 22px;
    height: 22px;
    fill: #fff;
    stroke: #fff;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aiditec-assistant-header strong {
    font-size: 17px;
    color: #fff;
}

.aiditec-assistant-header span {
    font-size: 12px;
    color: #fff;
}

.aiditec-assistant-header-identity > div > span {
    opacity: 0.75;
}

.aiditec-assistant-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.aiditec-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #f6f6f6;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aiditec-assistant-message {
    max-width: 82%;
    padding: 11px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.aiditec-assistant-message-bot {
    align-self: flex-start;
    background: #fff;
    color: #222;
    border-bottom-left-radius: 5px;
}

.aiditec-assistant-message-user {
    align-self: flex-end;
    background: #f28f22;
    color: #fff;
    border-bottom-right-radius: 5px;
}

.aiditec-assistant-message-loading {
    opacity: 0.7;
    font-style: italic;
}

.aiditec-assistant-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.aiditec-assistant-form textarea {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    padding: 11px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    color: #222 !important;
    background: #fff !important;
    caret-color: #222;
    -webkit-text-fill-color: #222 !important;
    opacity: 1;
}

.aiditec-assistant-form textarea::placeholder {
    color: #8a8a8a !important;
    -webkit-text-fill-color: #8a8a8a !important;
    opacity: 1;
}

.aiditec-assistant-form textarea:focus {
    border-color: #f28f22;
}

.aiditec-assistant-form button {
    min-width: 78px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f28f22;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.aiditec-assistant-form button:disabled {
    opacity: 0.55;
    cursor: default;
}

@media (max-width: 640px) {
    .aiditec-assistant {
        right: 14px;
        bottom: 14px;
    }

    .aiditec-assistant-panel {
        position: fixed;
        inset: 12px;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        bottom: 12px;
    }

    .aiditec-assistant-toggle {
        width: 56px;
        height: 56px;
    }

    .aiditec-assistant-toggle-icon {
        width: 30px;
        height: 30px;
    }
}
