.ai-agent-panel {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 240px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #000000;
    border: 2px solid #ffffff;
    border-radius: 10px;
    color: #ffffff;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-family: 'Roboto', sans-serif;
    transform-origin: bottom right;
    overflow: hidden;
    transition: width 0.2s ease, min-height 0.2s ease;
}

.ai-agent-panel.is-placed {
    right: auto;
    bottom: auto;
}

.ai-agent-panel.is-dragging,
.ai-agent-panel.is-resizing {
    transition: none;
}

.ai-agent-panel__header {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.ai-agent-panel.is-dragging .ai-agent-panel__header {
    cursor: grabbing;
}

.ai-agent-panel__log {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 12px 0;
    max-height: 160px;
    overflow: auto;
}

.ai-agent-panel__log[hidden] {
    display: none;
}

.ai-agent-panel__line {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
}

.ai-agent-panel__line--user {
    color: rgba(255, 255, 255, 0.55);
}

.ai-agent-panel__line--pending {
    color: rgba(255, 255, 255, 0.4);
}

.ai-agent-panel__form {
    flex-shrink: 0;
    margin: 12px 10px 16px;
}

.ai-agent-panel__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-agent-panel__upload {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ffffff;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.ai-agent-panel__upload svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-agent-panel__attachment {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 0 8px 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    line-height: 1.2;
}

.ai-agent-panel__attachment[hidden] {
    display: none;
}

.ai-agent-panel__attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-agent-panel__attachment-clear {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.ai-agent-panel__composer {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 4px;
    min-height: 44px;
    padding: 4px 4px 4px 14px;
    background: #2f2f2f;
    border-radius: 999px;
}

.ai-agent-panel__send {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.ai-agent-panel__send {
    background: #2f8cff;
}

.ai-agent-panel__send svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-agent-panel__file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ai-agent-panel__input {
    flex: 1;
    min-width: 0;
    height: 32px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 32px;
    text-align: left;
    outline: none;
}

.ai-agent-panel__input::placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    padding: 0;
}

.ai-agent-panel__resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    touch-action: none;
}

.ai-agent-panel__resize::before,
.ai-agent-panel__resize::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.9);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
}

.ai-agent-panel__resize::before {
    width: 5px;
    height: 5px;
}

.ai-agent-panel__resize::after {
    width: 9px;
    height: 9px;
}
