.attachments-wrapper {
    display: flex;
    flex-direction: column;
    flex: 0 0 180px;
    max-width: 180px;
}

.attachments-dropzone {
    flex: 1;
    min-height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.attachments-dropzone.drag-over {
    border-color: var(--accent-blue);
    background-color: rgba(88, 166, 255, 0.1);
}

.attachments-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s;
}

.attachment-item:hover {
    background: var(--bg-primary);
}

.attachment-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.attachment-icon svg {
    width: 14px;
    height: 14px;
}

.attachment-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.attachment-remove {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background-color 0.15s;
}

.attachment-item:hover .attachment-remove {
    opacity: 1;
}

.attachment-remove:hover {
    color: var(--accent-red);
    background: rgba(248, 81, 73, 0.15);
}

.attachment-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.attachment-add-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.attachment-add-btn svg {
    width: 12px;
    height: 12px;
}

.attachment-tooltip {
    position: fixed;
    z-index: 2000;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-primary);
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.attachment-tooltip-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.attachment-tooltip-row:last-child {
    margin-bottom: 0;
}

.attachment-tooltip-label {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.attachment-tooltip-value {
    color: var(--text-primary);
    word-break: break-all;
}

.attachments-empty {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
    padding: 0.5rem;
    font-style: italic;
}

.modal.read-only .attachment-add-btn,
.modal.read-only .attachment-remove {
    display: none;
}

.modal.read-only .attachments-dropzone {
    border-style: solid;
}

.attachment-pending {
    border-style: dashed;
    border-color: var(--accent-blue);
    background: rgba(88, 166, 255, 0.05);
}

.attachment-pending .attachment-name {
    font-style: italic;
}
