/* Unified media picker for the agent workbench and visitor chat window. */
.agent-page .aw-tool-panel {
    width: min(330px, calc(100vw - 24px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}
.support-tool-panel {
    width: min(236px, calc(100vw - 24px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}
.agent-page .aw-tool-panel button,
.support-tool-panel button {
    min-height: 88px;
    padding: 9px 5px;
    border: 1px solid rgba(80, 114, 150, .09);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(232, 242, 253, .82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 7px 18px rgba(35, 78, 121, .07);
}
.agent-page .aw-tool-panel button:hover,
.support-tool-panel button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--support-color, #1682f3), transparent 72%);
    background: #fff;
}
.agent-page .aw-tool-panel .composer-media-icon,
.support-tool-panel .composer-media-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #187be5;
    background: linear-gradient(145deg, #e9f5ff, #d9ecff);
    box-shadow: inset 0 1px 0 #fff;
}
.agent-page .aw-tool-panel .composer-media-icon svg,
.support-tool-panel .composer-media-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.agent-page .aw-tool-panel [data-aw-tool="video"] .composer-media-icon svg path,
.support-tool-panel [data-support-tool="video"] .composer-media-icon svg path {
    fill: currentColor;
    stroke: none;
}
.agent-page .aw-tool-panel [data-aw-tool="file"] .composer-media-icon,
.support-tool-panel [data-support-tool="file"] .composer-media-icon {
    color: #8556d9;
    background: linear-gradient(145deg, #f3edff, #e7dcff);
}
.agent-page .aw-tool-panel b,
.support-tool-panel b {
    color: #243b55;
    font-size: 12px;
    font-weight: 800;
}
.agent-page .aw-tool-panel small,
.support-tool-panel small {
    font-size: 9px;
    line-height: 1.25;
}
.agent-page .aw-tool-panel > .aw-material-hint,
.support-tool-panel > .support-material-hint {
    grid-column: 1 / -1;
    padding: 1px 4px 0;
    color: #76879a;
    text-align: left;
}
@media (max-width: 380px) {
    .agent-page .aw-tool-panel,
    .support-tool-panel { width: calc(100vw - 16px); gap: 5px; padding: 7px; }
    .agent-page .aw-tool-panel button,
    .support-tool-panel button { min-height: 80px; padding-inline: 2px; }
}

@media (min-width: 701px) {
    .agent-page .aw-composer { position: relative; }
    .agent-page .aw-image-draft-strip[hidden] { display: none !important; }
    .agent-page .aw-image-draft-strip {
        display: flex;
        gap: 8px;
        margin: 0 0 7px;
        padding: 7px 2px 2px;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .agent-page .aw-image-draft-item {
        position: relative;
        flex: 0 0 auto;
        width: 74px;
        height: 58px;
        overflow: hidden;
        border: 1px solid rgba(126, 171, 218, .34);
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 5px 14px rgba(26, 73, 126, .10);
    }
    .agent-page .aw-image-draft-item img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .agent-page .aw-image-draft-item button {
        position: absolute;
        top: 3px;
        right: 3px;
        width: 19px;
        height: 19px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        color: #fff;
        background: rgba(20, 34, 52, .72);
        font-size: 14px;
        line-height: 19px;
        cursor: pointer;
    }
    .agent-page .aw-image-draft-item small {
        position: absolute;
        left: 3px;
        bottom: 3px;
        max-width: calc(100% - 6px);
        padding: 1px 4px;
        overflow: hidden;
        border-radius: 999px;
        color: #fff;
        background: rgba(15, 31, 49, .64);
        font-size: 8px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .agent-page .aw-composer.is-image-dragover .aw-compose-row {
        position: relative;
        border-radius: 14px;
        box-shadow: 0 0 0 2px rgba(20, 127, 243, .28), 0 8px 20px rgba(20, 127, 243, .12);
    }
    .agent-page .aw-composer.is-image-dragover .aw-compose-row::after {
        content: "松开添加图片，点击发送";
        position: absolute;
        inset: -2px;
        display: grid;
        place-items: center;
        border: 1px dashed rgba(20, 127, 243, .58);
        border-radius: 14px;
        color: #126fe8;
        background: rgba(235, 246, 255, .82);
        font-size: 12px;
        font-weight: 800;
        pointer-events: none;
    }
}

@media (max-width: 700px) {
    .agent-page .aw-image-draft-strip { display: none !important; }
}
