/* Attachment button, preview tray, and in-message attachment chips.
 * Extracted from styles.css lines 2248-2386.
 */

/* Attachment Button */
.attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    border: none;
    cursor: pointer;
    padding: 8px !important;
    border-radius: 50% !important;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.attach-btn:hover {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary);
}

.attach-btn svg {
    width: 20px;
    height: 20px;
}

/* Attachments Preview */
.attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background-color: var(--bg-input-inactive);
    border-radius: 12px;
    margin-bottom: 8px;
}

.attachment-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    max-width: 200px;
}

.attachment-item.uploading {
    opacity: 0.6;
}

.attachment-item img.attachment-thumbnail {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

.attachment-item .attachment-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-hover);
    border-radius: 4px;
    color: var(--text-secondary);
}

.attachment-item .attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-item .attachment-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-item .attachment-size {
    font-size: 11px;
    color: var(--text-secondary);
}

.attachment-item .remove-attachment {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background-color: var(--text-secondary);
    color: white;
    border: 2px solid var(--bg-panel);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    transition: background-color 0.2s;
}

.attachment-item .remove-attachment:hover {
    background-color: #ef4444;
}

/* Message Attachments */
.message-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.message-attachment-image {
    display: inline-block;
}

.message-attachment-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.message-attachment-file {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--bg-hover);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

